Re: [Rd] unable to load shared library: undefined symbol

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Sat, 21 Jul 2007 09:04:03 +0100 (BST)

This is nothing to do with R: you need to seek help from whoever you are 'wroking' for.

You don't have any libraries on your link command, but you do have include directories: please get your supervisor to explain how linking works and what to do to link against 'symphony'. (Are you confusing -L and -l?)

On Fri, 20 Jul 2007, Ctagz wrote:

>
> 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:
> _ZTIN4soam13SoamExceptionE
> 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
> -Lsoamapi
>
> 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/include
> -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?
>
> -Jon
>

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Sat 21 Jul 2007 - 08:09:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 21 Jul 2007 - 08:36:44 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.