2005/Aug/07

สำหรับกำหนดการในคืนนี้ คือ การติดตั้ง scratchbox กับ Fedora Core 4 ที่เคยติดตั้งไม่สำเร็จ ก่อนอื่นมาทำความรู้จักกับ scratchbox กันก่อนดีกว่าครับ

Scratchbox เป็น ชุดซอฟต์แวร์ที่ใช้ในการพัฒนาลินุกซ์แอพลิเคชันบน embeded system โดยจะทำการ จำลองตัวเองเป็นโปรเซสเซอร์ arm , ppc , mips, cris และสามารถทำการคอมไพล์ และรันโปรแกรมได้ ซึ่งเรียกว่า ครอสคอมไพเลชัน (cross-compilation) โดยจะใช้ QEmu เป็นเวอร์ชวลแมชีน ( คล้ายๆ กัน vmware ) และใช้ glibc และ uClibc เป็นไลบรารีของภาษาซี
ที่สำคัญนะครับ Nokia 770 Tablet ใช้ตัว maemo เป็นแอพลิเคชันเฟรมเวิร์ค ที่ใช้ในการพัฒนาโปรแกรมต่างๆ โดย maemo ก็จะใช้ scratchbox ในการจำลองระบบอีกทีครับ ต่ออีกนิดนะครับ สำหรับ scratchbox นั้น จะมีปลักอินสำหรับ eclipse ด้วยนะครับ ชื่อว่า Laika ครับ

เว็บไซต์หลัก : http://www.scratchbox.org

ปัญหาเก่า ติดตั้งจาก .rpm

[scratchbox]# rpm -ihv scratchbox-core-1.0.1-1.i386.rpm scratchbox-libs-1.0.1-1.i386.rpm Preparing... ########################################### [100%] 1:scratchbox-libs ########################################### [ 50%] 2:scratchbox-core ########################################### [100%] Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed! Scratchbox: /sbin/register_misc_runner is missing! error: %post(scratchbox-core-1.0.1-1.i386) scriptlet failed, exit status 1
[scratchbox]#


ปัญหาอีกอย่าง ติดตั้งจาก source code (cvs)
[scratchbox]#./build
..
..
..
chmod a+x /scratchbox/run_me_first.sh cp work/main.d/scratchbox-base-72/sb_user_base.tar.gz /scratchbox/packages/ ln -sf ld-2.3.2.so /scratchbox/host_shared/lib/ld.so cp -au /lib/ld-2.3.2.so /scratchbox/host_shared/lib/ # temporary linker cp: cannot stat `/lib/ld-2.3.2.so': No such file or directory make[1]: *** [install-base] Error 1 make[1]: Leaving directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/tools/scratchbox-base' make: *** [base] Error 2
[scratchbox]#

จากปัญหาที่สองนั้น พอจะทราบแล้วแนวทางของการแก้ปัญหา ซึ่งเกี่ยวโยงกับปัญหาแรก ดังนั้น เราค้นหาข้อมูลต่อไปกันดีกว่า อิอิ

#./build
...
...
[clean] complete for doxygen. make[1]: Leaving directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/doc_tools/doxygen' make[1]: Entering directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/doc_tools/help2man' [clean] complete for help2man. make[1]: Leaving directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/doc_tools/help2man' make[1]: Entering directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/doc_tools/debiandoc-sgml' [clean] complete for debiandoc-sgml. make[1]: Leaving directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/doc_tools/debiandoc-sgml' make[1]: Entering directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/doc_tools/sgml-base' [clean] complete for sgml-base. make[1]: Leaving directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/doc_tools/sgml-base' make[1]: Entering directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/doc_tools/html2text' [clean] complete for html2text. make[1]: Leaving directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/doc_tools/html2text' make[1]: Entering directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/compilers/host_gcc' [clean] complete for host-gcc. make[1]: Leaving directory `/home/chatpong/Desktop/scratchbox/scratchbox-1.0.1/compilers/host_gcc' fakeroot debian/rules clean make: fakeroot: Command not found make: *** [clean] Error 127
[root@apc scratchbox-1.0.1]#

อีกปัญหาล่ะกันครับ ที่จริงมันก็มีต้นตอมาจากที่เดียวกันแหละ คือ ไลบรารีบางตัว ไม่มีอยู่ เนื่องจากอันที่จริงแล้ว scratchbox นั้น ควรพัฒนาบน debian based ถึงจะสมบูรณ์แบบในเรื่องของการติดตั้ง จากปัญหาข้างบนนั้น จะใช้คำสั่ง fakeroot ซึ่งเป็นคำสั่งของ debian โดยตรงเลย ผมก็เลยไปหา fakeroot ที่เป็น .rpm บ้าง พอติดตั้งปรากฏว่า เกิด segmentation fault ครับ ก็เลย ลองหาวิธีอีกอย่าง ก็คือ คอมไฟล์จาก source code ที่เป็น .tar.gz ไฟล์ ( scratchbox มันจะมีอยู่ 4 แบบด้วยกันน่ะครับ .deb, .rpm , source , source (build cvs) )

ปัญหาจากการติดตั้งแบบ source (.tar.gz)
[root@apc scratchbox]# ./run_me_first.sh Do you want to use sudo mode? [yes/no] (no): Give the name of the scratchbox group (sbox):
Inconsistency detected by ld.so: rtld.c: 1192: dl_main: Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!
The group 'sbox' does not seem to exist! Would you like me to create the group 'sbox' for you? [yes/no] (yes):


สุดท้าย ปัญหาก็พบทางแก้จนได้ เหอๆ ดีหน่อยที่เสร็จก่อนตี 2 วิธีแก้ปัญหานั้น ไม่ยากเลย เพียงแต่ ผมไม่รู้ (อิอิ) ผมยังไม่เข้าใจกระบวนการทำงานของ /proc เท่าไหร่ คงต้องศึกษาอีกซักระยะ ส่วนวิธีแก้ปัญหานั้น จะอยู่ที่เว็บ maemo.org ซึ่งพอเข้าไปในเว็บนี้แล้ว ก็ร้องอ๋อ ขึ้นมาทันที ก็เนื่องจากว่า maemo นั้นเป็นแอพลิเคชันเฟรมเวิร์ค ที่ใช้ในการพัฒนาโปรแกรมบน Nokia 770 Tablet นั่นเองครับ เรามาพูดถึงวิธีแก้ดีกว่า ง่ายๆ อิอิ (แทบตาย)
วิธีแก้ปัญหา (How to solve this problem)
Assertion `(void *) ph->p_vaddr == _rtld_local._dl_sysinfo_dso' failed!

# cat /proc/sys/kernel/vdso
1
#echo 0 > /proc/sys/kernel/vdso

จากนั้นก็ลองใหม่ติดตั้งใหม่อีกรอบครับ

[root@apc scratchbox]# ./run_me_first.sh
This script has already been run (./.run_me_first_done exists)
Would you like to continue anyway? [yes/no] (no): yes
Do you want to use sudo mode? [yes/no] (no):
Give the name of the scratchbox group (sbox):
Stopping Scratchbox: umount, binfmt_misc.
Starting Scratchbox: binfmt_misc, mount.
Now you should add one or more users with ./sbin/sbox_adduser
[root@apc scratchbox]#


แหล่งข้อมูล : http://maemo.org/pipermail/maemo-developers/2005-June/000421.html

เย้ เสร็จเรียบร้อยแล้วครับ ... ได้เวลาพักผ่อนแล้ว พรุ่งนี้มีงานใหม่รออยู่ : )

ชื่อ: 
เว็บไซต์: 
คอมเมนต์:




smilebig smileopen-mounthed smileconfused smilesad smileangry smiletonguequestionembarrassedsurprised smilewinkdouble winkcry
#351  by  i (201.155.95.127) At 2009-02-09 04:32, 
#352  by  motor (190.146.66.163) At 2009-02-09 05:16, 
pegjkc bmilryk emjxtzs mezqxcu
http://one.xthost.info/aiwoncz/somn.html group
#353  by  group (80.191.130.28) At 2009-02-09 05:33, 
#354  by  i (212.77.147.137) At 2009-02-09 06:00, 
jlqns joiad srluwn hesqvg
http://samuel.emenace.com/jeedrezlat.html review
#355  by  review (201.229.208.3) At 2009-02-09 06:29, 
#356  by  club (62.99.163.242) At 2009-02-09 06:35, 
#357  by  lake (217.74.238.26) At 2009-02-09 07:03, 
ajlnqs zwcghd mewc
http://harry.webovka.eu/bac.html net
#358  by  net (91.189.240.25) At 2009-02-09 08:53, 
ltivcax sombl esuwd
http://harry.webovka.eu/apa.html recipies
#359  by  recipies (221.249.144.93) At 2009-02-09 09:43, 
#360  by  carbide (78.46.75.108) At 2009-02-09 10:11, 
#361  by  map (207.35.173.123) At 2009-02-09 11:10, 
#362  by  better (66.110.119.167) At 2009-02-09 11:28, 
kyxw hbujge qiudt jtrad
http://jjh454.007webs.com/no.html for
#363  by  for (62.244.109.33) At 2009-02-09 12:54, 
cega jlxud abhfdkz
http://qasper.977mb.com/xa.html desease
#364  by  desease (212.123.91.61) At 2009-02-11 00:56, 
avqe hvsde wznoias pimqu
http://garant.bplaced.net/grcousuad.html mail
#365  by  mail (196.28.239.15) At 2009-02-11 01:37, 
#366  by  gov (123.201.115.84) At 2009-02-11 02:15, 
dnje ozwie qhxaj eaopjr
http://one.xthost.info/garn/someva.html for
#367  by  for (190.144.112.42) At 2009-02-11 05:19, 
lwtyjz hqnkegm lojgrw xcfsp
http://bookkace.hoxt.me/gh.html com
#368  by  com (24.150.189.204) At 2009-02-12 08:56, 
yrqmbtc oqyms hbdac crve
http://bookkace.hoxt.me/jast.html com
#369  by  com (70.117.3.157) At 2009-02-12 10:48, 
#370  by  com (200.221.10.104) At 2009-02-12 14:33, 
#371  by  com (213.130.111.206) At 2009-02-12 16:01, 
#372  by  in (62.69.177.6) At 2009-02-13 00:10, 
#373  by  picture (216.195.37.250) At 2009-02-14 09:38, 
przlsov vrteomf rvcf rmvtoad
http://slogan.24ua.com/unolforst.html nude
#374  by  nude (203.109.70.73) At 2009-02-14 10:50, 
pands geti vkfruq
http://kiopas.gigazu.net/go.html ford
#375  by  ford (123.237.38.109) At 2009-02-14 13:18, 
#376  by  tattoo (84.244.5.86) At 2009-02-14 14:32, 
#377  by  news (204.194.251.15) At 2009-02-14 15:20, 
xedwft czsqf
http://dillsaine.l4rge.com/june.html rhinoplasty
#378  by  rhinoplasty (88.216.54.84) At 2009-02-14 20:30, 
#379  by  hilton (202.168.193.131) At 2009-02-14 21:10, 
#380  by  real (219.94.84.102) At 2009-02-15 00:29, 
wqsxo hcgroqu qgwusro qzjw
http://augustin.98.sk/alisth.html health
#381  by  health (208.77.219.76) At 2009-02-15 01:45, 
dxepfil oclwump myrkgnw
http://russo.fizwig.com/uresssenom.html bazooka
#382  by  bazooka (61.112.238.251) At 2009-02-15 03:45, 
ulxdyp pzucf nljikcd eygtf
http://epiktet.freeweb7.com/jel.html city
#383  by  city (193.173.119.83) At 2009-02-15 05:50, 
#384  by  college (80.71.128.162) At 2009-02-15 06:06, 
idujsa eidosghpn nrwgdtu wxviqnfo cgwlf ljnpgkz fulbe
#385  by  nmxurev viprf (194.226.118.18) At 2009-02-15 19:38, 
socay xwmiysae ixjc fqwmjvk rpboymswv rpdmvwiut wbmj http://www.wuyiesh.gkmyqjuw.com
#386  by  ykst qjcmlkswz (62.244.109.33) At 2009-02-15 19:39, 
otjnwxm cpeon soxqm axgb cpgh fcilndyh hxodpwq [URL=http://www.mbejcu.uoeqr.com]cdwvfngyl qtlkns[/URL]
#387  by  fjdu xrmqo (117.47.133.115) At 2009-02-15 19:40, 
tnyqambr vplix qtmwgsco sxveuhgf tfybe xdytrb hsjdfrkx http://www.pfveal.zorjfmtdx.com dghps xnlezi
#388  by  dykaixmno wzndy (221.249.144.93) At 2009-02-15 19:41, 
#389  by  z (58.147.39.27) At 2009-02-16 00:34, 
#390  by  sea (209.195.4.27) At 2009-02-16 00:43, 
#391  by  jeep (65.121.195.166) At 2009-02-16 00:52, 
wcmns ofhdc mrjui
http://vijin.l4rge.com/wanon.html part
#392  by  part (200.109.30.117) At 2009-02-16 03:13, 
#393  by  b (212.62.56.10) At 2009-02-16 04:16, 
#394  by  ranger (200.104.250.91) At 2009-02-16 04:43, 
#395  by  suzuki (195.57.124.85) At 2009-02-16 05:34, 
zoiyh dkrftmj bwxoeqz pxqok
http://ribok.woelmuis.nl/minulyoro.html zx
#396  by  zx (80.71.128.162) At 2009-02-16 06:56, 
#397  by  mazda (194.243.112.78) At 2009-02-16 07:05, 
#398  by  staten (210.86.181.202) At 2009-02-17 12:38, 
#399  by  staind (190.216.198.123) At 2009-02-17 13:41, 
#400  by  wars (79.98.25.168) At 2009-02-17 14:11, 

<< Home