rwinlib / gcc-4.9.3

Building R for Windows with the new gcc 4.9.3 toolchain
28 stars 7 forks source link

nloptr #8

Open jimhester opened 8 years ago

jimhester commented 8 years ago

nlopt needs to be recompiled with the new toolchain

C:/Rtools33/mingw_32/bin/g++ -shared -s -static-libgcc -o nloptr.dll tmp.def dummy.o nloptr.o -LC:/Rcompile/CRANpkg/extralibs215/nlopt/i386/lib -lnlopt_cxx -LC:/local/test/lib/i386 -LC:/local/test/lib -LC:/PROGRA~1/R/R-devel/bin/i386 -lR
C:/Rcompile/CRANpkg/extralibs215/nlopt/i386/lib/libnlopt_cxx.a(stogo.o): In function `stogo_minimize':
c:\tmp\nlopt-2.4\stogo/stogo.cc:39: undefined reference to `__gxx_personality_sj0'
c:\tmp\nlopt-2.4\stogo/stogo.cc:39: undefined reference to `_Unwind_SjLj_Register'
C:/Rcompile/CRANpkg/extralibs215/nlopt/i386/lib/libnlopt_cxx.a(stogo.o): In function `~RVector':
c:\tmp\nlopt-2.4\stogo/linalg.h:36: undefined reference to `_Unwind_SjLj_Unregister'
c:\tmp\nlopt-2.4\stogo/linalg.h:36: undefined reference to `_Unwind_SjLj_Resume'
#etc...
jeroen commented 8 years ago

OK I'll get on that

jeroen commented 8 years ago

Here you go: http://www.stat.ucla.edu/~jeroen/mingw-w64/libraries/nlopt-2.4.2.zip

jimhester commented 8 years ago

FWIW nloptr uses a different layout than the local libraries (https://github.com/jyypma/nloptr/blob/master/src/Makevars.win#L22-L23)

nlopt/{x64,i386}/{include,lib} rather than nlopt/include, nlopt/lib/{x64,i386}.

Copying the files to the proper structure for this case worked. I also recompiled the library myself using the source from http://win-builder.r-project.org/GPLcompliance/ which also worked.