[Coin-discuss] Problems with cross-compiling for Windows on Linux
Andreas Waechter
andreasw at watson.ibm.com
Tue Mar 6 05:25:57 EST 2007
Hi Kish,
> 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?
Yes, I can change the test for the libtool script by not using the
autoconf macro AC_CHECK_FILE. (I don't understand why they have a check
for cross compiling in there... :( ).
Could you please tell me which version of Cbc you are using, so that I can
fix it there?
> 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
Please try if it works properly if you add the argument 'F77=unavailable'
to your configure options.
Thanks
Andreas
More information about the Coin-discuss
mailing list