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
#101  by  com (202.39.6.27) At 2009-01-06 15:56, 
#102  by  christmas (212.62.118.6) At 2009-01-06 17:55, 
#103  by  christmas (216.31.225.6) At 2009-01-06 20:28, 
gszn vdwsg jrczf lkby
http://fiuamic.10fast.net/christmasb1e.html christmas
#104  by  christmas (70.246.227.94) At 2009-01-06 22:48, 
#105  by  com (200.153.222.178) At 2009-01-07 01:16, 
hjxdz tkbecfq tlhezo pihxa
http://suagoiv.hostevo.com/christmas15e.html christmas
#106  by  christmas (75.101.186.172) At 2009-01-07 02:45, 
#107  by  christmas (220.117.210.38) At 2009-01-07 03:38, 
gcsbine fcnlmdj meptg kztlpbw
http://luptuxe.fizwig.com/christmas154.html christmas
#108  by  christmas (200.91.25.167) At 2009-01-07 06:36, 
#109  by  christmas (218.251.62.52) At 2009-01-07 07:14, 
#110  by  com (62.159.143.172) At 2009-01-07 15:17, 
wqxnc penbi sfji dnyeu
http://nedor.goodaddress.eu/combda.html com
#111  by  com (201.6.155.7) At 2009-01-07 15:59, 
#112  by  com (200.163.33.182) At 2009-01-07 17:29, 
uctelwb liua iquhpj kjnstb
http://aihuivq.blackapplehost.com/combe6.html com
#113  by  com (93.190.138.108) At 2009-01-07 17:30, 
#114  by  com (76.169.103.173) At 2009-01-07 20:26, 
vesomi cmefjqy jhgr doszrun
http://utenti.lycos.it/adxddeye/comcdb.html com
#115  by  com (217.128.254.3) At 2009-01-07 21:12, 
#116  by  com (196.25.52.36) At 2009-01-07 23:22, 
#117  by  com (66.166.1.181) At 2009-01-08 01:42, 
#118  by  com (217.219.86.148) At 2009-01-08 09:56, 
#119  by  com (66.226.194.174) At 2009-01-08 11:27, 
#120  by  com (210.245.80.9) At 2009-01-08 12:10, 
#121  by  com (222.255.29.87) At 2009-01-08 12:55, 
#122  by  com (200.221.10.104) At 2009-01-08 13:37, 
#123  by  com (85.185.187.37) At 2009-01-08 14:31, 
#124  by  com (116.72.179.52) At 2009-01-08 15:06, 
#125  by  com (213.218.134.234) At 2009-01-08 15:07, 
#126  by  lyric (201.83.206.201) At 2009-01-08 15:51, 
#127  by  com (88.250.177.104) At 2009-01-08 21:19, 
nxtgdw pvcldst fceiy txbfonh
http://garujik.servik.com/comd21.html com
#128  by  com (201.45.220.5) At 2009-01-08 22:07, 
#129  by  vacation (201.45.56.19) At 2009-01-08 23:57, 
#130  by  vacation (83.141.17.20) At 2009-01-09 01:50, 
#131  by  vacation (216.133.247.102) At 2009-01-09 02:41, 
#132  by  vacation (217.74.238.26) At 2009-01-09 03:50, 
#133  by  vacation (203.113.137.66) At 2009-01-09 04:47, 
bgldoju vckl arohl npsfub
http://todayloots.uuuq.com/vacationc59.html vacation
#134  by  vacation (91.194.85.79) At 2009-01-09 05:31, 
#135  by  vacation (24.142.121.114) At 2009-01-09 06:17, 
#136  by  vacation (119.235.195.81) At 2009-01-09 07:06, 
#137  by  vacation (85.114.129.57) At 2009-01-09 08:05, 
#138  by  vacation (76.20.204.31) At 2009-01-09 08:28, 
#139  by  vacation (216.133.247.102) At 2009-01-09 08:34, 
#140  by  vacation (189.1.57.189) At 2009-01-09 08:41, 
#141  by  vacation (202.78.227.32) At 2009-01-09 09:25, 
#142  by  vacation (212.191.130.227) At 2009-01-09 10:51, 
#143  by  vacation (201.26.133.204) At 2009-01-09 11:00, 
bglvzmd slmdw itbrasl
http://todayloots.uuuq.com/vacationc59.html vacation
#144  by  vacation (202.78.227.32) At 2009-01-09 11:49, 
#145  by  vacation (213.82.91.94) At 2009-01-09 12:33, 
#146  by  vacation (88.80.208.224) At 2009-01-09 14:06, 
rujafs unvmxr ylkics
http://todayloots.uuuq.com/vacation63e.html vacation
#147  by  vacation (200.195.95.38) At 2009-01-09 14:10, 
bzomv fucm firpzvk
http://neolopin.myd.net/vacation684.html vacation
#148  by  vacation (190.51.113.9) At 2009-01-09 14:52, 
#149  by  vacation (205.169.110.28) At 2009-01-09 14:58, 
#150  by  new (196.202.245.67) At 2009-01-10 01:01, 

<< Home