[Coin-discuss] Building Coin on multiple platforms

Kish Shen kish.shen at crosscoreop.com
Fri Nov 10 09:55:34 EST 2006


Hi,

I am building Cbc (from the trunk branch, checked out 2 days ago) for multiple platforms
on the same shared file space. I have done this successfully in Aug (with the devel branch),
but am now running into a problem.

I am building for the following:

* Linux, running on x86 
* SunOS5, running on Sparc
* Windows, running on x86, by cross compiling on Linux with mingw

Up to now, I have been using --exec-prefix option in configure to put the platform dependent
stuff into different directories, as follows:

  ./configure --exec-prefix=$HOME/<COIN>/$ARCH  --enable-static --without-asldir

(for the cross-compile, I also need to specify --build and --host options, plus setting CONFIG_SITE
environment variable)

The problem I ran into:

1) I first build the Linux version of Cbc, and after this I was able to compile my own code 
successfully using Coin/Cbc.

2) I then build the Windows version of Cbc (on a different process).  When I now try to
compile the same code as in 1), I get an error:

g++ -DCOIN -DCOIN_USE_CLP -I. -I../include/i386_linux -I../sepia/include -I- -I/vol/Eclipse/thirdparty/gmp4.1/include -I/vol/Eclipse/thirdparty/tcltk8.4/include -I/usr/X11R6/include  -O2 -I/homes/kish/Coin-Cbc20061108/include -c coinplex.cpp
In file included from /homes/kish/Coin-Cbc20061108/include/CoinMessageHandler.hpp:15,
                 from /homes/kish/Coin-Cbc20061108/include/OsiSolverInterface.hpp:9,
                 from coinplex.cpp:40:
/homes/kish/Coin-Cbc20061108/include/CoinFinite.hpp: In function `bool 
   CoinIsnan(double)':
/homes/kish/Coin-Cbc20061108/include/CoinFinite.hpp:90: error: `_isnan' 
   undeclared (first use this function)
/homes/kish/Coin-Cbc20061108/include/CoinFinite.hpp:90: error: (Each undeclared 
   identifier is reported only once for each function it appears in.)
make: *** [i386_linux/seosiclpcbc.so] Error 1

I ran the same command to compile the code, on the same process, in the two cases.
The Linux and the Windows builds are ran on other processes.

It seems that the Windows build have made changes to the include directory, which is in
<COIN>/include, and is shared by all the platforms. 

I am now working around this by adding the --includedir option in configure so that the
include files are also placed in platform specific directories. This seems to work. However,
I didn't expect the include files to be platform dependent, and as there are 144 files in the
include directories, I am not sure how I can make a comparison between the different 
include directories to see what the differences are.

Does any one know if I am doing something wrong to cause this problem, or if the include
files are expected to be platform specific? 

Thanks in advance for any information,

Kish Shen



More information about the Coin-discuss mailing list