[Ipopt] ipoptr installation-undefined reference to gxx_personality

Stefan Vigerske stefan at math.hu-berlin.de
Fri Sep 27 04:49:26 EDT 2019


Hi,

you might want to check whether you indeed compiled Ipopt with the same 
C/C++/Fortran compilers that R is using.

Further, this line shouldn't be in the linker flags that you posted:
  -LC:\CoinIpopt\build\x64\Ipopt\src\Common\.libs -lcommon
libcommon.a is part of libipopt.

Also libcoinmumps, lapack, blas, metis should be picked up from the same 
directory where the Ipopt library was installed, probably 
C:/CoinIpopt/build/x64/lib, not C:/CoinIpopt/build/x64/ThirdParty/*/.libs

Stefan

On 9/26/19 11:47 PM, Serdar Altok wrote:
> Hi,
> 
> I am not sure if this list is an appropriate place to ask for help.
> Apologies in advance if it is not.
> 
> I am trying to install ipoptr in R-studio with R-3.2.5 on 64bit Windows 10.
> I am following
> 
> https://list.coin-or.org/pipermail/ipopt/2017-June/004471.html
> 
> I have Rtools33(compatible with R-3.2.5). It comes with gcc-4.9.3 as far as
> I understand. I do not have any other compilers installed.
> 
> As third-party libraries I have downloaded Lapack, Blas, Mumps, Metis,
> 
> I run configure, make, make install with no error messages as far as I see.
> My makevars.win does not seem to be correct but depending on the error
> messages I get, I make changes to include header files and link to
> libraries. I use libraries under the mingw64 folder. I assume they are
> compiled with gcc-4.9.3.
> 
> I get
> 
> g++ -m64 -shared -s -static-libgcc -o ipoptr.dll tmp.def ipoptr.o
> IpoptRNLP.o IpoptRJournal.o -LC:/CoinIpopt/build/x64/lib -lipopt
> -LC:/CoinIpopt/build/x64/ThirdParty/Mumps/.libs -lcoinmumps
> -LC:/CoinIpopt/build/x64/ThirdParty/Lapack/.libs -lcoinlapack
> -LC:/CoinIpopt/build/x64/ThirdParty/Blas/.libs -lcoinblas
> -LC:/CoinIpopt/build/x64/ThirdParty/Metis/.libs -lcoinmetis
> -LC:\CoinIpopt\build\x64\Ipopt\src\Common\.libs -lcommon
> -LC:/Rtools/mingw_64/lib/gcc/x86_64-w64-mingw32/4.9.3 -lgfortran
> -LC:/Rtools/mingw_64/x86_64-w64-mingw32/lib -lmingw32 -lmoldname -lmingwex
> -lmsvcrt -lm -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv
> -LC:/Rtools/mingw_64/lib/gcc/x86_64-w64-mingw32/4.9.3 -lgfortran -lquadmath
> -lstdc++ -LC:/PROGRA~1/R/R-32~1.5/bin/x64 -lR
> C:/CoinIpopt/build/x64/lib/libipopt.a(IpIpoptApplication.o):IpIpoptApplication.cpp:(.rdata$_ZTIN5Ipopt16ReferencedObjectE[_ZTIN5Ipopt16ReferencedObjectE]+0x0):
> multiple definition of `typeinfo for Ipopt::ReferencedObject'
> IpoptRNLP.o:IpoptRNLP.cpp:(.data$_ZTIN5Ipopt16ReferencedObjectE[_ZTIN5Ipopt16ReferencedObjectE]+0x0):
> first defined here
> C:/CoinIpopt/build/x64/lib/libipopt.a(IpJournalist.o):IpJournalist.cpp:(.rdata$_ZTIN5Ipopt7JournalE[_ZTIN5Ipopt7JournalE]+0x0):
> multiple definition of `typeinfo for Ipopt::Journal'
> IpoptRJournal.o:IpoptRJournal.cpp:(.data$_ZTIN5Ipopt7JournalE[_ZTIN5Ipopt7JournalE]+0x0):
> first defined here
> ipoptr.o:ipoptr.cpp:(.text+0xbb): undefined reference to
> `__gxx_personality_sj0'
> ipoptr.o:ipoptr.cpp:(.text+0x11e): undefined reference to
> `_Unwind_SjLj_Register'
> ipoptr.o:ipoptr.cpp:(.text+0xa39): undefined reference to
> `_Unwind_SjLj_Unregister'
> ipoptr.o:ipoptr.cpp:(.text+0xb07): undefined reference to
> `_Unwind_SjLj_Resume'
> 
> As far as my google search goes gxx_personality errors are due to compiler
> incompatibility between the library and the compiler and/or is related to
> libstdc++. However I cannot resolve the problem.
> 
> Any help would be greatly appreciated.
> 
> 
> _______________________________________________
> Ipopt mailing list
> Ipopt at list.coin-or.org
> https://list.coin-or.org/mailman/listinfo/ipopt
> 



More information about the Ipopt mailing list