Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-18-2008, 03:08 PM   #1
Sunn Sunn
Member
Sunn Sunn began at the beginning.
 
Posts: 13
Karma: 11
Join Date: Aug 2007
Device: iLiad
Please, help me with simple compiling first steps

I'm trying to compile evkb.c for the iLiad. I've followed the steps in this scratchbox tutorial and I'm inside the scratchbox environment now. As per my (mis?)understanding of Thomas' tips here I apt-get source libxext-dev on my non-scratchbox, regular environment, copied the source directory to my scratchbox environment and compiled it there, running autogen.sh, make, and make install which seemed to copy the libraries to the include directories.

I've changed evkb's Makefile to just say gcc which does seem to resolve to the proper cross compiler when I call make from within scratchbox. The problem is that the linker cannot find -lXtst. What should I do?

Did I miss some steps? I don't understand the dependencies-helper shell scripts and how to use them. There's a lot for me to learn when it comes to porting stuff to the iLiad. Would you please help me?
Sunn Sunn is offline   Reply With Quote
Old 07-18-2008, 05:02 PM   #2
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by Sunn Sunn View Post
I've changed evkb's Makefile to just say gcc which does seem to resolve to the proper cross compiler when I call make from within scratchbox. The problem is that the linker cannot find -lXtst. What should I do?
Try searching for libXtst*,
[sbox-iliad: ~] > find / -name "libXtst*" 2>/dev/null

If you find it (i.e in /usr/local/lib/libXtst.so), search for the place where -lXtst is written and add -L/path/to/the/library (i.e. -L/usr/local/lib -lXtst).

Quote:
Originally Posted by Sunn Sunn View Post
Did I miss some steps? I don't understand the dependencies-helper shell scripts and how to use them. There's a lot for me to learn when it comes to porting stuff to the iLiad. Would you please help me?
Using the dependencies-helper scripts, you would install the Xtst library with:

[sbox-iliad: ~] > ./dl-and-install.sh libXtst.so

Basically you put as a parameter of the script the name of the file you want t have generated. Sometimes it fails because there are a lot of matches and the script is not very smart; in those cases you put some of the path leading to that file (but omitting the first / of the path), for example: ./dl-and-install sbin/etherwake

P.S.: I changed today the wiki page you mentioned because I've just updated a fixed version of the dependencies-helper scripts. Check that you have downloaded dependencies-helper_20080718-1.tar.gz or repeat the step 11 of the howto to be sure you have the correct version. The old one doesn't work anymore.

P.S.2: You may find easier to use the VMWare image that Adam prepared. It is the sticky thread in the iliad developer forum. It has a lot of commonly used libraries compiled and included in the image's scratchbox environment.

Last edited by Antartica; 07-18-2008 at 05:07 PM. Reason: grammar/sp.
Antartica is offline   Reply With Quote
Advert
Old 07-18-2008, 06:30 PM   #3
Sunn Sunn
Member
Sunn Sunn began at the beginning.
 
Posts: 13
Karma: 11
Join Date: Aug 2007
Device: iLiad
Quote:
Originally Posted by Antartica View Post
Try searching for libXtst*,
[sbox-iliad: ~] > find / -name "libXtst*" 2>/dev/null

If you find it (i.e in /usr/local/lib/libXtst.so), search for the place where -lXtst is written and add -L/path/to/the/library (i.e. -L/usr/local/lib -lXtst).
Yeah, that must've been my problem; I hadn't installed it properly because I can't find it.
At first, it didn't run because I had incorrect mmap settings, then I had problems resolving hosts that a
Code:
cp /scratchbox/etc/resolv.conf /etc/resolv.conf
fixed.
Code:
apt-get update
still doesn't work so well and libXts seems to have missing dependencies. I thought of using apt-get build-dep but I have problems stating things on debian.org now. It's time for bed.

Quote:
Using the dependencies-helper scripts, you would install the Xtst library with:
Ah! It searches on packages.debian.org! Very clever.

Quote:
P.S.: I changed today the wiki page you mentioned because I've just updated a fixed version of the dependencies-helper scripts. Check that you have downloaded dependencies-helper_20080718-1.tar.gz or repeat the step 11 of the howto to be sure you have the correct version. The old one doesn't work anymore.
I was in luck because I followed that part of the tutorial today, including getting the 20080718 version. BTW, now the wiki page has a different tarball for the tar xzf command, it doesn't reflect the updated wget command.

Quote:
P.S.2: You may find easier to use the VMWare image that Adam prepared. It is the sticky thread in the iliad developer forum. It has a lot of commonly used libraries compiled and included in the image's scratchbox environment.
Thank you! I don't have VMWare, so I'll have to stick it out with a scratchbox environment for unix.
Sunn Sunn is offline   Reply With Quote
Old 07-19-2008, 06:08 AM   #4
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by Sunn Sunn View Post
Code:
apt-get update
still doesn't work so well and libXts seems to have missing dependencies. I thought of using apt-get build-dep but I have problems stating things on debian.org now. It's time for bed.
I didn't test the scratchbox environment for apt-get use, so it may have a lot of missing steps to get that working.

Quote:
Originally Posted by Sunn Sunn View Post
¡Ah! It searches on packages.debian.org! Very clever.
Yep. The script connects to packages.debian.org to search for the file you request, then it downloads the source package from debian and tries to apply the debian patches on it. Finally, it attempts a configure/make/makeinstall.

Quote:
Originally Posted by Sunn Sunn View Post
I was in luck because I followed that part of the tutorial today, including getting the 20080718 version. BTW, now the wiki page has a different tarball for the tar xzf command, it doesn't reflect the updated wget command.
Fixed.

Quote:
Originally Posted by Sunn Sunn View Post
Thank you! I don't have VMWare, so I'll have to stick it out with a scratchbox environment for unix.
Having it working natively is more convenient (as a matter of fact, I don't use myself the vmware image for iliad development), but compiling/packaging vmware on debian (etch) is not that hard; I used vmware-package to do it (although I had to backport the one in sid to get it working correctly). It finally obtained the following (the vmdk.zip is from somewhere else, and the howto.txt is a remind for myself):
Code:
$ ls -l
total 87236
-r--r--r-- 1 user  user       241 2007-09-29 12:57 howto.txt
-r--r--r-- 1 user  user     20938 2007-09-06 10:09 vmdk.zip
-r--r--r-- 1 user  user  10848972 2007-09-06 13:44 vmware-bin_2.0.0.45731.0_i386.deb
-r--r--r-- 1 user  user    777328 2007-09-06 13:44 vmware-common_2.0.0.45731.0_all.deb
-r--r--r-- 1 user  user    299632 2007-09-06 13:44 vmware-kernel-source_2.0.0.45731.0_all.deb
-r--r--r-- 1 user  user  10183044 2007-09-06 13:44 vmware-lib_2.0.0.45731.0_i386.deb
-r--r--r-- 1 user  user     24650 2007-09-06 13:32 vmware-package_0.14_all.deb
-r--r--r-- 1 user  user      1142 2007-09-06 13:44 vmware-player_2.0.0.45731.0_i386.changes
-r--r--r-- 1 user  user    608394 2007-09-06 13:44 vmware-player_2.0.0.45731.0_i386.deb
-r--r--r-- 1 user  user  66424421 2007-09-06 11:07 VMware-player-2.0.0-45731.i386.tar.gz
$
The contents of the howto.txt reminder are instructions on what to do with the kernel modules:
Code:
$ cat howto.txt 
module-assistant build vmware-kernel-source
dpkg -i vmware-kernel-modules-2.6.18-4-686_2.0.0.45731.0+2.6.18.dfsg.1-12etch2_i386.deb 
mkdir /var/local/vmware
chmod 777 /var/local/vmware/
mkdir -p /usr/lib/vmware/licenses/site
vmware-acetool 
$
Hope that helps to get you started if you want to give it a try.

Last edited by Antartica; 07-19-2008 at 06:11 AM.
Antartica is offline   Reply With Quote
Old 07-21-2008, 11:47 AM   #5
Sunn Sunn
Member
Sunn Sunn began at the beginning.
 
Posts: 13
Karma: 11
Join Date: Aug 2007
Device: iLiad
Code:
../dl-and-install.sh libXtst.so
No package 'recordproto' found. How would you do in situations like these? You want to compile something, that something needs libraries, and so on? It's easy to do on my "real" OS, but the multiple levels of indirection with Scratchbox has my head spinning - there's the host OS, the scratchbox environment, and then the environment on the iliad itself.
Sunn Sunn is offline   Reply With Quote
Advert
Old 07-21-2008, 03:49 PM   #6
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by Sunn Sunn View Post
Code:
../dl-and-install.sh libXtst.so
No package 'recordproto' found. How would you do in situations like these? You want to compile something, that something needs libraries, and so on? It's easy to do on my "real" OS, but the multiple levels of indirection with Scratchbox has my head spinning - there's the host OS, the scratchbox environment, and then the environment on the iliad itself.
When something talks about packages in a configure or makefile, it refers to pkgconfig .pc files.

For that, it suffices to do an
Code:
./dl-and.install.sh recordproto.pc
If it complains about a .h or something like that, then explore packages.debian.org and find what it is referring to, and when you have found it, go to the "list-files" that is besides the arm link to download and pick one file from there as a parameter for the dl-and-install script (without the leading /, or the script will not work).

About the levels of "indirection", there are really only two environments in that setup: your host OS and the scratchbox one. In the scratchbox you have installed the iliad libraries without development headers, so when you need to compile something that depends on a library, you need to have compiled/installed tht library on the scratchbox environment, so really the iliad part is only there for the liberm.so/liberipc.so libraries and for testing purposes.

That is very different from the maemo development environment (where scratchbox was born, IIRC), where you have a full debian environment inside scratchbox and you simply apt-get the things you need, AFAIK.
Antartica is offline   Reply With Quote
Old 07-22-2008, 09:11 AM   #7
Sunn Sunn
Member
Sunn Sunn began at the beginning.
 
Posts: 13
Karma: 11
Join Date: Aug 2007
Device: iLiad
Seems to be working.
I'm working on a little summary on the steps I've taken so far, but meanwhile I just wanted to alert you to a little bug in dl-and-install.sh; namely that lynx breaks the line on long paths so the grep never finds a num.

I just edited the script and changed "lynx -dump blablabla" to "lynx -width 300 blablabla" as a temporary workaround but maybe a better workaround would be just wget/curl dl the html-file and work with the html instead of a rendered version.

Thanks for all your help so far, I'm still making progress.
Sunn Sunn is offline   Reply With Quote
Old 07-22-2008, 04:11 PM   #8
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by Sunn Sunn View Post
Seems to be working.
I'm working on a little summary on the steps I've taken so far, but meanwhile I just wanted to alert you to a little bug in dl-and-install.sh; namely that lynx breaks the line on long paths so the grep never finds a num.

I just edited the script and changed "lynx -dump blablabla" to "lynx -width 300 blablabla" as a temporary workaround but maybe a better workaround would be just wget/curl dl the html-file and work with the html instead of a rendered version.
Can you test if the attached version works for the search that was causing you trouble?

This one tries to do it parsing the source html, as you suggested.
Attached Files
File Type: gz dl-and-install.sh_20080722-1.tar.gz (139 Bytes, 450 views)
Antartica is offline   Reply With Quote
Reply

Tags
evkb, gcc, scratchbox, xtest

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
erm, simple question , hope for simple answer! al zymers Amazon Kindle 5 09-25-2010 01:01 PM
Problems compiling unkilbeeg Sigil 1 09-13-2009 01:49 PM
Simple question for a simple mind :) PKFFW OpenInkpot 6 08-27-2009 09:00 PM
iLiad compiling Minimo jtq iRex Developer's Corner 11 09-03-2007 05:33 AM
PRS-500 Compiling for the Reader alex_d Sony Reader Dev Corner 29 07-15-2007 12:29 PM


All times are GMT -4. The time now is 08:11 AM.


MobileRead.com is a privately owned, operated and funded community.