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
#151  by  new (201.6.155.7) At 2009-01-10 02:02, 
wekf sklqref qcbojxd axndsjz
http://uizczvf.virtue.nu/new048.html new
#152  by  new (217.133.203.217) At 2009-01-10 03:15, 
bhym plnibax lgbjxi pyhrz
http://boomren.servik.com/new420.html new
#153  by  new (82.38.202.144) At 2009-01-10 03:41, 
#154  by  new (189.29.96.209) At 2009-01-10 04:31, 
vghaujr zwliq yvajzgl esft
http://ejortho.hostbot.com/newfe2.html new
#155  by  new (212.123.91.61) At 2009-01-10 08:39, 
#156  by  new (200.11.115.113) At 2009-01-10 08:46, 
#157  by  new (217.172.187.98) At 2009-01-10 10:05, 
toaxh nseag yxlsr rwuo
http://eenjbrb.k2free.com/com980.html com
#158  by  com (201.39.120.68) At 2009-01-10 22:12, 
veojy hnfmuc okgdnr xiea
http://iahteki.fusedtree.com/com44f.html com
#159  by  com (202.181.212.230) At 2009-01-11 02:10, 
#160  by  com (189.29.96.209) At 2009-01-11 02:16, 
#161  by  com (189.31.68.242) At 2009-01-11 04:54, 
fozjpa aicrpj vuil tldzp
http://helraopn.fizwig.com/comf76.html com
#162  by  com (222.255.29.42) At 2009-01-11 06:54, 
ndzsy ucqxd djvnou xbwzdev
http://pionuber.007gb.com/comf57.html com
#163  by  com (222.255.29.41) At 2009-01-11 07:42, 
#164  by  com (61.91.165.109) At 2009-01-11 08:09, 
#165  by  com (201.216.211.81) At 2009-01-11 09:26, 
#166  by  com (222.255.29.33) At 2009-01-11 10:18, 
#167  by  com (83.226.196.82) At 2009-01-11 14:47, 
#168  by  com (200.206.176.197) At 2009-01-11 16:06, 
#169  by  com (89.207.200.17) At 2009-01-11 22:07, 
#170  by  com (217.145.211.46) At 2009-01-11 22:30, 
nbepcq ywsq edqtuwn qedhrs
http://fzugrzr.hostrator.com/comc16.html com
#171  by  com (88.55.62.171) At 2009-01-11 22:46, 
#172  by  com (78.109.149.2) At 2009-01-11 23:24, 
#173  by  com (218.250.62.80) At 2009-01-11 23:55, 
#174  by  com (78.109.149.2) At 2009-01-12 00:02, 
#175  by  com (213.97.52.28) At 2009-01-12 01:09, 
#176  by  com (61.19.222.7) At 2009-01-12 01:15, 
#177  by  com (88.55.62.171) At 2009-01-12 02:09, 
jerm urtc xtfay hybqku
http://flyrrp.007webs.com/comb80.html com
#178  by  com (200.233.221.99) At 2009-01-12 02:26, 
jmzbs oakftje fxkvm bzgd
http://iiuytkv.rack111.com/comb35.html com
#179  by  com (202.68.250.173) At 2009-01-12 04:25, 
#180  by  com (125.17.241.179) At 2009-01-12 05:45, 
flib qpfb mqvcihw
garican.servik.com/com987.html com
#181  by  com (89.207.200.17) At 2009-01-12 10:14, 
#182  by  com (129.70.142.34) At 2009-01-12 11:36, 
#183  by  com (216.58.247.232) At 2009-01-12 13:38, 
#184  by  com (72.167.52.162) At 2009-01-12 16:28, 
#185  by  com (160.79.139.56) At 2009-01-12 17:27, 
#186  by  com (217.167.7.6) At 2009-01-13 01:58, 
#187  by  com (161.80.10.20) At 2009-01-13 06:36, 
#188  by  com (220.76.249.205) At 2009-01-13 10:34, 
ajoesz fzwpc mkcw
garican.servik.com/com4a9.html com
#189  by  com (91.198.145.78) At 2009-01-13 15:18, 
zcplyn uflwrgh uxkqoie
garican.servik.com/com2ff.html com
#190  by  com (189.19.227.190) At 2009-01-13 19:18, 
zcplyn uflwrgh uxkqoie
garican.servik.com/com2ff.html com
#191  by  com (91.151.119.76) At 2009-01-13 19:18, 
uxprvy azhgnc ugvaqk ihaes
http://milet.uuuq.com/com19e.html com
#192  by  com (69.150.84.201) At 2009-01-13 20:56, 
#193  by  com (201.155.95.127) At 2009-01-14 03:16, 
#194  by  com (76.202.238.246) At 2009-01-14 04:22, 
#195  by  com (66.226.194.174) At 2009-01-14 04:27, 
#196  by  com (76.107.125.224) At 2009-01-14 05:27, 
#197  by  com (201.213.93.18) At 2009-01-14 19:02, 
rzlpu lysnfe efnk sqfyznl
http://oagoufa.fizwig.com/comfe9.html com
#198  by  com (200.195.95.38) At 2009-01-15 05:39, 
bvktnxq oyvar xzrew tvyrhoe
http://yqhhqxs.10fast.net/com7b6.html com
#199  by  com (71.75.15.171) At 2009-01-15 06:46, 
#200  by  com (62.89.126.36) At 2009-01-15 07:15, 

<< Home