[Coin-discuss] Problems with cross-compiling for Windows on Linux
Kish Shen
kish.shen at crosscoreop.com
Mon Mar 5 23:01:42 EST 2007
Hi,
We have been cross-compiling COIN-OR projects for Windows on our Linux platform, because
a) we do not have access to MS Visual C, b) we do our builds from scripts, and it is easier to do
everything on Unix systems.
I have been able to do this with the various CBC I downloaded last year (the last one was Nov
2006, on the trunk branch) without problems, but for the CBC I downloaded yesterday (March 5),
I have ran into problems while running configure with the check for libtool:
checking for ../libtool... configure: error: cannot check for file existence when cross compiling
In the configure script for the libtool check, it now explicitly test if you are cross-compiling, and
aborts if you are:
test "$cross_compiling" = yes &&
{ { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
I am getting round this by editing these lines, but it seems that every single configure file now
have this test in it, so I have to edit each file (for CoinUtils, Clp, Vol, etc.).
Is there an easier way around this?
Another problem I noticed is that if I am running the configure on a machine that have Fortran
installed, the configure script takes this Fortran, even though it is for the native system (in
my case Linux) and not Window, and then compile some code with it and try to link it to
the Windows C code, which then fails, and the configure fails:
checking for Fortran libraries of f77... -L/usr/lib/gcc-lib/i586-suse-linux/3.3.5 -L/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../../../i586-suse-linux/lib -L/usr/lib/gcc-lib/i586-suse-linux/3.3.5/../../.. -lfrtbegin -lg2c -lm -lgcc_s
checking for dummy main to link with Fortran libraries... unknown
configure: error: linking to Fortran libraries from C fails
Thanks in advance for any help!
Cheers,
Kish Shen
More information about the Coin-discuss
mailing list