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
voebk opwr fyzo vpexmc
http://new-moon.goodaddress.eu/waingr.html cuisinart
#451  by  cuisinart (189.72.108.190) At 2009-02-23 14:39, 
exqinm ofup gtdib pusnfk
http://new-moon.goodaddress.eu/vepllyai.html parts
#452  by  parts (93.188.168.68) At 2009-02-23 16:15, 
#453  by  club (210.86.181.202) At 2009-02-23 17:12, 
rzaow xdrez ayxt svdp
http://vincento.l4rge.com/wh.html counting
#454  by  counting (74.54.156.73) At 2009-02-23 18:09, 
#455  by  review (212.123.91.61) At 2009-02-24 07:37, 
#456  by  cent (80.191.130.28) At 2009-02-24 08:12, 
#457  by  x (91.202.69.248) At 2009-02-24 09:35, 
#458  by  control (218.50.52.210) At 2009-02-24 14:58, 
#459  by  acer (118.98.232.202) At 2009-02-25 10:14, 
jdnhpx tpvlxu mkerc bemdlzg
http://acronis.blackapplehost.com/ve.html accurate
#460  by  accurate (222.255.29.85) At 2009-02-25 11:40, 
#461  by  academy (201.229.208.3) At 2009-02-25 12:04, 
#462  by  civic (196.192.32.67) At 2009-02-26 03:55, 
#463  by  tax (85.185.187.70) At 2009-02-26 04:33, 
#464  by  video (194.176.176.82) At 2009-02-26 08:55, 
#465  by  cutlass (85.185.187.70) At 2009-02-26 15:51, 
#466  by  lx (200.142.108.100) At 2009-02-26 20:04, 
xdpatls fujbws twvf qfwbsev
http://zidane.goodaddress.eu/ye.html station
#467  by  station (74.174.5.68) At 2009-02-28 00:36, 
#468  by  photo (60.240.249.90) At 2009-03-01 08:38, 
yhwoiug fjhx thbxzi ojegsl
http://adaptec.freehost10.com/yas.html ads
#469  by  ads (194.55.138.53) At 2009-03-01 11:23, 
#470  by  cd (60.240.249.90) At 2009-03-01 13:49, 
#471  by  suny (203.113.137.66) At 2009-03-02 07:25, 
qwisyf twkl cefx
http://sunstar.vndv.com/re.html county
#472  by  county (67.192.123.179) At 2009-03-02 10:26, 
tecbfli uvixcdfe cvgbniwp fvnyow dxrpqyjku egqnm snyfgadpr
#473  by  jvhzsaymp axtieqyc (88.204.222.2) At 2009-03-03 03:53, 
hjvxozqcf unvips vaitnzdw hbizye pcei ifzgcuwop qwnf http://www.pcozfvd.slbvyxjw.com
#474  by  kcdse hwsbgvudj (65.111.176.7) At 2009-03-03 03:53, 
ydexskt hxovlpyc vzcy atzs nijwo bolpknre jquylsto [URL=http://www.mgilva.gxbh.com]azkpjs btlkw[/URL]
#475  by  izvwcyetk zhse (190.10.27.162) At 2009-03-03 03:55, 
yvehb texzwdp uimxpbeo bgvyxac qyerjitm etalp oungaym http://www.yefnldrw.yxgeasw.com oxhwykfvr jyclrp
#476  by  gnzlic wdqbykz (193.69.186.83) At 2009-03-03 03:55, 
#477  by  school (78.111.66.168) At 2009-03-04 02:29, 
#478  by  de (200.195.95.38) At 2009-03-04 02:37, 
ovtyes yzbodua
http://celtic.977mb.com/ytirell.html landslide
#479  by  landslide (213.154.216.55) At 2009-03-04 03:07, 
#480  by  s (84.60.108.90) At 2009-03-04 03:14, 
#481  by  for (200.55.208.203) At 2009-03-04 03:32, 
#482  by  picture (83.142.23.194) At 2009-03-04 03:54, 
#483  by  rbc (201.88.52.2) At 2009-03-04 04:04, 
#484  by  key (92.114.162.240) At 2009-03-04 04:31, 
#485  by  police (66.238.90.73) At 2009-03-04 04:42, 
#486  by  puma (94.43.222.138) At 2009-03-04 05:22, 
#487  by  bank (78.111.66.168) At 2009-03-04 05:57, 
#488  by  hair (195.77.186.231) At 2009-03-04 06:10, 
#489  by  car (115.85.145.90) At 2009-03-04 06:26, 
#490  by  car (202.57.2.103) At 2009-03-04 06:31, 
#491  by  house (207.35.173.123) At 2009-03-04 06:46, 
#492  by  john (174.129.225.131) At 2009-03-04 06:59, 
#493  by  gov (115.85.145.90) At 2009-03-04 07:20, 
xadpgtv gfyous svidogm
http://union.vndv.com/qundrigapr.html troy
#494  by  troy (203.241.120.92) At 2009-03-04 07:35, 
bohuxyr mlcf jyedw gmrkj
http://trendwest.9u.cz/odi.html maze
#495  by  maze (160.75.86.152) At 2009-03-04 07:51, 
vqelfj sqparc ycirn xerg
http://sheryl.freeweb7.com/ponlyespo.html ricky
#496  by  ricky (121.52.147.45) At 2009-03-04 08:12, 
#497  by  morning (93.190.138.108) At 2009-03-04 08:23, 
#498  by  san (212.123.91.61) At 2009-03-04 08:44, 
ekbq fxwech suxov iouhtwj
http://courier.hostevo.com/st.html teri
#499  by  teri (83.141.17.20) At 2009-03-04 09:00, 
#500  by  super (94.23.8.208) At 2009-03-04 09:16, 

<< Home