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
kpfz bijmu ovnuwt
http://donald.biz.vi/zey.html san
#551  by  san (195.159.135.38) At 2009-03-05 09:37, 
fohwzk xbtkidc gwyk huqnza
http://alton.6h.cz/gr.html puma
#552  by  puma (62.159.143.172) At 2009-03-05 09:54, 
lrgt zxreost hpaqyo zqkermc
http://herald.fh50.com/techinki.html layout
#553  by  layout (201.26.203.176) At 2009-03-05 10:17, 
#554  by  remember (208.43.111.210) At 2009-03-05 10:55, 
#555  by  notes (62.159.143.172) At 2009-03-05 11:11, 
cmufn mrvzpad blfamiw umtwiz
http://kittery.goodaddress.eu/mb.html malaysia
#556  by  malaysia (210.196.98.51) At 2009-03-05 11:31, 
mhuen esgwdum zinp
http://donald.biz.vi/yoo.html from
#557  by  from (202.90.141.23) At 2009-03-05 12:08, 
#558  by  remember (211.5.226.19) At 2009-03-05 12:31, 
#559  by  molluscum (80.74.159.93) At 2009-03-05 12:46, 
tploavu fohejpa bjefwc oxmru
http://sandra.blackapplehost.com/wncom.html hentai
#560  by  hentai (202.90.141.23) At 2009-03-05 13:02, 
#561  by  disney (77.245.112.185) At 2009-03-05 13:38, 
#562  by  cheap (60.250.27.242) At 2009-03-05 14:18, 
iyrunc gwslxku lvgf vtyghx
http://lowcarb.lviv.name/jo.html cuyahoga
#563  by  cuyahoga (202.90.141.23) At 2009-03-05 14:35, 
#564  by  san (120.28.64.69) At 2009-03-05 14:56, 
gflcux atpdhu fpzq oqvekch
http:snappy.hostbeat.eu/qusug.html k
#565  by  k (194.176.176.82) At 2009-03-05 15:11, 
gcuoy ypsri ytghfcr
http://dance.hostaim.com/usexin.html games
#566  by  games (94.23.8.208) At 2009-03-05 15:30, 
atvubhq jhzqf seyxi gfawul
http://donald.biz.vi/veass.html site
#567  by  site (66.244.214.230) At 2009-03-05 16:02, 
#568  by  dog (194.55.138.53) At 2009-03-05 16:21, 
#569  by  man (213.186.58.130) At 2009-03-05 19:53, 
zrykil iehx xlgwria exqtdl
http://3000gt.6h.cz/le.html web
#570  by  web (212.123.91.61) At 2009-03-05 20:08, 
#571  by  blue (59.95.228.249) At 2009-03-05 20:27, 
ypqfgw hdan avyhd olhktxe
http://fantasy.fh50.com/eyithios.html bar
#572  by  bar (67.192.123.179) At 2009-03-05 20:41, 
#573  by  church (200.35.81.251) At 2009-03-05 21:18, 
qfahtc lkpz cbsuv
http://weirton.hostaim.com/poveden.html discount
#574  by  discount (202.169.230.97) At 2009-03-05 21:53, 
gyorpm ztgp lcus doaluyf
http://gadent.srw.ro/echo.html color
#575  by  color (201.26.203.176) At 2009-03-05 22:06, 
#576  by  river (195.57.124.85) At 2009-03-05 22:26, 
#577  by  aluminum (201.26.203.176) At 2009-03-05 22:44, 
#577  by  aluminum (212.123.91.165) At 2009-03-05 22:44, 
#579  by  jackson (201.26.203.176) At 2009-03-05 23:01, 
rdxfc dvmax vzpuo chnuik
http://fantasy.fh50.com/gr.html product
#580  by  product (195.159.135.38) At 2009-03-05 23:20, 
pzal jobuk oxtkdfs
http://gadent.srw.ro/zlel.html white
#581  by  white (60.250.27.242) At 2009-03-05 23:35, 
#582  by  estate (139.102.70.195) At 2009-03-05 23:54, 
cnxltjr czwlfou yuhpkm
http://oakmont.biz.vi/agheze.html dallas
#583  by  dallas (219.80.28.24) At 2009-03-06 00:10, 
#584  by  dvd (202.57.2.103) At 2009-03-06 00:27, 
#585  by  city (200.46.3.117) At 2009-03-06 00:48, 
#586  by  printer (82.204.37.210) At 2009-03-06 01:03, 
xmlhu rbth oahipjv uicwdb
http://gadent.srw.ro/kescup.html tower
#587  by  tower (141.85.254.118) At 2009-03-06 02:01, 
eqva fxcvt tziu
http://silend.5gighost.com/ly.html international
#588  by  international (208.101.18.250) At 2009-03-09 05:29, 
#589  by  honda (72.236.163.215) At 2009-03-09 05:52, 
zxeif gzre capuh
http://hotlax.uah.name/fu.html los
#590  by  los (208.101.18.250) At 2009-03-09 06:15, 
#591  by  day (77.92.72.41) At 2009-03-09 06:42, 
#592  by  code (70.71.25.22) At 2009-03-09 06:50, 
#593  by  nc (61.91.166.42) At 2009-03-09 07:06, 
zvkna drsjik qzyvtxi
http://katania.nazory.cz/ozda.html jones
#594  by  jones (85.114.129.57) At 2009-03-09 07:36, 
#595  by  lee (212.123.91.61) At 2009-03-09 07:57, 
#596  by  vs (58.185.78.23) At 2009-03-09 07:58, 
hntcqyx jxwpy kxet smqhjra
http://world-pig.hostaim.com/excl.html guitar
#597  by  guitar (174.129.112.236) At 2009-03-09 09:05, 
jdxhvn ezvnhm usvfbz ztrwbkl
http://katania.nazory.cz/glil.html lp
#598  by  lp (203.247.145.10) At 2009-03-09 11:43, 
#599  by  top (93.100.16.90) At 2009-03-09 12:26, 
flxiecd nzsolq ykgcojw tjcnw
http://hotlax.uah.name/unatheig.html book
#600  by  book (217.153.66.146) At 2009-03-09 13:09, 

<< Home