[Coin-discuss] Compile of dip on AIX - help required

Ted Ralphs ted at lehigh.edu
Thu Jun 3 08:41:01 EDT 2010


Hi Derek,

It looks to me like you're overriding some variables that are not
really intended for users. First, I would suggest setting ADDLIBS
rather than LIBS, since this is the variable intended for what you are
wanting to do. Second, I would not set CXXFLAGS manually. With gcc,
overriding this set of flags in the way you do does break the build,
so it may also with xlc. The optimization level is set automatically,
along with a number of other flags that will be overridden by your
manual setting. There is a variable OPT_CXXFLAGS for overriding just
the optimization level if you want to use that (by default, it is
already -O2 I think) and a variables ADD_CXXFLAGS for adding flags to
the ones set automatically by configure. It is suggested on the
"current issues" page here

https://projects.coin-or.org/BuildTools/wiki/current-issues

to set ADD_CXXFLAGS="-qrtti" with xlc. Just to be safe, I would also
avoid setting CFLAGS, FFLAGS, and LDFLAGS (this one should be OK, but
since you aren't setting it to anything, it seems worth not setting it
at all). The changes that Stefan's patch makes seem to already be
present in the version of Cbc that DIP's trunk is using, so I'm not
sure that will help. Give the above a try (configuring from a clean
copy) and see if it works. By the way, if you build in a subdirectory
instead of the root, it makes getting back to a pristine copy of the
code a lot easier. Just do

mkdir build
cd build
../configure --your-args

Hope this helps. Let us know how you do.

Cheers,

Ted

On Wed, Jun 2, 2010 at 10:19 PM, Stefan Vigerske
<stefan at math.hu-berlin.de> wrote:
> Hi,
>
> this looks like a problem with confusing LIBS and LDADD in the Cbc (and
> Clp) Makefile.
> Problem is that the LIBS flag is also used when building libClp, libCbc,
> and libCbcSolver, but should only be used for building binaries.
>
> For a workaround, edit the generated Makefiles as shown here:
> https://projects.coin-or.org/GAMSlinks/browser/trunk/makefiles.patch
>
> A real fix will come with some larger changes in the build system - that
> may still take some time.
>
> Stefan
>
>
> Am 02.06.2010 21:37, schrieb Derek Jones:
>> Hi folks,
>>
>> With Matt Galati's help, I've been trying to compile Dip from the trunk
>> under AIX
>>
>> Hitting problems with the Cbc section.
>>
>> Here's what I have so far:
>>
>>
>> ./configure \
>> --prefix=/lapps/local_Alper \
>> --disable-shared \
>> --enable-static=yes \
>> AR="ar  -X64 " \
>> NM="nm  -X64 " \
>> F77="xlf -q64 " \
>> CC="xlc   -q64 " \
>> CXX="xlC   -q64 " \
>> CFLAGS="    -O -bmaxdata:0x3f0000000    " \
>> CXXFLAGS="   -O -bmaxdata:0x3f0000000 -qrtti " \
>> FFLAGS="   " \
>> LIBS=" -lm -lpthread " \
>> LDFLAGS=" " \
>> --with-cplex-incdir=/opt/ilog/
>> cplex121/include/ilcplex \
>> --with-cplex-lib="
>> /opt/ilog/cplex121/lib/power64_aix5.3_7.0/static_stl/libcplex.a
>> /opt/ilog/cplex121/lib/power64_aix5.3_7.0/static_stl/libilocplex.a  "
>>
>> It gets a good way through, but fails like this:
>>
>> xlC -q64 -O -bmaxdata:0x3f0000000 -qrtti -o cbc CoinSolve.o
>> ./.libs/libCbcSolver.a ./.libs/libCbc.a
>> /home/derjones/COIN/coin-Dip/Cbc/../Cgl/src/.libs/libCgl.a
>> /home/derjones/COIN/coin-Dip/Cbc/../Osi/src/OsiClp/.libs/libOsiClp.a
>> /home/derjones/COIN/coin-Dip/Cbc/../Osi/src/.libs/libOsi.a
>> /home/derjones/COIN/coin-Dip/Cbc/../Clp/src/.libs/libClp.a
>> /home/derjones/COIN/coin-Dip/Cbc/../CoinUtils/src/.libs/libCoinUtils.a
>> /home/derjones/COIN/coin-Dip/Cbc/../Osi/src/OsiCpx/.libs/libOsiCpx.a
>> -lblas /opt/ilog/cplex121/lib/
>> power64_aix5.3_7.0/static_stl/libcplex.a
>> /opt/ilog/cplex121/lib/power64_aix5.3_7.0/static_stl/libilocplex.a -lm
>> -lpthread
>> -blibpath:/lapps/local_Alper/lib:/usr/vac/lib:/usr/vacpp/lib:/usr/lib:/lib
>> munch: Error reading input file ./.libs/libCbcSolver.a
>> make[2]: *** [cbc] Error 1
>> make[2]: Leaving directory `/home/derjones/COIN/coin-Dip/Cbc/src'
>> make[1]: *** [all-recursive] Error 1
>> make[1]: Leaving directory `/home/derjones/COIN/coin-Dip/Cbc'
>> make: *** [all-recursive] Error 1
>>
>>
>> Here's the lib info.
>>
>> portia $ cd Cbc/src
>> portia $ ar t .libs/libCbcSolver.
>> libCbcSolver.a    libCbcSolver.la   libCbcSolver.lai
>> portia $ ar t .libs/libCbcSolver.a
>> libcplex.a
>> libilocplex.a
>> lt1-libcplex.a
>> lt2-libilocplex.a
>> lt3-libcplex.a
>> lt4-libilocplex.a
>> libcplex.a
>> libilocplex.a
>> libcplex.a
>> libilocplex.a
>> libcplex.a
>> libilocplex.a
>> portia $ ls -l .libs/libCbcSolver.a
>> -rw-rw-r--    1 derjones xplat      61283112 Jun 02 15:04
>> .libs/libCbcSolver.a
>> portia $
>>
>>
>> portia $ file .libs/libCbcSolver.a
>> .libs/libCbcSolver.a: archive (big format)
>>
>> Any ideas? How about the configure?
>>
>> Help appreciated,
>>
>> Kind regards
>>
>> Derek.
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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
>



-- 
Dr. Ted Ralphs
Associate Professor, Lehigh University
(610) 628-1280
ted 'at' lehigh 'dot' edu
coral.ie.lehigh.edu/~ted





More information about the Coin-discuss mailing list