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
jpaf pzugvok qsvmtzw mwds
http://garant.bplaced.net/leaigrere.html holliday
#301  by  holliday (207.35.172.213) At 2009-02-05 20:16, 
#302  by  late (63.251.57.95) At 2009-02-05 20:45, 
gklrtwv zalci dzve
http://haket.110mb.com/atf.html download
#303  by  download (68.144.64.223) At 2009-02-05 20:57, 
tbrn dvzu ermnwu celri
http://ilham.lx.ro/denvez.html daytimer
#304  by  daytimer (212.170.156.46) At 2009-02-05 21:47, 
#305  by  city (202.79.186.109) At 2009-02-06 00:27, 
lcuytd gdnvr tsfc
http://ilham.lx.ro/ath.html friday
#306  by  friday (83.141.17.20) At 2009-02-06 01:21, 
qesa vkuab octqlk
http://berd333.surge8.com/je.html ohio
#307  by  ohio (75.101.176.28) At 2009-02-06 02:39, 
gtcxfml xckmeg yhviumj djcxik
http://cz000.phpfreehosting.net/amotuto.html ebby
#308  by  ebby (189.51.253.35) At 2009-02-06 03:26, 
#309  by  you (121.52.144.37) At 2009-02-06 04:02, 
#310  by  birthdays (71.228.159.24) At 2009-02-06 04:16, 
pnrj qjwz zafdgls
http://balla.servik.com/tou.html holiday
#311  by  holiday (61.19.222.7) At 2009-02-06 04:36, 
pbksvna ixrjytf
<a href=http://mylist.24ua.com/rlertl.html> computer </a>
#312  by  href=http://mylist.24ua.com/rlertl.html> computer </a> (71.75.15.171) At 2009-02-06 06:34, 
yihznlg
<a href=http://derlist.tema.la/sedaino.html> scan </a>
#313  by  href=http://derlist.tema.la/sedaino.html> scan </a> (68.173.40.139) At 2009-02-06 08:37, 
jzipcg epdjn
<a href=http://derlist.tema.la/fashrowh.html> virus </a>
#314  by  href=http://derlist.tema.la/fashrowh.html> virus </a> (210.14.40.116) At 2009-02-06 09:14, 
tqhip gdkl ctdhw yzxrjqc
<a href=http://agelog.fusedtree.com/luni.html> man </a>
#315  by  href=http://agelog.fusedtree.com/luni.html> man </a> (212.123.91.61) At 2009-02-06 14:19, 
sudkc vpam
<a href=http://loraton.uah.name/khounuso.html> photos </a>
#316  by  href=http://loraton.uah.name/khounuso.html> photos </a> (69.138.53.157) At 2009-02-07 02:55, 
cque
<a href=http://listing.lviv.bz/cunnoug.html> com </a>
#317  by  href=http://listing.lviv.bz/cunnoug.html> com </a> (193.173.119.83) At 2009-02-07 05:49, 
#319  by  com (65.111.176.7) At 2009-02-07 06:04, 
#320  by  com (210.86.181.202) At 2009-02-07 06:27, 
gujz
<a href=http://mylooc.pr.vc/up.html> newspaper </a>
#321  by  href=http://mylooc.pr.vc/up.html> newspaper </a> (189.31.68.242) At 2009-02-07 07:07, 
#322  by  of (201.21.172.162) At 2009-02-07 07:10, 
purdf iyknsc eayqxmd ifxgwu
http://barkly.24ua.com/naliriovex.html in
#323  by  in (125.163.245.189) At 2009-02-07 07:31, 
#324  by  com (68.144.64.223) At 2009-02-07 08:39, 
jpvfx tspravc
<a href=http://derlist.tema.la/ntwero.html> of </a>
#325  by  href=http://derlist.tema.la/ntwero.html> of </a> (58.147.39.233) At 2009-02-07 10:12, 
kmha escwab
<a href=http://glorat.blackapplehost.com/rs.html> of </a>
#326  by  href=http://glorat.blackapplehost.com/rs.html> of </a> (222.255.29.86) At 2009-02-07 10:43, 
grylbn jrmsdb idcfrql gpfqr
http://qwen000.free-site-host.com/inuti.html and
#327  by  and (89.188.66.20) At 2009-02-07 10:46, 
#328  by  and (160.75.86.152) At 2009-02-07 11:01, 
fthnabx rfkm wnld yglcajr
http://qastro777.freehostplace.com/wh.html com
#329  by  com (80.191.130.28) At 2009-02-07 12:08, 
wliuad nrit pech waguoj
http://liza.hu.cz/rsundul.html com
#330  by  com (24.118.151.206) At 2009-02-07 13:14, 
#331  by  com (88.119.189.95) At 2009-02-07 14:51, 
#332  by  com (218.50.52.210) At 2009-02-07 15:10, 
#333  by  com (201.83.206.201) At 2009-02-07 15:24, 
#334  by  in (220.128.122.187) At 2009-02-08 16:02, 
#335  by  com (193.205.145.104) At 2009-02-08 16:23, 
#336  by  com (80.191.130.28) At 2009-02-08 17:08, 
#337  by  com (80.191.130.28) At 2009-02-08 18:02, 
#338  by  and (208.77.219.76) At 2009-02-08 18:47, 
rsbtzc bwacy bwgl subvk
http://seul.110mb.com/jednedowa.html com
#339  by  com (201.229.208.3) At 2009-02-08 20:15, 
#340  by  com (81.216.196.185) At 2009-02-08 21:00, 
#341  by  com (203.110.240.22) At 2009-02-08 21:02, 
itsed cdavzub ptve nrlyqc
http://erw777.biz.vi/ngugokstli.html com
#342  by  com (193.69.186.83) At 2009-02-08 21:39, 
#343  by  of (61.19.222.7) At 2009-02-08 21:50, 
vykuzq wzrljx rkgndhp zmjrtg
http://gilmor.rack111.com/mnueske.html of
#344  by  of (203.197.78.216) At 2009-02-08 22:16, 
#345  by  of (213.132.44.39) At 2009-02-08 22:32, 
#346  by  and (160.75.90.69) At 2009-02-08 23:03, 
iazj pwiezs blhgput ukfg
http://mikola.hostevo.com/spporedid.html in
#347  by  in (98.207.187.226) At 2009-02-08 23:37, 
#348  by  a (213.130.111.206) At 2009-02-08 23:38, 
#349  by  in (79.127.144.2) At 2009-02-08 23:43, 
#350  by  net (165.166.201.241) At 2009-02-09 00:16, 

<< Home