[Coin-discuss] cygwin build

Andreas Waechter andreasw at watson.ibm.com
Tue Aug 15 14:53:50 EDT 2006


I'm trying to change the default behavior later today - at least for the 
development branches.

In the meantime, you can always overwrite the default compilation flags 
picked by configure by setting them in the command line, e.g.,

./configure CXXFLAGS='-O3' CFLAGS='-O3'

More information about the general configuration can be found at

https://projects.coin-or.org/BuildTools/wiki/user-configure

Hope this helps

Andreas

On Tue, 15 Aug 2006, Matthew Galati wrote:

> One of my apps uses Concorde, which I cannot seem to get it to compile with 
> the -mno-cygwin switch. I'd prefer the COIN default not use this flag - but 
> having the option would be nice. Is there an easy way for me to shut this off 
> for my COIN build? The old way, we had a Makefile.CYGWIN that I could change. 
> What is the new way?
>
> Thanks,
> Matt
>
>> Hi,
>> 
>> On Cygwin, currently the COIN makefiles always use the '-mno-cygwin' flag 
>> when it compiles code.  This is done because then the generated executables 
>> use the native Windows runtime libraries (not Cygwin1.dll) and therefore 
>> run also outside the Cygwin environment, i.e. in DOS, which is what you 
>> probably want when you compile an executable and want to use it "natively" 
>> in Windows (e.g., the AMPL solver executables).
>> 
>> But this requires that all code, also the code that links with the library, 
>> is compiled and linked with that flag.  If you use the Makefiles in the 
>> examples subdirectories, you will see that the flag is there.
>> 
>> It seems that a number of people are not happy with this, since it also 
>> changes what header files are used etc.  I'm planning to change the 
>> behavior so that by default the -mno-cygwin flag is not used, but that a 
>> user can choose --enable-dos-compile (or so) on Cygwin, which would then 
>> generate a native Windows executable.  I already submitted a BuildTools 
>> ticket (to myself) and will try to get to it soon.
>> 
>> Andreas
>> 
>> 
>> On Tue, 15 Aug 2006, Ted Ralphs wrote:
>> 
>>> Matt,
>>> 
>>> I ran into similar issues with one of my applications and I believe it
>>> is caused by the fact that the COIN projects are compiled with the
>>> -mno-cygwin flag by default. If you just make sure *all* your objects
>>> files are compiled with this flag, everything should be fine. If this
>>> isn't an acceptable solution, I believe Andreas is going to add a
>>> configure option to compile COIN projects without the -mno-cygwin flag.
>>> 
>>> Cheers,
>>> 
>>> Ted
>>> 
>>> Matthew Galati wrote:
>>> 
>>>> Is there some special flag that I need to compile/link with for building
>>>> my application in Cygwin, when linking with the new libs, for example
>>>> CoinUtils. I am using coin-Cbc. I configure, make, make install fine on
>>>> both Linux and Cygwin. When I link my application on Linux, it is fine
>>>> and runs fine. On cygwin, I get the error below. Googling, it seems to
>>>> be related to the -mno-cygwin flag, but I am not sure what I need to do.
>>>> 
>>>> Thanks,
>>>> Matt
>>>> 
>>>> magala at l11062 ~/DECOMP/apps/TSP
>>>> $ make --version
>>>> GNU Make 3.80
>>>> Copyright (C) 2002  Free Software Foundation, Inc.
>>>> This is free software; see the source for copying conditions.
>>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>>> PARTICULAR PURPOSE.
>>>> 
>>>> magala at l11062 ~/DECOMP/apps/TSP
>>>> $ gcc -v
>>>> Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
>>>> Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose
>>>> --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --lib
>>>> dir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
>>>> --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,
>>>> java,objc --enable-nls --without-included-gettext
>>>> --enable-version-specific-runtime-libs --without-x --enable-libgcj --d
>>>> isable-java-awt --with-system-zlib --enable-interpreter
>>>> --disable-libgcj-debug --enable-threads=posix --enable-java-gc=b
>>>> oehm --disable-win32-registry --enable-sjlj-exceptions
>>>> --enable-hash-synchronization --enable-libstdcxx-debug : (reconfi
>>>> gured)
>>>> Thread model: posix
>>>> gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)
>>>> 
>>>> 
>>>> Creating tsp
>>>> g++  -I- -Wall -Wpointer-arith -Wcast-qual -Wwrite-strings -Wconversion
>>>> -pipe -Iinclude -I/home/magala/COIN_NEW/Coin-Cbc
>>>> /include -I/home/magala/DECOMP/include
>>>> -I/home/magala/DECOMP/external/boost
>>>> -I/home/magala/DECOMP/external/concorde/INCL
>>>> UDE -I/home/magala/DECOMP/external/concorde_i/include -g -DCOIN_USE_CLP
>>>> -DMODE_DEBUG_FULL -o CYGWIN-g/tsp CYGWIN-g/TSP_M
>>>> ain.o CYGWIN-g/TSP_DecompApp.o CYGWIN-g/TSP_Util.o
>>>> CYGWIN-g/TSP_CombCut.o CYGWIN-g/TSP_SubtourCut.o -L/home/magala/COIN_
>>>> NEW/Coin-Cbc/lib -L/home/magala/DECOMP/lib
>>>> -L/home/magala/DECOMP/external/concorde/  -lDecomp-g -lUtil-g
>>>> -lConcordeI-g -
>>>> lOsiClp -lClp -lconcorde -lCgl -lOsi -lCoinUtils   -lm
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libOsiClp.a(OsiClpSolverInterface.o): 
>>>> In function `_ZN21OsiClpSolverInterface12initia
>>>> lSolveEv':
>>>> /home/magala/COIN_NEW/Coin-Cbc/Osi/src/OsiClp/OsiClpSolverInterface.cpp:67: 
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/Osi/src/OsiClp/OsiClpSolverInterface.cpp:111: 
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/Osi/src/OsiClp/OsiClpSolverInterface.cpp:134: 
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/Osi/src/OsiClp/OsiClpSolverInterface.cpp:140: 
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/Osi/src/OsiClp/OsiClpSolverInterface.cpp:149: 
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libOsiClp.a(OsiClpSolverInterface.o):/home/magala/COIN_NEW/Coin-Cbc/Osi/src/OsiClp/Os 
>>>> 
>>>> iClpSolverInterface.cpp:311: more undefined references to `__assert' 
>>>> follow
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinMessageHandler.o): 
>>>> In function `_ZN18CoinMessageHandlerC2Ev':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinMessageHandler.cpp:329: 
>>>> undefined reference to `__imp___iob'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinMessageHandler.o): 
>>>> In function `_ZN18CoinMessageHandlerC1Ev':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinMessageHandler.cpp:329: 
>>>> undefined reference to `__imp___iob'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinMessageHandler.o): 
>>>> In function `_ZN18CoinMessageHandler8printingEb
>>>> ':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinMessageHandler.cpp:515: 
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinIndexedVector.o):
>>>> In function `_ZNK17CoinIndexedVectorixEi':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinIndexedVector.cpp:205:
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinIndexedVector.o):
>>>> In function `_ZN17CoinIndexedVector3addEid':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinIndexedVector.cpp:259:
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinIndexedVector.o):
>>>> In function `_ZN17CoinIndexedVector5cleanEd':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinIndexedVector.cpp:272:
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinIndexedVector.o):
>>>> In function `_ZN17CoinIndexedVector10checkClearE
>>>> v':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinIndexedVector.cpp:289:
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinIndexedVector.o):/home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/Coin 
>>>> 
>>>> IndexedVector.cpp:290: more undefined references to `__assert' follow
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinFileIO.o): In
>>>> function `_Z16fileCoinReadableRSs':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinFileIO.cpp:610:
>>>> undefined reference to `__imp___iob'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinFileIO.o): In
>>>> function `_ZN14CoinFileIOBaseC2ERKSs':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinFileIO.cpp:20:
>>>> undefined reference to `__imp___iob'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinPresolveMatrix.o): 
>>>> In function `_ZN18CoinPresolveMatrix9setMatrixE
>>>> PK16CoinPackedMatrix':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinPresolveMatrix.cpp:176: 
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinPresolveHelperFunctions.o): 
>>>> In function `_Z27presolve_delete_from_
>>>> major2iiPiS_S_PdS_S_':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinPresolveHelperFunctions.cpp:439: 
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinPresolveEmpty.o):
>>>> In function `_ZN22drop_empty_cols_action8presolv
>>>> eEP18CoinPresolveMatrixPiiPK18CoinPresolveAction':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinPresolveEmpty.cpp:166:
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinPresolveEmpty.o):
>>>> In function `_ZNK22drop_empty_cols_action9postso
>>>> lveEP19CoinPostsolveMatrix':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinPresolveEmpty.cpp:293:
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinPresolveEmpty.o):
>>>> In function `_ZNK22drop_empty_rows_action9postso
>>>> lveEP19CoinPostsolveMatrix':
>>>> /home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/CoinPresolveEmpty.cpp:485:
>>>> undefined reference to `__assert'
>>>> /home/magala/COIN_NEW/Coin-Cbc/lib/libCoinUtils.a(CoinPresolveZeros.o):/home/magala/COIN_NEW/Coin-Cbc/CoinUtils/src/Coin 
>>>> 
>>>> PresolveZeros.cpp:213: more undefined references to `__assert' follow
>>>> collect2: ld returned 1 exit status
>>>> make[1]: *** [CYGWIN-g/tsp] Error 1
>>>> make[1]: Leaving directory `/home/magala/DECOMP/apps/TSP'
>>>> make: *** [tsp] Error 2
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Coin-discuss mailing list
>>>> Coin-discuss at list.coin-or.org
>>>> http://list.coin-or.org/mailman/listinfo/coin-discuss
>>> 
>>> 
>>> 
>>> -- 
>>> Dr. Ted Ralphs
>>> Associate Professor
>>> Industrial and Systems Engineering
>>> Lehigh University
>>> (610)758-4784
>>> tkralphs at lehigh.edu
>>> www.lehigh.edu/~tkr2
>>> _______________________________________________
>>> Coin-discuss mailing list
>>> Coin-discuss at list.coin-or.org
>>> http://list.coin-or.org/mailman/listinfo/coin-discuss
>>> 
>> _______________________________________________
>> Coin-discuss mailing list
>> Coin-discuss at list.coin-or.org
>> http://list.coin-or.org/mailman/listinfo/coin-discuss
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>



More information about the Coin-discuss mailing list