[Ipopt] compilation problem with gcc

Lqc lqc234 at 126.com
Sun Jun 19 20:52:19 EDT 2011


hello,everybody!

     I’am puzzled about some Ipopt questions. I use Ipopt-3.8.1 on my Solaris X86 system. Thirdparties of Ipopt are HSL,ma27,ma19 and BLAS. There are two compilers in my system: gcc(version 3.4.3) and CC. Ipopt used CC compiler defaultly and there is no compilation problem with CC. However our software is compiled by  gcc,I want to use gcc compiler to compile the Ipopt lib because Iheard there might be some problem linking a lib compiled by cc in an application compiled by gcc.

According to the manual, I compiled the Ipopt like this: 

mkdir build

cd build

../configure CXX=g++ CC=gcc

There are my problems in the compilation . Such as :

 ..........................................................................

 ...........................................................................

Text relocation remains                        referenced

   against symbol                 offset     in file

<unknown>                          0xa1       .libs/libipopt.lax/libcoinhsl.a/ma27ad.o

ma27ad.t$4                         0x19b      .libs/libipopt.lax/libcoinhsl.a/ma27ad.o

ma27ad.SRC_LOC$1                   0x1aa      .libs/libipopt.lax/libcoinhsl.a/ma27ad.o

ma27ad.t$6                         0x281      .libs/libipopt.lax/libcoinhsl.a/ma27ad.o

 

……………………………………….

……………………………………….

………………………………………

__f90_ssfw                         0x1bc      .libs/libipopt.lax/libcoinhsl.a/ma27ad.o

__f90_ssfw                         0x2a2      .libs/libipopt.lax/libcoinhsl.a/ma27ad.o

__f90_ssfw                         0x360      .libs/libipopt.lax/libcoinhsl.a/ma27ad.o

__f90_ssfw                         0x424      .libs/libipopt.lax/libcoinhsl.a/ma27ad.o

ld: fatal: relocations remain against allocatable but non-writable sections

collect2: ld returned 1 exit status.

………………………………..

………………………………..

 

 

I record the compile procedure and the errorsin the 1.txt.

 

I found that these questions were about“ma27” and“f90”,so I thought that it might be caused by the fortran compiler. I checked the configure procedure and found Ipopt used f95 to compile. There is another fortran compiler : f90 in my system, “might it be caused by the f95 compiler?” I asked myself.

 Then I used

../configure CXX=g++ CC=gcc F77=f90

      to compile the Ipopt.

However ,there are still the questions.

       I put the compile procedure which includs the errors in the 2.txt.

 

As I said there was no problem using CC to compile the Ipopt. Firstly, I compiled the Ipopt with CC. Then  I compiled my application. I used qmake of  QT to generate the Makefile. Qmake uses gcc to compile the application.(I have no choice even I write the Makefile myself without generating Makefile by qmake because ur software is compiled with gcc). There are also some errors which puzzled me greatly. Errors are like the following:

 

       In file included from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/../../../../include/c++/3.4.3/vector:72,

                from ../../thirdparty/ipopt/Ipopt/src/Common/IpJournalist.hpp:28,

                from ../../thirdparty/ipopt/Ipopt/src/Common/IpException.hpp:13,

                from ../../thirdparty/ipopt/Ipopt/src/Interfaces/IpTNLP.hpp:14,

                from reatvOptSolver.h:3,

                from reatvOptSolver.cpp:12:

/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/stl_bvector.h: In member function `void std::vector<bool, _Alloc>::_M_insert_range(std::_Bit_iterator, _ForwardIterator, _ForwardIterator, std::forward_iterator_tag)':

/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/stl_bvector.h:522: error: expected unqualified-id before '(' token

/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/stl_bvector.h: In member function `void std::vector<bool, _Alloc>::_M_fill_insert(std::_Bit_iterator, size_t, bool)':

/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/stl_bvector.h:823: error: expected unqualified-id before '(' token

In file included from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/../../../../include/c++/3.4.3/vector:75,

                from ../../thirdparty/ipopt/Ipopt/src/Common/IpJournalist.hpp:28,

                from ../../thirdparty/ipopt/Ipopt/src/Common/IpException.hpp:13,

                from ../../thirdparty/ipopt/Ipopt/src/Interfaces/IpTNLP.hpp:14,

                from reatvOptSolver.h:3,

                from reatvOptSolver.cpp:12:

/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/vector.tcc: In member function `void std::vector<_Tp, _Alloc>::_M_fill_insert(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >, size_t, const _Tp&)':

/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/vector.tcc:307: error: expected unqualified-id before '(' token

/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/vector.tcc: In member function `void std::vector<_Tp, _Alloc>::_M_range_insert(__gnu_cxx::__normal_iterator<typename _Alloc::pointer, std::vector<_Tp, _Alloc> >, _ForwardIterator, _ForwardIterator, std::forward_iterator_tag)':

/usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/../../../../include/c++/3.4.3/bits/vector.tcc:384: error: expected unqualified-id before '(' token

 

 

    I record the compile procedure in the 4.txt.

 

 

 

   I have tried for many times and several days, however have no idea about the errors yet. I am not familiar with configure and Makefile, and Ipopt seems too complicated for me. The compile procedure of the cases I described are  attached in the mail. Anyone can give me some suggestions? I  appreciate greatly for your help!!!! Thank you very much!

                                                                                               Liu Quanchang




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20110620/02218bff/attachment-0001.html 


More information about the Ipopt mailing list