[Ipopt] compilation problem with gcc

Tom Vacek vacek008 at umn.edu
Sun Jun 19 21:09:26 EDT 2011


Make sure that you have a complete GNU build environment. The Solaris 
package that contained all this used to be called GNU binutils (or 
something like that), but I haven't used Solaris for a few years. On 
Solaris systems, gnu software is usually prefixed with a "g", so useful 
programs would be called called gmake, gar, gas, etc. You may have to 
alias some of these things if there aren't makefile options to set them. 
Finally, make sure that the Fortran compiler is from the same suite 
(3.4.3) as your C and C++ compilers. I think the command should be f77 
in your case.

I hope one of these suggestions is the right one.

Tom

On 06/19/2011 05:52 PM, Lqc wrote:
>
> 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 I heard 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 remainsreferenced/
>
> /against symboloffsetin file/
>
> /<unknown>0xa1.libs/libipopt.lax/libcoinhsl.a/ma27ad.o/
>
> /ma27ad.t$40x19b.libs/libipopt.lax/libcoinhsl.a/ma27ad.o/
>
> /ma27ad.SRC_LOC$10x1aa.libs/libipopt.lax/libcoinhsl.a/ma27ad.o/
>
> /ma27ad.t$60x281.libs/libipopt.lax/libcoinhsl.a/ma27ad.o/
>
> //
>
> /¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­./
>
> /¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­./
>
> /¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­¡­/
>
> /__f90_ssfw0x1bc.libs/libipopt.lax/libcoinhsl.a/ma27ad.o/
>
> /__f90_ssfw0x2a2.libs/libipopt.lax/libcoinhsl.a/ma27ad.o/
>
> /__f90_ssfw0x360.libs/libipopt.lax/libcoinhsl.a/ma27ad.o/
>
> /__f90_ssfw0x424.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 errors in 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
>
>
>
>
>
>
>
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/ipopt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20110619/1e9b6e42/attachment-0001.html 


More information about the Ipopt mailing list