Opened 10 years ago
Closed 9 years ago
#3361 closed defect (fixed)
Build on OS X fails
Reported by: | Henning Kiel | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Build Environment | Version: | trunk |
Keywords: | Cc: | Martin Sjölund, dersh@… |
Description
Right out of the box compilation (as advertised) did never work for my machine. However, I could get it to compile successfully with some PATH magic etc.
Since the moving of the repo to GIT it keeps failing whatever I do.
I start this ticket to get the compilation up and running again.
Target is with plain commands (from git), NOT via macports package.
Change History (8)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
This is my build environment:
$ clang --version clang version 3.5.2 (tags/RELEASE_352/final) Target: x86_64-apple-darwin13.4.0 Thread model: posix $ autoconf ; ./configure CC=clang CXX=clang++ NO_IPOPT=yes ; gmake omc
comment:3 by , 10 years ago
I'm wondering why Ipopt is compiled, though I disabled it with NO_IPOPT=yes at configure.
Also, the version number 0.0.0 seems odd (though it is even ;-) )
Anyway, Ipopt does not link because of these errors:
clang++ -dynamiclib -single_module -o .libs/libipopt.0.0.0.dylib .libs/libipopt.0.0.0.dylib-master.o -L/Users/henning/src/OpenModelica/build/lib/x86_64-darwin13.4.0/omc -L/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.4 -L/opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.4/../../.. /Users/henning/src/OpenModelica/OMCompiler/3rdParty/Ipopt/ThirdParty/Mumps/.libs/libcoinmumps.dylib /opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.4/../../../libgfortran.dylib /opt/local/lib/gcc48/gcc/x86_64-apple-darwin13/4.8.4/../../../libquadmath.dylib -lgfortran -lSystem -lquadmath -llapack -lblas -lm -ldl -install_name /Users/henning/src/OpenModelica/OMCompiler/3rdParty/Ipopt/lib/libipopt.0.dylib -compatibility_version 1 -current_version 1.0 Undefined symbols for architecture x86_64: "std::string::rfind(char const*, unsigned long, unsigned long) const", referenced from: Ipopt::RegisteredOptions::GetOption(std::string const&) in libipopt.0.0.0.dylib-master.o [... more errors of same type ...] "vtable for std::basic_streambuf<char, std::char_traits<char> >", referenced from: Ipopt::IpoptApplication::Initialize(std::string) in libipopt.0.0.0.dylib-master.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) Makefile:478: recipe for target 'libipopt.la' failed gmake[5]: *** [libipopt.la] Error 1 gmake[5]: Leaving directory '/Users/henning/src/OpenModelica/OMCompiler/3rdParty/Ipopt/Ipopt/src/Interfaces' Makefile:673: recipe for target 'all-recursive' failed gmake[4]: *** [all-recursive] Error 1 gmake[4]: Leaving directory '/Users/henning/src/OpenModelica/OMCompiler/3rdParty/Ipopt/Ipopt' Makefile:323: recipe for target 'all-recursive' failed gmake[3]: *** [all-recursive] Error 1 gmake[3]: Leaving directory '/Users/henning/src/OpenModelica/OMCompiler/3rdParty/Ipopt' Makefile.common:118: recipe for target '/Users/henning/src/OpenModelica/build/lib/x86_64-darwin13.4.0/omc/libipopt.la' failed gmake[2]: *** [/Users/henning/src/OpenModelica/build/lib/x86_64-darwin13.4.0/omc/libipopt.la] Error 2 gmake[2]: Leaving directory '/Users/henning/src/OpenModelica/OMCompiler' Makefile:79: recipe for target 'omc-bootstrapped' failed gmake[1]: *** [omc-bootstrapped] Error 2 gmake[1]: Leaving directory '/Users/henning/src/OpenModelica/OMCompiler' Makefile:6: recipe for target 'omc' failed gmake: *** [omc] Error 2
Anyone got some ideas on how to fix this?
comment:4 by , 10 years ago
Cc: | added |
---|
comment:5 by , 9 years ago
I have the same issue. I tried to compile on omc-bootstrapped and got a similar error
comment:8 by , 9 years ago
Milestone: | 1.9.4 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
OMCompiler/3rdParty/ModelicaExternalC is configured with --disable-shared, but afterwards .dylib is expected:
I changed to --enable-shared to make it work.