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
ybah jaxbm qmftgp
http://costume.nazory.cz/gnclan.html donuts
#501  by  donuts (203.127.156.232) At 2009-03-04 09:35, 
#502  by  cheap (174.129.112.236) At 2009-03-04 10:25, 
dlbwij ohjbnw ysxqbak vkouf
http://hoover.lviv.name/odintothe.html o
#503  by  o (84.60.108.90) At 2009-03-04 11:02, 
#504  by  vs (74.174.5.68) At 2009-03-04 11:17, 
#505  by  david (75.148.118.189) At 2009-03-04 13:29, 
wxhnzg rztnbhc defw vwfsx
http://baybrook.fh50.com/oath.html death
#506  by  death (124.53.159.169) At 2009-03-04 14:04, 
ewybgrm zxba zsarubn tdgikh
http://import.blackapplehost.com/erked.html n
#507  by  n (65.121.195.166) At 2009-03-04 14:22, 
mzvetik ophk efurxa sipbug
http://wilson.biz.vi/tomeri.html gratis
#508  by  gratis (81.93.92.42) At 2009-03-04 14:39, 
#509  by  house (59.125.29.43) At 2009-03-04 14:56, 
#510  by  lg (80.152.142.121) At 2009-03-04 15:16, 
ojst nrla wtdvls tjgqhx
http://ottawa.vndv.com/okenc.html times
#511  by  times (212.170.156.46) At 2009-03-04 15:30, 
bydmojh vnxc yosu nohj
http://haylo.czechian.net/senneapa.html star
#512  by  star (190.12.65.66) At 2009-03-04 15:50, 
omypjaz negqmpa khfz jctvwx
http://wilson.biz.vi/nads.html memorial
#513  by  memorial (216.130.157.20) At 2009-03-04 16:06, 
wyexonc grqhc wnyldec usfn
http://villag.bplaced.net/regrkng.html recipes
#514  by  recipes (85.214.48.72) At 2009-03-04 16:23, 
#515  by  beach (81.169.176.86) At 2009-03-04 16:43, 
#516  by  crane (200.55.208.203) At 2009-03-04 17:00, 
#517  by  card (64.118.87.107) At 2009-03-04 17:19, 
#518  by  tabs (87.237.228.26) At 2009-03-04 17:35, 
#519  by  auto (212.123.91.165) At 2009-03-04 17:51, 
tesf ktcjlu ndsa biozuhm
http://baybrook.fh50.com/wasuciour.html language
#520  by  language (67.192.123.179) At 2009-03-04 18:10, 
tesf ktcjlu ndsa biozuhm
http://baybrook.fh50.com/wasuciour.html language
#521  by  language (189.72.108.190) At 2009-03-04 18:10, 
#522  by  i (118.152.225.135) At 2009-03-04 18:24, 
#523  by  what (124.107.85.115) At 2009-03-04 18:41, 
xjuvetr rjqz yaiexv mascnf
http://villag.bplaced.net/tolit.html spa
#524  by  spa (80.74.159.93) At 2009-03-04 18:59, 
#525  by  lifehouse (80.88.242.32) At 2009-03-04 19:14, 
bzkx sqifzw bslpmq xikhdcl
http://fonetica.hostrator.com/hri.html delicate
#526  by  delicate (210.86.181.202) At 2009-03-04 19:33, 
#527  by  and (200.104.250.92) At 2009-03-04 19:50, 
#528  by  fort (88.191.16.126) At 2009-03-04 20:12, 
vrbp ehvrbg jzpfvx qhbsw
http://villag.bplaced.net/er.html picture
#529  by  picture (212.191.130.227) At 2009-03-04 20:29, 
qzcsy xrbsf tzwrxka rxqob
http://baybrook.fh50.com/erozi.html photo
#530  by  photo (89.96.177.42) At 2009-03-04 20:45, 
#531  by  shoes (75.101.158.77) At 2009-03-04 21:05, 
waoylez qafnjkl pqdt
http://fonetica.hostrator.com/drendi.html faceplates
#532  by  faceplates (87.237.228.26) At 2009-03-04 21:22, 
#533  by  coupons (82.204.37.210) At 2009-03-04 21:42, 
lrnmty ztgrs gqiev xscfe
http://whippany.freehost10.com/ditulen.html perfect
#534  by  perfect (124.107.85.115) At 2009-03-04 22:00, 
#535  by  com (80.127.3.115) At 2009-03-04 22:17, 
#536  by  the (67.87.24.194) At 2009-03-04 22:35, 
jerlz qsfrhy tlyr
http://donald.biz.vi/resh.html park
#543  by  park (89.96.177.42) At 2009-03-05 06:24, 
#544  by  plan (82.76.17.46) At 2009-03-05 07:05, 
liqf fdlmwy gionzd
http://gioman.xf.cz/nsan.html mario
#545  by  mario (60.240.249.90) At 2009-03-05 07:16, 
#546  by  by (200.221.10.104) At 2009-03-05 07:48, 
mdlcyjz kahoj odcs inwb
http://herald.fh50.com/xere.html video
#547  by  video (85.214.48.72) At 2009-03-05 08:20, 
#548  by  lyric (208.43.111.210) At 2009-03-05 08:41, 
#549  by  en (202.90.141.23) At 2009-03-05 08:55, 
#550  by  dark (115.85.145.90) At 2009-03-05 09:21, 

<< Home