[Ipopt] The Makefile under IpoptPkg/build/Ipopt/
lqc234
lqc234 at 126.com
Fri Dec 11 06:58:33 EST 2009
Hi
Thank you very much for your help so many times!
The previous mistakes disappered when i use gmake and define __USE_STD_IOSTREAM in the IpJournalist.hpp with your help.However there are also other erros.Those errors are resembling:
cxx: Error: /usr/lib/cmplrs/cxx/V6.3-008/include/cxx/iosfwd, line 139:
redefinition of default argument
template<class T, class charT = char, class traits=char_traits<charT> >
--------------------------^
cxx: Error: /usr/lib/cmplrs/cxx/V6.3-008/include/cxx/iosfwd, line 139:
redefinition of default argument
template<class T, class charT = char, class traits=char_traits<charT> >
----------------------------------------------^
cxx: Error: /usr/lib/cmplrs/cxx/V6.3-008/include/cxx/iosfwd, line 141:
redefinition of default argument
template<class T, class charT = char, class traits=char_traits<charT>,
--------------------------^
cxx: Error: /usr/lib/cmplrs/cxx/V6.3-008/include/cxx/iosfwd, line 141:
redefinition of default argument
template<class T, class charT = char, class traits=char_traits<charT>,
----------------------------------------------^
cxx: Error: /usr/lib/cmplrs/cxx/V6.3-008/include/cxx/iosfwd, line 142:
redefinition of default argument
class Distance = ptrdiff_t >
--------^
cxx: Error: /usr/lib/cmplrs/cxx/V6.3-008/include/cxx/ios, line 119: class
"std::char_traits<char>" has no member "pos_type"
detected during instantiation of class "std::basic_ios<charT,
traits> [with charT=char, traits=std::char_traits<char>]"
at line 457
typedef _TYPENAME traits::pos_type pos_type;
------------------------------^
cxx: Error: /usr/lib/cmplrs/cxx/V6.3-008/include/cxx/ios, line 120: class
"std::char_traits<char>" has no member "off_type"
detected during instantiation of class "std::basic_ios<charT,
traits> [with charT=char, traits=std::char_traits<char>]"
at line 457
typedef _TYPENAME traits::off_type off_type;
------------------------------^
I thought it was because I did't use the gnu c++ compiler.the reason was that I only wanted to use the gfortran as a fortran compiler which Ipopt needs and the previous programs which I want to add the Ipopt algorithm in were compiled by the native CXX compiler of alpha system.I want to consist with it,so I used the native CXX compiler.
There were too many errors,however I thought those errors are intrinsic the same:something used in native CXX are different with Ipopt and the differences seem too many.
Now I have two questions:
1.If I have to use the native CXX compiler, are there some methods to resolve the problems? Or it is impossible because of some intrinsic insurmountable difficulties?
2. If I use the gnu c++ compiler other than native CXX compiler to compile the Ipopt and there is no problem in the "make ,make install" stage. How can I link the lib generated by the gcc c++ compiler in the previous codes which compiled by the native CXX compiler? Is this idea possible in spite of different compiler? Or I could do something to adapt for this situation?
It seems too many question, Thank you for your help. I would greatly appreciate it!
Best Regards
LiuQuanchang
在2009-12-11?17:17:05,"Stefan?Vigerske"?<stefan at math.hu-berlin.de>?写道:
>Hi,
>
>looks?like?gmake?works?fine,?but?now?the?C++?compiler?cannot?handle?the
>Ipopt?source?code.
>I?think?you?said?that?you?have?the?Gnu?compiler?installed?on?that
>system??You?should?then?run?configure?again?with?the?additional
>arguments?CXX=g++?CC=gcc?F77=gfortran.?Not?so?sure?about?the?last?one,
>it?should?be?the?name?of?the?fortran?compiler,?if?needed.
>
>Stefan
>
>lqc234?wrote:
>>?Hi?!
>>?Thank?you?for?your?advises!
>>?I?have?tried?as?you?said.
>>?When?I?used?the?make?of?Digital?Unix
>>?1.?in?IpoptPkg/build/Ipopt/
>>???make?gives?the?same?error:
>>??Make:Makefile:Must?be?a?separator?on?line?93.Stop.
>>?2.?cd?IpoptPkg/build/Ipopt/src/Common
>>???make
>>???errors?said:
>>??
>>???$?make
>>?source='../../../../Ipopt/src/Common/IpDebug.cpp'?object='IpDebug.lo'?libtool=yes??DEPDIR=.deps?depmode=tru64?/bin/ksh?../../../../Ipopt/../depcomp??/bin/ksh?../../../libtool?--tag=CXX?--mode=compile?cxx?-DHAVE_CONFIG_H??-I.?-I`echo?../../../../Ipopt/src/Common`?-I../../inc??????-O??-DNDEBUG????-c?-o?IpDebug.lo?../../../../Ipopt/src/Common/IpDebug.cpp
>>??cxx?-DHAVE_CONFIG_H?-I.?-I../../../../Ipopt/src/Common?-I../../inc?-O?-DNDEBUG?-c?-MD?../../../../Ipopt/src/Common/IpDebug.cpp??-DPIC?-o?.libs/IpDebug.o
>>?cxx:?Error:?/usr/lib/cmplrs/cxx/V6.3-008/include/cxx/ostream,?line?58:?#error
>>???????????directive:?"cannot?include?ostream?--?define?__USE_STD_IOSTREAM?to
>>???????????override?default?-?see?section?7.1.2?of?the?C++?Using?Guide"
>>?#error?"cannot?include?ostream?--?define?__USE_STD_IOSTREAM?to?override?default?-?see?section?7.1.2?of?the?C++?Using?Guide"
>>?-^
>>?cxx:?Error:?../../../../Ipopt/src/Common/IpJournalist.hpp,?line?438:?
>>???????????namespace?"std"?has?no?member?"ostream"
>>?????void?SetOutputStream(std::ostream*?os);
>>?------------------------------^
>>?cxx:?Error:?../../../../Ipopt/src/Common/IpJournalist.hpp,?line?477:?
>>???????????namespace?"std"?has?no?member?"ostream"
>>?????std::ostream*?os_;
>>?---------^
>>?cxx:?Info:?3?errors?detected?in?the?compilation?of?"../../../../Ipopt/src/Common/IpDebug.cpp".
>>?***?Exit?1
>>?Stop.
>>?$?exit
>>?
>>?It?seems?that?the?cxx?has?some?problem?that?not?be?adaptable?to?the?Ipopt?
>>?
>>?
>>?
>>?When?I?used?gnu?make:
>>?1.in?IpoptPkg/build/
>>?it?said:
>>?cxx:?Error:?/usr/lib/cmplrs/cxx/V6.3-008/include/cxx/ostream,?line?58:?#error
>>???????????directive:?"cannot?include?ostream?--?define?__USE_STD_IOSTREAM?to
>>???????????override?default?-?see?section?7.1.2?of?the?C++?Using?Guide"
>>?#error?"cannot?include?ostream?--?define?__USE_STD_IOSTREAM?to?override?default?-?see?section?7.1.2?of?the?C++?Using?Guide"
>>?-^
>>?cxx:?Error:?../../../../Ipopt/src/Common/IpJournalist.hpp,?line?438:?
>>???????????namespace?"std"?has?no?member?"ostream"
>>?????void?SetOutputStream(std::ostream*?os);
>>?------------------------------^
>>?cxx:?Error:?../../../../Ipopt/src/Common/IpJournalist.hpp,?line?477:?
>>???????????namespace?"std"?has?no?member?"ostream"
>>?????std::ostream*?os_;
>>?---------^
>>?cxx:?Info:?3?errors?detected?in?the?compilation?of?"../../../../Ipopt/src/Common/IpDebug.cpp".
>>?gmake[2]:?***?[IpDebug.lo]?Error?1
>>?gmake[2]:?Leaving?directory?`/usr/users/df8002/gcclqc/Ipopt-3.6.1/build/Ipopt/src/Common'
>>?gmake[1]:?***?[all-recursive]?Error?1
>>?gmake[1]:?Leaving?directory?`/usr/users/df8002/gcclqc/Ipopt-3.6.1/build/Ipopt'
>>?gmake:?***?[all-recursive]?Error?1
>>?
>>?2.?in?IpoptPkg/build/Ipopt/
>>?gmake?
>>?said:
>>?$?gmake
>>?Making?all?in?src/Common
>>?gmake[1]:?Entering?directory?`/usr/users/df8002/gcclqc/Ipopt-3.6.1/build/Ipopt/src/Common'
>>?source='../../../../Ipopt/src/Common/IpDebug.cpp'?object='IpDebug.lo'?libtool=yes?\
>>?????DEPDIR=.deps?depmode=tru64?/bin/ksh?../../../../Ipopt/../depcomp?\
>>?????/bin/ksh?../../../libtool?--tag=CXX?--mode=compile?cxx?-DHAVE_CONFIG_H?-I.?-I`echo?../../../../Ipopt/src/Common`?-I../../inc?????-O??-DNDEBUG????-c?-o?IpDebug.lo?../../../../Ipopt/src/Common/IpDebug.cpp
>>??cxx?-DHAVE_CONFIG_H?-I.?-I../../../../Ipopt/src/Common?-I../../inc?-O?-DNDEBUG?-c?-MD?../../../../Ipopt/src/Common/IpDebug.cpp??-DPIC?-o?.libs/IpDebug.o
>>?cxx:?Error:?/usr/lib/cmplrs/cxx/V6.3-008/include/cxx/ostream,?line?58:?#error
>>???????????directive:?"cannot?include?ostream?--?define?__USE_STD_IOSTREAM?to
>>???????????override?default?-?see?section?7.1.2?of?the?C++?Using?Guide"
>>?#error?"cannot?include?ostream?--?define?__USE_STD_IOSTREAM?to?override?default?-?see?section?7.1.2?of?the?C++?Using?Guide"
>>?-^
>>?cxx:?Error:?../../../../Ipopt/src/Common/IpJournalist.hpp,?line?438:?
>>???????????namespace?"std"?has?no?member?"ostream"
>>?????void?SetOutputStream(std::ostream*?os);
>>?------------------------------^
>>?cxx:?Error:?../../../../Ipopt/src/Common/IpJournalist.hpp,?line?477:?
>>???????????namespace?"std"?has?no?member?"ostream"
>>?????std::ostream*?os_;
>>?---------^
>>?cxx:?Info:?3?errors?detected?in?the?compilation?of?"../../../../Ipopt/src/Common/IpDebug.cpp".
>>?gmake[1]:?***?[IpDebug.lo]?Error?1
>>?gmake[1]:?Leaving?directory?`/usr/users/df8002/gcclqc/Ipopt-3.6.1/build/Ipopt/src/Common'
>>?gmake:?***?[all-recursive]?Error?1
>>?3.cd?IpoptPkg/build/Ipopt/src/Common
>>?$?gmake
>>?source='../../../../Ipopt/src/Common/IpDebug.cpp'?object='IpDebug.lo'?libtool=yes?\
>>?????DEPDIR=.deps?depmode=tru64?/bin/ksh?../../../../Ipopt/../depcomp?\
>>?????/bin/ksh?../../../libtool?--tag=CXX?--mode=compile?cxx?-DHAVE_CONFIG_H?-I.?-I`echo?../../../../Ipopt/src/Common`?-I../../inc?????-O??-DNDEBUG????-c?-o?IpDebug.lo?../../../../Ipopt/src/Common/IpDebug.cpp
>>??cxx?-DHAVE_CONFIG_H?-I.?-I../../../../Ipopt/src/Common?-I../../inc?-O?-DNDEBUG?-c?-MD?../../../../Ipopt/src/Common/IpDebug.cpp??-DPIC?-o?.libs/IpDebug.o
>>?cxx:?Error:?/usr/lib/cmplrs/cxx/V6.3-008/include/cxx/ostream,?line?58:?#error
>>???????????directive:?"cannot?include?ostream?--?define?__USE_STD_IOSTREAM?to
>>???????????override?default?-?see?section?7.1.2?of?the?C++?Using?Guide"
>>?#error?"cannot?include?ostream?--?define?__USE_STD_IOSTREAM?to?override?default?-?see?section?7.1.2?of?the?C++?Using?Guide"
>>?-^
>>?cxx:?Error:?../../../../Ipopt/src/Common/IpJournalist.hpp,?line?438:?
>>???????????namespace?"std"?has?no?member?"ostream"
>>?????void?SetOutputStream(std::ostream*?os);
>>?------------------------------^
>>?cxx:?Error:?../../../../Ipopt/src/Common/IpJournalist.hpp,?line?477:?
>>???????????namespace?"std"?has?no?member?"ostream"
>>?????std::ostream*?os_;
>>?---------^
>>?cxx:?Info:?3?errors?detected?in?the?compilation?of?"../../../../Ipopt/src/Common/IpDebug.cpp".
>>?gmake:?***?[IpDebug.lo]?Error?1
>>?
>>?
>>?All?these?errors?seem?that?std:ostream?have?something?wrong?in?cc?of?alpha?system?with?Ipopt.?I?really?have?no?idea.Any?suggestion??Thanks?very?much!
>>??LiuQuanchang
>>?
>>?在2009-12-10?21:02:16,"Stefan?Vigerske"?<stefan at math.hu-berlin.de>?写道:
>>>?Hi,
>>>
>>>?I?do?not?really?see?anything?offensive?in?line?93?of?this?Makefile?either.
>>>?Try?the?following?things:
>>>?1.?cd?IpoptPkg/build/Ipopt/
>>>????make
>>>????Does?this?give?the?same?error?
>>>?2.?cd?IpoptPkg/build/Ipopt/src/Common
>>>????make
>>>????What?is?the?output?here?
>>>
>>>?Steven's?suggestion?to?use?GNU?make?is?also?a?good?idea.
>>>?If?you?already?have?gmake,?try?using?gmake?instead?of?make.
>>>?Maybe?you?need?to?reconfigure?with?the?option?MAKE=gmake.
>>>
>>>?Stefan
>>>
>>>?--?
>>>?Stefan?Vigerske
>>>?Humboldt?University?Berlin,?Numerical?Mathematics
>>>?http://www.math.hu-berlin.de/~stefan
>
>
>--?
>Stefan?Vigerske
>Humboldt?University?Berlin,?Numerical?Mathematics
>http://www.math.hu-berlin.de/~stefan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/ipopt/attachments/20091211/84281f42/attachment-0001.html
More information about the Ipopt
mailing list