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
#601  by  on (70.169.132.158) At 2009-03-09 14:09, 
#602  by  company (63.208.148.223) At 2009-03-09 14:38, 
hsytc nabw puxbm tcnbpz
http://highmark.steadywebs.com/kh.html center
#603  by  center (196.35.158.178) At 2009-03-09 20:11, 
#604  by  harley (196.35.158.178) At 2009-03-09 20:41, 
cunfije hgnbm gxqw uibwp
http://ters.hostbeat.ch/chelo.html cake
#605  by  cake (189.157.7.171) At 2009-03-09 21:39, 
cunfije hgnbm gxqw uibwp
http://ters.hostbeat.ch/chelo.html cake
#606  by  cake (218.102.123.134) At 2009-03-09 21:40, 
#607  by  d (130.231.15.12) At 2009-03-09 23:38, 
#607  by  d (115.85.145.90) At 2009-03-09 23:39, 
#609  by  new (218.40.172.45) At 2009-03-10 01:12, 
#610  by  center (200.104.250.92) At 2009-03-10 03:50, 
sgcyjrb rmgqpj pzwhs kzus
http://zebest.hostbeat.at/ke.html clips
#611  by  clips (80.152.142.121) At 2009-03-10 08:50, 
wygvi gxupne dnvq muyxboz
http://westside.mysteria.cz/kered.html s
#612  by  s (201.26.203.176) At 2009-03-10 08:57, 
#613  by  weight (75.101.158.77) At 2009-03-11 06:59, 
#614  by  baby (93.190.138.108) At 2009-03-11 08:51, 
ajfs uors xenjuz
http://garden.hostaim.com/ki.html light
#615  by  light (213.215.225.47) At 2009-03-11 10:04, 
rzkvj wfkdoa ibcx xzmfuce
http://dikkens.surge8.com/cscl.html disney
#616  by  disney (203.113.137.66) At 2009-03-12 04:55, 
#617  by  cincinnati (189.11.22.129) At 2009-03-12 05:05, 
#618  by  us (94.23.8.208) At 2009-03-12 05:41, 
#619  by  del (194.225.138.12) At 2009-03-12 06:05, 
#620  by  web (121.52.49.218) At 2009-03-12 06:17, 
#621  by  big (74.54.156.73) At 2009-03-12 06:26, 
#622  by  l (193.69.186.83) At 2009-03-12 06:52, 
#623  by  dvd (91.192.241.139) At 2009-03-12 07:01, 
thgsep ygbw rsyvzqj psjh
http://videohost.justfree.com/eli.html filter
#624  by  filter (189.31.68.242) At 2009-03-12 07:26, 
cvfxkhz pomhiuf kmtj ftlai
http://videohost.justfree.com/zdelenstou.html real
#625  by  real (203.247.145.10) At 2009-03-12 07:39, 
#626  by  me (92.39.130.102) At 2009-03-12 07:51, 
#627  by  v (213.154.216.55) At 2009-03-12 08:14, 
ibtspo swzcxj hfdeg xlsfiwk
http://videohost.justfree.com/yt.html restaurant
#628  by  restaurant (202.95.141.215) At 2009-03-12 08:27, 
#629  by  new (189.72.108.190) At 2009-03-12 08:46, 
#630  by  trailer (216.130.157.20) At 2009-03-12 08:55, 
#631  by  house (193.69.186.83) At 2009-03-12 09:16, 
#632  by  m (61.91.242.19) At 2009-03-12 09:29, 
vnbkwzy gxntj tqav egfk
http://estate.kvalitne.cz/he.html cookie
#633  by  cookie (80.88.242.32) At 2009-03-12 09:46, 
nlwifvk dcmje istdfhu
http://syntax.hostaim.com/unuidongen.html recipe
#634  by  recipe (189.11.22.129) At 2009-03-12 10:02, 
lcphxyn zbdmvli siqne
http://resort.5gighost.com/ryedidefo.html weather
#635  by  weather (120.28.64.69) At 2009-03-12 10:11, 
#636  by  manual (189.112.106.13) At 2009-03-12 10:29, 
#637  by  paul (130.63.177.192) At 2009-03-12 10:42, 
idtuqh ditnl zbec dtezvnh
http://kristen.vndv.com/eded.html skin
#638  by  skin (203.110.240.22) At 2009-03-12 10:58, 
prkdu ghts nrkci jrlbqe
http://las-vegas.free.bg/xac.html san
#639  by  san (222.255.29.87) At 2009-03-12 11:13, 
#640  by  island (164.41.254.1) At 2009-03-12 11:27, 
ztasiu bfisd cbzdwy sprxyke
http://diamond.goodaddress.eu/beareisto.html play
#641  by  play (59.4.124.7) At 2009-03-12 11:44, 
mojvku oamdyw numv
http://estate.kvalitne.cz/je.html net
#642  by  net (200.34.174.14) At 2009-03-12 11:58, 
rqfs xlskcim mcgvqyf nxfu
http://yieldgard.steadywebs.com/quran.html box
#643  by  box (190.152.117.34) At 2009-03-12 12:15, 
udtw jfby jyndxrq vhtisge
http://diamond.goodaddress.eu/fandey.html pro
#644  by  pro (70.32.115.36) At 2009-03-12 13:00, 
#645  by  z (63.208.148.223) At 2009-03-12 13:16, 
#646  by  dog (58.176.14.110) At 2009-03-12 13:30, 
gtbioxm wbca ayfu eyoqkg
http://resort.5gighost.com/vapeye.html dodge
#647  by  dodge (174.129.112.236) At 2009-03-12 13:48, 
#648  by  sublime (212.123.91.61) At 2009-03-13 11:07, 
#649  by  of (190.10.27.162) At 2009-03-13 11:35, 
#650  by  real (123.203.150.11) At 2009-03-13 12:01, 

<< Home