Dear developers, I am a maintainer of the CORElearn package which uses OpenMP multithreading to speed up some computations. When producing a new release we tested the package with the latest R 2.12.0. On Linux the package works normally. On Windows we installed a recommended version of Rtools (Rtools212) but the linker fails with the messages below. ... g++ -I"C:/Util/R/R-2.12.0/include" -fopenmp -O2 -Wall -c trutilReg.cpp -o trutilReg.o g++ -I"C:/Util/R/R-2.12.0/include" -fopenmp -O2 -Wall -c utils.cpp -o utils.o g++ -shared -s -static-libgcc -o CORElearn.dll tmp.def Rconvert.o Rfront.o binarize.o binarizeReg.o binnode.o binnodeReg.o binpart.o bintree.o bintreeReg.o c45read.o calibrate.o constrct.o constrctReg.o cost.o dataStore.o error.o estCommon.o estOrdAttr.o estimator.o estimatorReg.o expr.o exprReg.o frontend.o ftree.o kdtree.o mathutil.o menu.o model.o modelReg.o mstring.o new_new.o nrutil.o options.o printUtil.o prune.o pruneReg.o random.o regtree.o relieff.o rfRegularize.o rfUtil.o rndforest.o rrelieff.o treenode.o treenodeReg.o trutil.o trutilReg.o utils.o -fopenmp -LC:/Util/R/R-2.12.0/bin/i386 -lR c:/util/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/libgomp.a(parallel.o):(.te xt+0x19): undefined reference to `_imp__pthread_getspecific' c:/util/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/libgomp.a(parallel.o):(.te xt+0x7a): undefined reference to `_imp__pthread_mutex_lock' c:/util/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/libgomp.a(parallel.o):(.te xt+0x9a): undefined reference to `_imp__pthread_mutex_unlock' c:/util/rtools/mingw/bin/../lib/gcc/mingw32/4.5.0/libgomp.a(parallel.o):(.te xt+0xfa): undefined reference to `_imp__pthread_getspecific' ... hundreds of error messages follow... On R 2.11.1 and 32 bit Windows the package worked fine. Since Rtools now uses gcc 4.5.0 and libgomp-4.5.0, which do support OpenMP, I do not know what is wrong. In Makevars.win I use PKG_CXXFLAGS = -fopenmp PKG_LIBS = -fopenmp Suspecting that errors may be caused by a wrong underscore convention I experimented with the SYMPAT variable in etc/Makeconf, but without success. My guess is that gomp library provided with Rtools212 is using a different underscore convention as the rest of the gcc. Can you suggest some solution, please? Best regards, Marko
On November 19, 2010 07:58:40 am Marko Robnik-?ikonja wrote:> Dear developers, > > I am a maintainer of the CORElearn package which uses OpenMP > multithreading to speed up some computations. When producing a new > release we tested the package with the latest R 2.12.0. On Linux the > package works normally. On Windows we installed a recommended > version of Rtools (Rtools212) but the linker fails with the messages > below.[...]> Suspecting that errors may be caused by a wrong underscore convention > I experimented with the SYMPAT variable in etc/Makeconf, but > without success. My guess is that gomp library provided with > Rtools212 is using a different underscore convention as the rest of > the gcc. Can you suggest some solution, please?The cause is that Rtools does not include libthread, which libgomp depends on. I ran into the same problem as you (see the thread: http://article.gmane.org/gmane.comp.lang.r.devel/25764/). It didn't look like libthread will be allowed into RTools, so now we turn OpenMP off on Windows. Please let me know if you figure out a better solution. Thanks, Davor
Apparently Analagous Threads
- problem building R 2.12.1 64-bit on Windows 7
- Naive Bayes Classifier
- Rtools - "The setup files are corrupted" message when trying to install
- make check-all error on Win 7 with 2-12-.0: vfork: Resource temporarily unavailable
- custom package not installed for 'arch=i386'