OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: omega on November 05, 2004, 08:53:29 am
-
Hi, I started another thread months ago about compiling stuff under Cacko but here we go for pdaxrom (current version RC5)
I have compiling some things easily with the dev img... However other stuff seems to want an endless stream of depends that always want something else as well!
My first tip to us all that want to compile but just need some tips is from one of lardmans posts:
Octave is actually very easy to compile (no configure switches required other than --host=arm-linux; needs GCC 3.xx though), so assuming you have a pdaXrom toolchain setup go for it. The OZ version won't work for you as it uses a later version of libc.
I was not aware of the --host=arm-linux requirement.
I think that anyone else with tips / problems should post together making it easier for us all to become familiar with the problems that arise and their template solutions thus creating a wider availability of compiled programs for all. If a body of information develops here, i suggest that it then be turned into a FAQ. If such a faq exists, i apologise and could i humbly be pointed in the direction of such!
-
i'd like to have that info as well. i've never tried to compile anything for the zaurus before, and i'd really like to get evolution compiled to see if it's feasible to be running it on the z. so please give us any tips and pointers you have.
philo
-
Actually the --host=arm-linux is only needed to cross-compile (perhaps I misread the thread where I originally replied).
Octave should compile natively without any configure switches.
Si
-
Ah. I'm having problems with no mkoctfile.... where do i get? I found it before somewhere.
Another tip to people: i used to use my sd card for compiling stuff (vfat)... today i'm using a samba share to my windows 2000 machine. Let's me keep a load of stuff there...
-
Ah. I'm having problems with no mkoctfile.... where do i get? I found it before somewhere.
It comes in the tarball (or is created by the configure script or main Makefile).
Si
Edit: I just read that you're using a Windows machine to hold the files - I wonder if you're actually having a permissions problem, mkoctfile should be in the same directory as the configure script.
-
Lardman - sorry i was using an older version of octave. got 2.1.57.... it configures without a problem. says found f2c but not libf77.a?
when i type make then it craps out immediately.. What options can i pass to make??
got readline installed...
I went to make bison for it, that wants m4, when i go to compile m4 it wants autoconf, when i go to compile autoconf it wants m4.... yawn -please help.
-
bison is in the stable feed ... (m4 also)
-
pgas - i thought that too...
but neither are listed under www.pdaxrom.org/feed
/unstable
or in the website list....
-
they are on the stable feed:
here
http://zaurus.spy.org/feeds/cacko/pdaXrom/1.1.0/rc5/feed/ (http://zaurus.spy.org/feeds/cacko/pdaXrom/1.1.0/rc5/feed/)
and here
http://mirror1.pdaxrom.org/rc5/feed/ (http://mirror1.pdaxrom.org/rc5/feed/)
-
thanks pgas
-
I've also been trying to get the this to work.. so I downloaded the octave source (same version as omega used) so that I can compare apples to apples.
I thought I had gcc and gcc-headers installed (the package manager said they were), but I kept getting errors on no gcc. So I reinstalled them, and now I'm getting this error:
checking for C compilor default output file name... configure: error: C compiler cannot create executables
am I missing any other packages that need to be installed?
-
I applogize for the feed confusion - hopefully we soon can make the final 1.1.0 and get "rid" of the old version. And at the same time i will hopefully get my own server setup with much better developer stuff.
-
used to use my sd card for compiling stuff (vfat)... today i'm using a samba share to my windows 2000 machine.
Using a fat-based file system (including a samba share) is bound to cause you no end of headache when compiling. Many build scripts, etc, depend on the ability to use symbolic links, unix file permissions, etc, which will often break on FAT filesystems. Your best bet if you want to do a network-mounted drive is NFS...
You may not have had any problems yet, but I can almost guarantee that you will if you start trying to build more packages.
Dave
-
Is it better to install gcc make etc from the feed or to download the sdk? What's the difference?
-
Lardman - sorry i was using an older version of octave. got 2.1.57.... it configures without a problem. says found f2c but not libf77.a?
If you use f2c, you require the run-time libs which are provided (iirc) by libf77.a/so.
That said, the Octave compile used to fall over when I tried it with f2c; I'd use f77 if I were you.
Si
P.S. Why not use the cross toolchain (it's very simple)? This compile takes quite a while...
-
This should help all who want to start compiling...
I decided to reinstall RC5 from scratch... After re-installation I figured out how to setup the developer image....
To use the zgcc-3.3.2.img i found that i needed to make
/opt/arm/3.3.2-vfp as given by path
i then mounted this as such:
mount -o loop /mnt/cf/zgcc-3.3.2.img /opt/arm/3.3.2-vfp
This immediately gives me gcc happily working away. The samba share is bad... not sure why, as it has write access. It gave me errors such as ./configure file has 1.8 and e18 seconds modifiy timestamp in the future. The times are pretty close on both machinces.... When i copied the files back to my fat cf microdrive they worked much better - previously when i type make in a source directory (after ./configure) the make would keep looking ./configure....
need to grab make, bison, file, flex, m4 from the feed and i had a happier setup...
I have been able to roll bison and flex and some other stuff with better success.
I'm going to install f77 and also try formatting my 340meg cf microdrive as ext2 to see if that helps me upon running into trouble.
What is the best way to have a network shared drive from a windows machine? Can i make up somesort of image like phat linux or such uses that can be mounted rw over the network?
Again, the cross toolchain may be a little easier but i like being able to roll my own onboard... I'm keeping gcc on board in anycase to do a project at the moment - it's so cool sshing into my Z a couple of times having mc, gcc and the program in three windows...
-
does anyone know where i can get the source for the cmp command? I can't seem to find the source anywhere i've looked, what is it packaged with?
-
For reference, cmp is contained within diffutils...
-
offroadgeek - unlikely this is your problem, but... i just overwrote my /usr/include directory by copying a file with the wrong syntax. I now have a file called include in my usr directory. gcc complained can't created executables... guess this would be the same problem for you, that gcc can't find some includes somewhere.
-
is there a way to recover from the above simple mistake... i typed in the directory /usr/local/include :
cp gmp.h /usr/include
-
after reinstalling twice, it turns out that i didn't have a /usr/include to begin with... i was wondering how it was overwritten! Lardman, i'm trying to compile g95 as my fortran compiler... in case this fails (looks for gmp.h even though it exists), where do you get f77?
-
why does it tell me path: command not found when i type path since i reinstalled? grrr.... how do i add gmp.h to the include path so that ./configure sees it? It doesn't see it in /usr/include /usr/local/include or in the source directory...
-
It's part of GCC. Are you sure it's not in there already? (It may be called f77 or g77, I can't remember).
Si
-
Ah, now i understand what you were saying about using g77... it's not that easy as far as i can see. G77 is the GCC fortran compiler, but it's not compiled into the version that's on the sdk... apparently i need to download the gcc sources and g77 and compile all that, which will take quite a bit of room......
how can i find where the include directories are?
like which works for binaries is there another for libs?
-
got it to find gmp.h.... now it says checking for mpf_init in -lgmp... configure: error: could not link with libgmp.
This is for g95 configure.... ideas? libgmp and associates are in /usr/local/lib which the install for gmp created. how to check are in the path? copying to /usr/lib didn't help....
-
/usr/local/lib (iirc) and /usr/lib and /lib are normally checked automatically (I think) for libs, otherwise you need to use the -L flag to specify the directory:
gcc <whatever> -L/some/strange/place/for/libs
Another thing to note - I'm not quite sure how well F95 works yet; I remember seeing a report of problems compiling something (either R or Octave).
Si
P.S. You're talking about the configure file... not sure about that, though it's probably using GCC to create an executable and checking whether it works, in which case the above *should* apply ;-). Possibly check the filenames (like is there a libgmp.so, etc.)...?
-
lardman there is a libgmp.so...
When i compiled before with f2c after about an hour there was a problem with internal compiler error: segmenatation fault. I'm not sure f2c was working correctly. I had compiled it, but had to install it manually (f2c / libf2c.a / f2c.h) but i was getting some warnings in the compile... When i told it to make install anyhow it installed a load of files... unfortunately octave wasn't among them.
I finally think i have a solution... After muching searching for a fortran compiler... i have installed perl, and compiled fort77. The tests included compiled grand (so i was told), and ./configure and make for octave seemed to complete after a long time. I'm not doing make install so i hope it all works out....
-
Some stuff i've been installing has been looking for a (install) executable. What is this? It appeared to just be a script that changed permissions...
-
you fill find install in coreutils-extra in the unstable feed
-
Damn-it! make install gave me this error
g++ -g -O2 -o gendoc dendoc.cc
g++: Internal error: Terminated (program cc1plus)
It install a load of stuff... including a symlink from ./octave -> octave-2.1.57, but it didn't installl octave-2.1.57... how could i try to compile this part myself?
-
is it not possible to use the cross compiler to compile octave,
sadly for me octave doesnt even compile in linux
tovarish
-
Try turning the optimisation down (to -O1, or get rid completely) then re-run that command by hand, then re-run 'make install'.
In any case, when cross compiling using the pdaXrom toolchain (which used to work BTW with the pdaXrom 1.0.0 version) you couldn't run 'make install' (obviously) so the next step had to be done by hand.
Take a look in an existing octave package (assuming you can find one since my site went down), or at a desktop install and work out the structure.
Si
-
do you need gendoc ?
if not you can edit the Makefile so that it is not build.
you could try g++ -g -O2 -o gendoc dendoc.cc in a console or to cross compile it...
-
thanks all... i just saw what happened.... lack of memory. My Z just crapped out, killing bash....
going to create a swap. What do the optimisations do? Are they for speed or for file size?
-
Damnit again! ;-)
Just mounted my microdrive as swap... and wiped it. grrr! now i have to compile, and make, and make install octave all over again.
-
For reference install is in the coreutils-extra package in the unstable feed.
Also,To make a swap file for anyone else needing to:
cd /mnt/cf
dd if=/dev/zero of=swp.img bs=1k count=90000
mkswap swp.img
swapon /mnt/cf/swp.img
gives me a 90meg swap... (without erasing my microdrive!)
-
using distcc might be another option if you have ram problem
(and a linux box)
-
thanks pgas... i want to bull on and use just my Z... matter of principle to get it working at this stage. Also i don't want to go to the trouble of setting up my box on linux now... don't currently have the time, even with knoppix.
-
gendoc creates the documentation iirc; you probably don't need it.
That said, the octave Makefile setup is quite complex, so you're probably better off not trying to edit it out.
Si
-
man
fear omega with a root prompt!
Scott
-
8-) It's still compiling from before..............!
I've also noticed that because of the microdrive that the battery barely charges through the usb cable... (according to the datasheet, my ibm 340meg cf microdrive takes 300ma when writing).
-
My memory bar applet is currently across the taskbar onto the desktop, as in the red bar extends onto the desktop! Memory usage 151%.. Perhaps this should be listed as a bug? LOL.
Still compiling...... had some problems earlier, had to restart...
-
Somebody who compiled octave can make an ipkg from it?
I really don't want to struggle with it if somebody already made it.
Simple steps (I use these steps to create ipk-s from natively compiled apps):- make a directory called (for example) ipkg_tmp
- install the program with the "$ make DESTDIR=ipkg_tmp install" command
- make a control file as it is described here (http://www.pdaxrom.org/index.php?showid=35&menuid=1)
- strip the debug info from the binaries: "$ strip -g -S -d --strip-debug <binary name>"
- do a "$ mkipkg ipkg_tmp"
- upload the package in the unstable feed or request account from Laze to it.
Thank you in advance,
Zumi
-
Zumi - AFAIK there isn't one available for RC5, hence i'm trying to compile. I was using one of lardmans one on cacko, no bothers but i think i got a undefined symbol on RC5.
Next, can lardman (or someone else who's around and knows) what is meant by this:
lardman: In any case, when cross compiling using the pdaXrom toolchain (which used to work BTW with the pdaXrom 1.0.0 version) you couldn't run 'make install' (obviously) so the next step had to be done by hand.
What is the next step that can be done by hand. Last night when the compile finished (without any errors) there was no octave file and the octave symlink that was there before disappeared. Octave-2.1.57
Next, i removed all the crap i could find from octave, and unpacked octave-2.1.59. I entered the command ./configure ; make (the one with the flags in the install.octave file to remove all the debugging symbols (to try something different)) ; make install.
I woke up this morning to find it still looping around the liboctave directory compiling, having never gotten to make install as there were no octave files placed on the system (/usr/local...)
Can someone please advise? It's starting to get annoying. I would suggest that the compile system is working okay as i compiled bison, flex, m4, lbreakout2, gputils, dosbox (omg! i just tested this after i wrote it... dosbox works?!? no image needed?)... As i said i'm using fort77, and perl for my fortran compiler... The tests for it work grand, and the only thing is that octave doesn't find any fort77 libraries (they are not in the source file), but the fortran files appear to be created without any warnings).
-
What is the next step that can be done by hand
Manually copying the files to the appropriate locations on the Z (or to a directory structure which can be made into an ipk). However I note that Zumi has given a method which might allow 'make install' to work (and something like this is done with OE so it must be possible somehow).
Last night when the compile finished (without any errors) there was no octave file and the octave symlink that was there before disappeared
It should be in the bin directory (in the source directory), or perhaps it's in the /src directory. Try searching by modification date.
I woke up this morning to find it still looping around the liboctave directory compiling
It takes a long time to compile; hence my suggestion to use a cross-toolchain on a fast computer (and it takes a fair while there too!).
the only thing is that octave doesn't find any fort77 libraries (they are not in the source file), but the fortran files appear to be created without any warnings).
You can specify this location by passing a flag to configure (try ./configure --help).
Si
-
okay... the fortran libraries are not in the fort77 directory, as i said - but octave seems to compile those parts without problems.
Can octave 2.1.59 take four - five hours more than 2.1.57?
Regarding both, there is not octave binary created - hence the problem.
Clarify this please - make should compile everything, make install should just copy the stuff? When i do make install (with other programs that work successfully, such as dosbox), some parts are compiled also by make install...
-
Make compiles the whole lot; make install probably strips the binaries.
Can octave 2.1.59 take four - five hours more than 2.1.57?
Not on my P4-1.4GHz, as the entire build process probably only takes 1 hour or so (at a guess); on a Z I've no idea.
Regarding both, there is not octave binary created - hence the problem.
If make finishes then there should be a binary somewhere. Probably in the source directory now that I think about it: octave-2.1.57\src
It will be rather large (as it's unstripped).
Simon
-
When i was compiling 2.1.59 last night i told it to leave the debugging symbols out of it. This morning it was stuff looping around the liboctave directory. It compiles it then leave and reenters it and starts compiling again.
I'm happy that i've got EVERY single other thing that i've compiling, some games, dosbox, gputils (pic dev stuff), xgpasm (x front end for previous), bison, fort77, flex. I even now have these installed on a mounted image sitting on a samba share (i will move this to my 1gig CF in the next few hours).
What advice can you give me about octave anyone? There is no octave binary sitting anywhere.... is there any libraries i should check for?
-
Another question. If i terminate a make using Ctrl-C, and i type make again - is it expected to complete normally?
-
I just found out that fort77 just calls f2c, so that f2c looks like a real compiler... How can i check that f2c is installed correctly, is there a f2c that will actually install itself? I had to copy three files myself, I may have needed the rest of them.... why no ./configure ; make ; make install source files available?
-
is there any libraries i should check for?
Probably also in /src do an 'ls -a', they should be in a /.libs directory.
I just found out that fort77 just calls f2c, so that f2c looks like a real compiler... How can i check that f2c is installed correctly, is there a f2c that will actually install itself? I had to copy three files myself, I may have needed the rest of them.... why no ./configure ; make ; make install source files available?
No idea, sorry.
Si
-
This octave really doesn't want to be compiled.
I'm trying to cross-compile it but it seems that I will need to recompile my gcc with fortran support. I already edited the Makefiles at two places (where it wanted to use the programs it compiled before, but they were arm binaries so it wasn't able... they were only doc files however).
I ran into a problem:
make[2]: Entering directory `/opt/arm/src/octave-2.1.57/src'
making defaults.h from defaults.h.in
defaults.h is unchanged
making oct-conf.h from oct-conf.h.in
oct-conf.h is unchanged
g++ -I. -I.. -I../liboctave -I../src -I../libcruft/misc -I../glob -I../glob -DHAVE_CONFIG_H -Wall -W -Wshadow -O \
-L.. -fPIC -o octave \
main.o balance.o besselj.o betainc.o chol.o colloc.o daspk.o dasrt.o dassl.o det.o eig.o expm.o fft.o fft2.o fftn.o fftw_wisdom.o filter.o find.o fsolve.o gammainc.o getgrent.o getpwent.o getrusage.o givens.o hess.o inv.o kron.o lpsolve.o lsode.o lu.o minmax.o odessa.o pinv.o qr.o quad.o qz.o rand.o schur.o sort.o sqrtm.o svd.o syl.o time.o \
-L../liboctave -L../libcruft -L../src -Wl,-rpath -Wl,/usr/local/lib/octave-2.1.57 \
../src/liboctinterp.a ../liboctave/liboctave.a ../libcruft/libcruft.a ../glob/glob.o ../glob/fnmatch.o \
-lreadline -lncurses -lm
../liboctave/liboctave.a(file-ops.o)(.text+0x2b18): In function `file_ops::tempnam(std::basic_string, std::allocator > const&, std::basic_string, std::allocator > const&, std::basic_string, std::allocator >&)':
: warning: the use of `tempnam' is dangerous, better use `mkstemp'
../src/liboctinterp.a(xerbla.o)(.text+0x10): In function `xerbla_':
: undefined reference to `s_wsfe'
../src/liboctinterp.a(xerbla.o)(.text+0x20): In function `xerbla_':
: undefined reference to `do_fio'
../src/liboctinterp.a(xerbla.o)(.text+0x30): In function `xerbla_':
: undefined reference to `do_fio'
../src/liboctinterp.a(xerbla.o)(.text+0x34): In function `xerbla_':
: undefined reference to `e_wsfe'
../libcruft/libcruft.a(zairy.o)(.text+0x1554): In function `zairy_':
/opt/arm/src/octave-2.1.57/libcruft/amos/zairy.c:347: undefined reference to `pow_dd'
../libcruft/libcruft.a(zbesh.o)(.text+0x710): In function `zbesh_':
and a _lot_ of line like these follows 'till make halts.
I read topics on other forums about this and they say compiling with a fortran enabled gcc works. I hope it will... I want this app!
Zumi
-
Well lardman should definitely be able to compile it, as he did before for cacko. I'm running another compile now..... Anyone want to recompile gcc with g77 support? ;-)
-
last night i left it on to compile 2.1.61 this time and i ran out of space on /tmp? It's a ramdisk??? Anyhow, i renamed that symlink and made a symlink from /tmp to /mnt/cf (microdrive) for now... Probably make it a lot slower? Does it not dynamically resize (/dev/shm/tmp) if necessary?
-
I already edited the Makefiles at two places (where it wanted to use the programs it compiled before, but they were arm binaries so it wasn't able... they were only doc files however).
Rather than editing the Makefile you can just run the commands in another terminal (which hasn't sourced the shell script to make it use the cross-toolchain), then start Make again (in the original window) and it will continue where it left off.
Well lardman should definitely be able to compile it, as he did before for cacko. I'm running another compile now..... Anyone want to recompile gcc with g77 support? ;-)
I can, so can anyone who uses OE as it's in there now..... ;-)
I'm sure pdaXrom could start using OE as their build system... It's very good really :-)
I have downloaded the pdaXrom toolchain and if I have some spare time over the weekend I'll take a look at compiling F77 support and compiling octave; that said, I don't use pdaXrom, so this is really not very high on my list of priorities (which go something like: go out for a few beers, meet some pretty girls, sleep a bit, finish my PhD, compile Octave for pdaXrom users ;-), so chances are it won't actually happen for a while.
Zumi, I'd search for the location of the undefined references to see if you need another lib (header); I'd also ask the pdaXrom team to produce a toolchain with F77 built in to save the hassle.
Si
-
Me again.
I haven't had time to try compiling again on the Zaurus since I last posted. Anyone else had any luck with Octave? I would try the cross-compiler but someone has already tried that.
Any sign of a G77 enable PDAXROM native toolchain? How hard is it to recompile GCC from scratch with G77 enabled on my Zaurus? I will need octave (with Gnuplot) for my oscilloscope project just after christmas so if i can't get it going i will have to go back to Cacko and use the octave that worked then - but i don't want to! :-(
Anyone else know a way to feed numbers from the serial port to gnuplot so i can graph a waveform?