[Ipopt] compilation of 3.7.0 failed

Paul Smith phhs80 at gmail.com
Sun Jul 19 13:41:18 EDT 2009


On Sun, Jul 19, 2009 at 5:15 PM, Dieter Kraft<kraft at hm.edu> wrote:
> Hi,
>
> has anybody been successful to compile ipopt 3.7.0
> with Fedora 11 and gcc 4.4.0?
>
> I get:
>
> configure: Configuration of Ipopt successful
> configure: Main configuration of Ipopt successful
> root at dk/usr/local/Ipopt> make
> Making all in ThirdParty/Metis
> make[1]: Entering directory `/usr/local/Ipopt-3.7.0/ThirdParty/Metis'
> if /bin/sh ./../../libtool --tag=CC --mode=compile gcc  -I. -I`echo .`
> -I`echo ./metis-4.0/Lib`   -O3 -fomit-frame-pointer -pipe -DNDEBUG    -MT
> balance.lo -MD -MP -MF ".deps/balance.Tpo" -c -o balance.lo `test -f
> 'metis-4.0/Lib/balance.c' || echo './'`metis-4.0/Lib/balance.c; \
>    then mv -f ".deps/balance.Tpo" ".deps/balance.Plo"; else rm -f
> ".deps/balance.Tpo"; exit 1; fi
> mkdir .libs
> gcc -I. -I. -I./metis-4.0/Lib -O3 -fomit-frame-pointer -pipe -DNDEBUG -MT
> balance.lo -MD -MP -MF .deps/balance.Tpo -c metis-4.0/Lib/balance.c
> -fPIC -DPIC -o .libs/balance.o
> In file included from ./metis-4.0/Lib/metis.h:36,
>                from metis-4.0/Lib/balance.c:16:
> ./metis-4.0/Lib/proto.h:462: error: conflicting types for '__log2'
> /usr/include/bits/mathcalls.h:145: note: previous declaration of '__log2'
> was here
> make[1]: *** [balance.lo] Error 1
> make[1]: Leaving directory `/usr/local/Ipopt-3.7.0/ThirdParty/Metis'
> make: *** [all-recursive] Error 1
> root at dk/usr/local/Ipopt>
>
> Compiler:
>
> dkraft at dk/usr/local/Ipopt-3.6.0/ThirdParty/HSL> gcc -v
> Using built-in specs.
> Target: i586-redhat-linux
> Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
> --infodir=/usr/share/info
> --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
> --enable-shared --enable-threads=posix --enable-checking=release
> --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
> --enable-languages=c,c++,objc,obj-c++,java,fortran,ada
> --enable-java-awt=gtk --disable-dssi --enable-plugin
> --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
> --enable-libgcj-multifile --enable-java-maintainer-mode
> --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
> --with-ppl --with-cloog --with-tune=generic --with-arch=i586
> --build=i586-redhat-linux
> Thread model: posix
> gcc version 4.4.0 20090506 (Red Hat 4.4.0-4) (GCC)
> dkraft at dk/usr/local/Ipopt-3.6.0/ThirdParty/HSL>
>
> if I exclude the definition of log2 in
> /usr/include/bits/mathcalls.h:145: note: previous declaration of '__log2'
> everything works. But is this allowed for the compilation of other software?

This happens because the new Fedora compiler is more demanding than
the previous one. The developers of Metis should not use 'log2' to
avoid conflicts. These conflicts were tolerated by less demanding
compilers, but not anymore with Fedora.

Use the following workaround:

replace the line

#define log2				__log2

with

#define log2				__log2_metis

in the file

Ipopt-3.6.1/ThirdParty/Metis/metis-4.0/Lib/rename.h.

Hope this helps you,

Paul




More information about the Ipopt mailing list