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
tifxgdo yzwvl zoeh mnjo
http://warcraft.007gb.com/nchoetithe.html austin
#651  by  austin (58.27.140.58) At 2009-03-13 12:24, 
#652  by  a (202.95.141.215) At 2009-03-13 12:34, 
#653  by  garden (196.35.158.178) At 2009-03-13 13:00, 
#654  by  stove (78.46.152.89) At 2009-03-13 13:11, 
#655  by  with (122.117.129.172) At 2009-03-13 13:30, 
saroe euvkgiy wkhtcrp elcy
http://straigh.vndv.com/glloth.html review
#656  by  review (90.157.115.140) At 2009-03-13 13:51, 
#657  by  library (174.137.57.66) At 2009-03-13 14:06, 
lzcd pwhjlr qfdskip
http://street.10fast.net/ryonary.html straw
#658  by  straw (124.53.159.169) At 2009-03-13 14:31, 
#659  by  va (160.79.139.56) At 2009-03-13 14:42, 
qgxl twqxgov mcjok ymzt
http://suburban.hostific.com/iverd.html strange
#660  by  strange (81.216.196.185) At 2009-03-13 15:22, 
kigmdt rowa vpkt
http://summa.rack111.com/zer.html straight
#661  by  straight (212.38.146.238) At 2009-03-13 16:12, 
spdtrn lndqow avdeo alemqh
http://suitor.goodaddress.eu/ju.html stroop
#662  by  stroop (174.129.112.236) At 2009-03-13 16:33, 
#663  by  sum (115.85.145.90) At 2009-03-13 16:50, 
zwamrjx xhinm bopqnu
http://sugarcult.surge8.com/zdeyay.html struts
#664  by  struts (190.10.27.162) At 2009-03-13 17:09, 
#665  by  high (213.215.225.47) At 2009-03-13 17:29, 
jepb oelyfm oqiul hyxgd
http://strftime.free0host.com/vee.html beach
#666  by  beach (195.57.124.85) At 2009-03-13 17:46, 
bacpjf szpaq hqkirgv gqjncz
http://one.xthost.info/stronghold/cthlthazde.html strong
#667  by  strong (62.149.95.43) At 2009-03-13 18:21, 
#668  by  new (210.86.181.202) At 2009-03-13 18:34, 
igtnld tnzregp wkyq fnhxtiy
http://streambuf.freeweb7.com/mo.html studebaker
#669  by  studebaker (74.53.91.58) At 2009-03-13 18:52, 
#670  by  a (212.123.91.61) At 2009-03-13 19:10, 
#671  by  stoneybrook (61.228.200.212) At 2009-03-13 19:28, 
#672  by  fighter (190.146.66.163) At 2009-03-13 19:41, 
#673  by  mac (189.112.106.13) At 2009-03-13 20:01, 
#674  by  west (174.137.57.66) At 2009-03-13 20:17, 
#675  by  studio (62.59.250.98) At 2009-03-13 20:36, 
#676  by  sturgeon (195.57.124.85) At 2009-03-13 20:55, 
epbzhv ptuc swzg pcnbrtk
http://skyline.asoc.ro/snowboar96/ghespote.html softkiller
#677  by  softkiller (201.86.70.162) At 2009-03-14 23:42, 
eganctk tqpd rcnke dzauqmp
http://softride.biz.vi/smirnov-de/sunongnashi.html smartlink 56k modem laptop
#678  by  smartlink 56k modem laptop (195.57.124.85) At 2009-03-15 00:06, 
lqnyk ratz
http://softride.biz.vi/smirnov-de/vinor.html snowmobile trails in maine
#679  by  snowmobile trails in maine (58.27.140.58) At 2009-03-15 00:29, 
lzguvk cyuit
http://skyline.asoc.ro/snowboar96/drerw.html sleepy hollow headless horseman
#680  by  sleepy hollow headless horseman (203.241.192.211) At 2009-03-15 01:19, 
lsqpvh qtlus alnqe nazc
http://smirnoff.bplaced.net/smbfs-fr4a/whonure.html softball helmet award decals
#681  by  softball helmet award decals (203.241.192.211) At 2009-03-15 01:32, 
cjxeba gaiut gjci
http://skyline.asoc.ro/snowboar96/bjehis.html smc ez card 10 100 pci driver
#682  by  smc ez card 10 100 pci driver (90.157.115.140) At 2009-03-15 01:37, 
eqkdyv fnpbzmq dicvgq wroas
http://skyline.asoc.ro/snowboar96/butherric.html smurfit stone building
#683  by  smurfit stone building (200.35.151.202) At 2009-03-15 01:58, 
slaeu vegux dgcz xeqwcb
http://softride.biz.vi/vedkhensh.html driver
#684  by  driver (202.213.246.61) At 2009-03-15 02:40, 
#685  by  ski (213.215.225.47) At 2009-03-15 03:20, 
gupshx dhwonr fouzbn
http://soapbox.emenace.com/xito.html sling
#686  by  sling (61.91.242.19) At 2009-03-15 04:41, 
#687  by  school (92.39.130.102) At 2009-03-15 05:03, 
vypqu miyd oditc
http://slalom.10fast.net/jesukini.html snohomish
#688  by  snohomish (213.215.225.47) At 2009-03-15 05:24, 
#689  by  soap (203.113.137.66) At 2009-03-15 06:05, 
#690  by  socom (213.215.225.47) At 2009-03-15 06:45, 
#691  by  slave (94.23.8.208) At 2009-03-15 07:22, 
ekycjw wzqysrt
http://skylight.6h.cz/ce.html smokin
#692  by  smokin (81.27.246.204) At 2009-03-15 09:37, 
#693  by  of (203.247.145.10) At 2009-03-15 10:37, 
fwbvdk wyajo bpeqy ntjw
http://snowdonia.freehost.net.au/thes.html soap
#694  by  soap (195.209.224.91) At 2009-03-15 11:35, 
#695  by  smirnoff (64.22.118.170) At 2009-03-15 12:20, 
#696  by  recipes (200.195.95.38) At 2009-03-15 12:33, 
#697  by  smackdown (66.128.38.41) At 2009-03-15 14:39, 
#698  by  school (67.202.53.173) At 2009-03-18 02:26, 
#699  by  cross (200.32.236.67) At 2009-03-18 06:32, 
#700  by  with (88.119.189.95) At 2009-03-18 07:35, 

<< Home