Help - Search - Members - Calendar
Full Version: Compiling Natively on PDAXROM
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
Pages: 1, 2
omega
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:

QUOTE
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!
philo
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
lardman
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
omega
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...
lardman
QUOTE
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.
omega
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.
pgas
bison is in the stable feed ... (m4 also)
omega
pgas - i thought that too...

but neither are listed under www.pdaxrom.org/feed
/unstable


or in the website list....
pgas
they are on the stable feed:
here
http://zaurus.spy.org/feeds/cacko/pdaXrom/1.1.0/rc5/feed/
and here
http://mirror1.pdaxrom.org/rc5/feed/
omega
thanks pgas
offroadgeek
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:

CODE
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?
Laze
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.
blakeyez
QUOTE
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
gretchen
Is it better to install gcc make etc from the feed or to download the sdk? What's the difference?
lardman
QUOTE
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...
omega
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...
omega
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?
omega
For reference, cmp is contained within diffutils...
omega
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.
omega
is there a way to recover from the above simple mistake... i typed in the directory /usr/local/include :
cp gmp.h /usr/include
omega
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?
omega
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...
lardman
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
omega
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?
omega
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....
lardman
/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.)...?
omega
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....
omega
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...
pgas
you fill find install in coreutils-extra in the unstable feed
omega
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?
tovarish
is it not possible to use the cross compiler to compile octave,
sadly for me octave doesnt even compile in linux

tovarish
lardman
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
pgas
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...
omega
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?
omega
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.
omega
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!)
pgas
using distcc might be another option if you have ram problem
(and a linux box)
omega
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.
lardman
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
ScottYelich
man

fear omega with a root prompt!

Scott
omega
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).
omega
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...
Zumi
Somebody who compiled octave can make an ipkg from it?
I really don't want to struggle with it if somebody already made it. smile.gif

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
  • 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
omega
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:

QUOTE
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).
lardman
QUOTE
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).

QUOTE
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.

QUOTE
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!).

QUOTE
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
omega
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...
lardman
Make compiles the whole lot; make install probably strips the binaries.

QUOTE
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.

QUOTE
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
omega
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?
omega
Another question. If i terminate a make using Ctrl-C, and i type make again - is it expected to complete normally?
omega
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?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.