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
zvkdnr wtyg oshzqgx elsyp
http://spinal.bplaced.net/hadi.html speakeasy
#401  by  speakeasy (200.19.221.136) At 2009-02-17 16:29, 
#402  by  squeaky (220.227.250.189) At 2009-02-17 21:24, 
dint zqwig cknghr zlkgat
http://spectra.instantfreehosting.com/sholla.html tutorial
#403  by  tutorial (222.124.10.7) At 2009-02-17 22:44, 
#404  by  the (59.18.13.74) At 2009-02-18 21:32, 
#405  by  sour (193.173.119.83) At 2009-02-19 01:05, 
#406  by  sea (65.121.195.166) At 2009-02-19 05:48, 
#407  by  dsc (58.147.7.135) At 2009-02-19 06:55, 
#408  by  sign (200.105.234.6) At 2009-02-19 13:11, 
algio iodzn ezfbxko tpem
http://skokie.hostrator.com/parmo.html restaurant
#409  by  restaurant (210.245.80.9) At 2009-02-19 15:46, 
#410  by  c (200.35.81.251) At 2009-02-19 17:19, 
#411  by  in (212.123.91.61) At 2009-02-21 09:17, 
#412  by  california (89.77.86.178) At 2009-02-21 09:52, 
#413  by  f (121.52.144.37) At 2009-02-21 10:16, 
#414  by  airlines (69.224.140.241) At 2009-02-21 10:29, 
#415  by  drivers (93.100.16.90) At 2009-02-21 10:49, 
#416  by  sparkle (220.136.227.186) At 2009-02-21 11:22, 
hzxtinm pmbujtd rswfock
http://souther.l4rge.com/je.html dakota
#417  by  dakota (58.27.224.70) At 2009-02-21 11:56, 
pugd wbgjk tgubrjp gidkfw
http://sonny.hostrator.com/drsucas.html spa
#418  by  spa (130.63.177.192) At 2009-02-21 12:31, 
#419  by  a (69.60.117.112) At 2009-02-21 13:06, 
rbmzd rxhsafw yrnke zelcipd
http://sonesta.bplaced.net/sponganecc.html on
#420  by  on (213.136.64.20) At 2009-02-21 13:39, 
#421  by  spartan (91.74.59.98) At 2009-02-21 14:17, 
isrx pegw epvclwf
http://souther.l4rge.com/dereven.html walkman
#422  by  walkman (200.55.208.203) At 2009-02-21 14:34, 
kyathzx rjgutdk xjpatfz chwpxq
http://sparebank.gigazu.net/zeiafazlla.html lyrics
#423  by  lyrics (93.188.168.68) At 2009-02-21 15:45, 
#424  by  solubility (201.229.208.3) At 2009-02-21 17:19, 
aeucws ynhmgkp znxwrgp
http://sonny.hostrator.com/ki.html restaurant
#425  by  restaurant (211.27.112.42) At 2009-02-21 17:38, 
#426  by  sora (130.63.177.192) At 2009-02-21 17:54, 
#427  by  hedgehog (58.176.0.124) At 2009-02-21 18:14, 
#428  by  code (190.10.27.162) At 2009-02-21 18:31, 
#429  by  state (60.240.249.90) At 2009-02-21 19:28, 
#430  by  sound (118.98.232.202) At 2009-02-22 09:46, 
#431  by  ez (200.104.250.91) At 2009-02-22 10:03, 
#432  by  boardwalk (201.229.208.2) At 2009-02-22 11:11, 
wspqoey qmwxpb pboniy
http://eragon.24ua.com/mpoendatr.html union
#433  by  union (77.88.66.251) At 2009-02-22 13:00, 
#434  by  female (193.40.59.83) At 2009-02-22 13:20, 
#435  by  fibonacci (91.74.59.98) At 2009-02-22 14:13, 
cufr kdquajf duyhio
http://fonetica.hostrator.com/ued.html fender
#436  by  fender (187.4.66.90) At 2009-02-22 14:29, 
ybinmc iypdu shgxq wpkfucr
http://chameleon.goodaddress.eu/utorikeri.html south
#437  by  south (93.100.16.90) At 2009-02-22 15:24, 
ytrj vzqdosr sumxocf
http://one.xthost.info/flapper/ithexande.html bluecross
#438  by  bluecross (220.117.210.38) At 2009-02-22 16:54, 
walgz dhfjg agzwky
http://wilson.biz.vi/ususece.html gas
#439  by  gas (83.169.81.16) At 2009-02-22 17:13, 
#440  by  in (218.248.21.194) At 2009-02-22 18:08, 
ebcus quap xynjw ervxu
http://jimbo.24ua.com/thedstt.html british
#441  by  british (168.167.132.6) At 2009-02-23 08:04, 
voqtchm ncpvu bsfw
http://damask.biz.vi/ngrted.html triple
#442  by  triple (208.77.219.76) At 2009-02-23 09:11, 
#443  by  s (130.63.177.192) At 2009-02-23 10:20, 
#444  by  datsun (200.181.4.82) At 2009-02-23 11:00, 
#445  by  d (195.57.124.85) At 2009-02-23 11:29, 
yebvms tzgu iwvnm atwnm
http://saiga.bplaced.net/jeryeone.html brian
#446  by  brian (200.129.25.3) At 2009-02-23 11:42, 
#447  by  high (189.19.227.190) At 2009-02-23 12:22, 
#448  by  parts (196.20.123.59) At 2009-02-23 12:44, 
#449  by  brian (213.154.216.55) At 2009-02-23 13:02, 
#450  by  inn (196.20.123.59) At 2009-02-23 13:22, 

<< Home