<div dir="ltr"><div dir="ltr">I made the library changes. I still get similar errors, so I guess it is a compiler compatibility issue. The reason I did everything with Rtools compilers was to make sure I do not run into compatibility issues following Don Boyd's note. I am not knowledgable about compilers. How do I check whether the compilers R is using are the same as the ones I compiled?</div><div dir="ltr"><br></div><div>For completeness, I copy the latest error message below. </div><div><br></div><div>g++ -m64 -shared -s -static-libstdc++ -static-libgcc -o ipoptr.dll tmp.def ipoptr.o IpoptRNLP.o IpoptRJournal.o -LC:/CoinIpopt/build/x64/lib -lipopt -lcoinmumps -lcoinlapack -lcoinblas -lcoinmetis -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<br>C:/CoinIpopt/build/x64/lib/libipopt.a(IpIpoptApplication.o):IpIpoptApplication.cpp:(.rdata$_ZTIN5Ipopt16ReferencedObjectE[_ZTIN5Ipopt16ReferencedObjectE]+0x0): multiple definition of `typeinfo for Ipopt::ReferencedObject'<br>IpoptRNLP.o:IpoptRNLP.cpp:(.data$_ZTIN5Ipopt16ReferencedObjectE[_ZTIN5Ipopt16ReferencedObjectE]+0x0): first defined here<br>C:/CoinIpopt/build/x64/lib/libipopt.a(IpJournalist.o):IpJournalist.cpp:(.rdata$_ZTIN5Ipopt7JournalE[_ZTIN5Ipopt7JournalE]+0x0): multiple definition of `typeinfo for Ipopt::Journal'<br>IpoptRJournal.o:IpoptRJournal.cpp:(.data$_ZTIN5Ipopt7JournalE[_ZTIN5Ipopt7JournalE]+0x0): first defined here<br>ipoptr.o:ipoptr.cpp:(.text+0xbb): undefined reference to `__gxx_personality_sj0'<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 27, 2019 at 1:49 AM Stefan Vigerske <<a href="mailto:stefan@math.hu-berlin.de">stefan@math.hu-berlin.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
you might want to check whether you indeed compiled Ipopt with the same <br>
C/C++/Fortran compilers that R is using.<br>
<br>
Further, this line shouldn't be in the linker flags that you posted:<br>
  -LC:\CoinIpopt\build\x64\Ipopt\src\Common\.libs -lcommon<br>
libcommon.a is part of libipopt.<br>
<br>
Also libcoinmumps, lapack, blas, metis should be picked up from the same <br>
directory where the Ipopt library was installed, probably <br>
C:/CoinIpopt/build/x64/lib, not C:/CoinIpopt/build/x64/ThirdParty/*/.libs<br>
<br>
Stefan<br>
<br>
On 9/26/19 11:47 PM, Serdar Altok wrote:<br>
> Hi,<br>
> <br>
> I am not sure if this list is an appropriate place to ask for help.<br>
> Apologies in advance if it is not.<br>
> <br>
> I am trying to install ipoptr in R-studio with R-3.2.5 on 64bit Windows 10.<br>
> I am following<br>
> <br>
> <a href="https://list.coin-or.org/pipermail/ipopt/2017-June/004471.html" rel="noreferrer" target="_blank">https://list.coin-or.org/pipermail/ipopt/2017-June/004471.html</a><br>
> <br>
> I have Rtools33(compatible with R-3.2.5). It comes with gcc-4.9.3 as far as<br>
> I understand. I do not have any other compilers installed.<br>
> <br>
> As third-party libraries I have downloaded Lapack, Blas, Mumps, Metis,<br>
> <br>
> I run configure, make, make install with no error messages as far as I see.<br>
> My makevars.win does not seem to be correct but depending on the error<br>
> messages I get, I make changes to include header files and link to<br>
> libraries. I use libraries under the mingw64 folder. I assume they are<br>
> compiled with gcc-4.9.3.<br>
> <br>
> I get<br>
> <br>
> g++ -m64 -shared -s -static-libgcc -o ipoptr.dll tmp.def ipoptr.o<br>
> IpoptRNLP.o IpoptRJournal.o -LC:/CoinIpopt/build/x64/lib -lipopt<br>
> -LC:/CoinIpopt/build/x64/ThirdParty/Mumps/.libs -lcoinmumps<br>
> -LC:/CoinIpopt/build/x64/ThirdParty/Lapack/.libs -lcoinlapack<br>
> -LC:/CoinIpopt/build/x64/ThirdParty/Blas/.libs -lcoinblas<br>
> -LC:/CoinIpopt/build/x64/ThirdParty/Metis/.libs -lcoinmetis<br>
> -LC:\CoinIpopt\build\x64\Ipopt\src\Common\.libs -lcommon<br>
> -LC:/Rtools/mingw_64/lib/gcc/x86_64-w64-mingw32/4.9.3 -lgfortran<br>
> -LC:/Rtools/mingw_64/x86_64-w64-mingw32/lib -lmingw32 -lmoldname -lmingwex<br>
> -lmsvcrt -lm -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -liconv<br>
> -LC:/Rtools/mingw_64/lib/gcc/x86_64-w64-mingw32/4.9.3 -lgfortran -lquadmath<br>
> -lstdc++ -LC:/PROGRA~1/R/R-32~1.5/bin/x64 -lR<br>
> C:/CoinIpopt/build/x64/lib/libipopt.a(IpIpoptApplication.o):IpIpoptApplication.cpp:(.rdata$_ZTIN5Ipopt16ReferencedObjectE[_ZTIN5Ipopt16ReferencedObjectE]+0x0):<br>
> multiple definition of `typeinfo for Ipopt::ReferencedObject'<br>
> IpoptRNLP.o:IpoptRNLP.cpp:(.data$_ZTIN5Ipopt16ReferencedObjectE[_ZTIN5Ipopt16ReferencedObjectE]+0x0):<br>
> first defined here<br>
> C:/CoinIpopt/build/x64/lib/libipopt.a(IpJournalist.o):IpJournalist.cpp:(.rdata$_ZTIN5Ipopt7JournalE[_ZTIN5Ipopt7JournalE]+0x0):<br>
> multiple definition of `typeinfo for Ipopt::Journal'<br>
> IpoptRJournal.o:IpoptRJournal.cpp:(.data$_ZTIN5Ipopt7JournalE[_ZTIN5Ipopt7JournalE]+0x0):<br>
> first defined here<br>
> ipoptr.o:ipoptr.cpp:(.text+0xbb): undefined reference to<br>
> `__gxx_personality_sj0'<br>
> ipoptr.o:ipoptr.cpp:(.text+0x11e): undefined reference to<br>
> `_Unwind_SjLj_Register'<br>
> ipoptr.o:ipoptr.cpp:(.text+0xa39): undefined reference to<br>
> `_Unwind_SjLj_Unregister'<br>
> ipoptr.o:ipoptr.cpp:(.text+0xb07): undefined reference to<br>
> `_Unwind_SjLj_Resume'<br>
> <br>
> As far as my google search goes gxx_personality errors are due to compiler<br>
> incompatibility between the library and the compiler and/or is related to<br>
> libstdc++. However I cannot resolve the problem.<br>
> <br>
> Any help would be greatly appreciated.<br>
> <br>
> <br>
> _______________________________________________<br>
> Ipopt mailing list<br>
> <a href="mailto:Ipopt@list.coin-or.org" target="_blank">Ipopt@list.coin-or.org</a><br>
> <a href="https://list.coin-or.org/mailman/listinfo/ipopt" rel="noreferrer" target="_blank">https://list.coin-or.org/mailman/listinfo/ipopt</a><br>
> <br>
<br>
</blockquote></div></div>