On 01/05/2015 10:29 AM, Elena Pourmal wrote:
Hi Rob,
On Jan 5, 2015, at 9:10 AM, Rob Latham <[email protected]> wrote:
On 01/01/2015 10:52 PM, Ernest L Williams wrote:
Hi
I am trying to cross-compile hdf5 for a different architecture:
I get the following error in the configuration stage:
=======================================
configure:23533: error: cannot run test program while cross compiling
========================================
HDF5 uses AC_TRY_RUN in way too many places. It makes cross compiling a
gigantic pain.
Workaround: set a pile of environment variables. Most of the tests are
obvious: checking for example if you are not running on an HP-UX machine with a
buggy compiler from 1998 (I think I have exaggerated that slightly... but only
slightly)
You are not exaggerating! Our configure needs a major cleanup!
Fortunately, they do not seem to be adding any *new* instances of AC_TRY_RUN,
so once you set up all the needed environment variables, you'll be set for the
next several release cycles.
I hope other HDF folks will chime in if I am wrong, but the major problem with
cross-compiling is h5detect. Configure runs h5detect to generate H5Tinit.c
which is platform specific. You may get the wrong H5Tinit.c if h5detect doesn’t
run on the right platform (architecture).
The other problem is "H5lib_settings.c"
If these files are really needed, they could be generated with autotools
and PERL.
Cheers,
Ernest
Elena
To get you started, here's a shell script (attached) I use with lots of the
necessary environment variables set. Richard Hedges got me most of the way a
few years back (in the 1.6 days), and so I pay it forward to you. I did this
for Blue Gene, so usual caveats apply: I have no idea what the right values
should be for your environment.
Oh, note the one odd step: you have to make one c file in normal mode, then
re-configure everything for cross compiling.
==rob
--
Rob Latham
Mathematics and Computer Science Division
Argonne National Lab, IL USA
<bgq-hdf5build18.sh>_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5