[Rd] unable to load shared library: undefined symbol

Ctagz jonathan.zhou at utoronto.ca
Fri Jul 20 20:50:28 CEST 2007

Hi all, 

I'm a summer University research student and I've been wroking on writing a
package, Rsoam, to integrate R with Platform's symphony software to allow
for distributed computing.  When I "R CMD check" the package, I get the
following error when trying to load the Rsoam.so after building Rsoam.cpp: 

* checking whether the package can be loaded ... ERROR
Loading required package: snow
Error in dyn.load(x, as.logical(local), as.logical(now)) : 
	unable to load shared library '/root/Rsoam.Rcheck/Rsoam/libs/Rsoam.so':
  /root/Rsoam.Rcheck/Rsoam/libs/Rsoam.so: undefined symbol:
Error in library(Rsoam) : .First.lib failed for 'Rsoam'
Error in dyn.unload(x) : dynamic/shared library
'/root/Rsoam.Rcheck/Rsoam/libs/Rsoam.so' was not loaded

            My Makevars file consists of: 

PKG_CPPFLAGS = -I/opt/symphonyDE/3.1/src -I/opt/symphonyDE/3.1/include
-DGCC34 -Wall -DLINUX -Wno-deprecated
PKG_LIBS = -L/opt/symphonyDE/3.1/src -L/opt/symphonyDE/3.1/include
-L/opt/symphonyDE/3.1/linux2.6-glibc2.3-x86/lib -LsampleCommon -Lsoambase

            and 00install.out has the following g++ build: 

g++ -I/usr/lib/R/include -I/usr/lib/R/include -I/opt/symphonyDE/3.1/src
-I/opt/symphonyDE/3.1/include -DGCC34 -Wall -DLINUX -Wno-deprecated
-I/usr/local/include    -fpic  -O2 -g -c Rsoam9.cpp -o Rsoam9.o
g++ -shared -Wl,-O1 -o Rsoam.so Rsoam9.o -L/opt/symphonyDE/3.1/src
-L/opt/symphonyDE/3.1/linux2.6-glibc2.3-x86/lib -LsampleCommon -Lsoambase
-Lsoamapi  -L/usr/lib/R/lib -lR

I thought I'd written the Makevars to a sufficient degree, but I guess that
may not actually be the case.  I understand that you guys are probably not
familiar with symphony, but I was hoping if someone could tell me what slips
through when I'm building this shared library?

View this message in context: http://www.nabble.com/unable-to-load-shared-library%3A-undefined-symbol-tf4118911.html#a11713874
Sent from the R devel mailing list archive at Nabble.com.

More information about the R-devel mailing list