[GRASS5] Making GRASS cross-compiler friendly (was: Script to build babyGRASS for handhelds)
Carl Worth
cworth at east.isi.edu
Tue Apr 30 13:04:33 EDT 2002
On Apr 30, Markus Neteler wrote:
> Carl, any ideas?
Markus, I'm not sure why things are crashing on you.
> PS: I've just uploaded the latest baby* scripts to CVS: handheld/
I'm trying these out with my cross-compiler now. Things appear to have
compiled fine, but when I try to to run GRASS I find that
grass5/etc/lock does not exist, (I linked it to /bin/true to push past
this), and then grass5/etc/set_data does not exist.
Any suggestions where I might look to see why these didn't get
compiled?
Since, I'm going through it, I thought I would point out the ways in
which GRASS is hard to cross-compile, along with some suggested fixes:
1) configure tries to compile and run a program to determine the
number of arguments for setpgrp.
Workaround: Delete AC_FUNC_SETPGRP, run autoconf, run ./configure,
edit src/include/config.h to define SETPGRP_VOID.
Proposal: ??? (This is a long-standing frustration with autoconf)
2) The build process tries to compile, then execute nad2bin. I
understand that this is an attempt to create binary files with the
correct endian-ness, but it breaks cross-compilation.
Workaround: I just compiled nad2bin natively, then continued the
build. I think I'm OK, (eg. lucky), here since x86 and arm are the
same endian-ness. However, now an unusable nad2bin is being
installed with GRASS. Is GRASS going to execute this program during
normal operation?
Proposal: If GRASS does not execute nad2bin at runtime, then we
just need to come up with a mechanism for two different compilers
for native cs. cross-compilation. Then, nad2bin could be installed
using the native compiler, while all other compilation would use
the cross compiler.
On the other hand, if GRASS does execute nad2bin during runtime,
could we perhaps postpone the compile-time nad2bin calls until
run-time? This might be awkward, but it would at least enable
cross-compilation.
I'm open to any reactions/suggestions.
-Carl
--
Carl Worth
USC Information Sciences Institute cworth at east.isi.edu
3811 N. Fairfax Dr. #200, Arlington VA 22203 703-812-3725
More information about the grass-dev
mailing list