Skip to content

Multiple sub-architecture: linking issue

9 messages · Simon Urbanek, Renaud Gaujoux, Dirk Eddelbuettel

#
Hi again,

following my previous post on RCurl, I cannot install Rcpp either:

g++ -m32 -I/home/renaud/bin/R/2.15/lib64/R/include 
-I/home/renaud/bin/R/2.15/lib64/R/include/i386 -DNDEBUG 
-I../inst/include/ -I/usr/local/include    -fpic  -g -O2  -c r_cast.cpp 
-o r_cast.o
g++ -m32 -shared -L/usr/local/lib64 -o Rcpp.so Date.o DateVector.o 
Datetime.o DatetimeVector.o Dimension.o DottedPair.o Environment.o 
Evaluator.o Formula.o Function.o Language.o Module.o Pairlist.o 
Promise.o RObject.o RcppCommon.o Rcpp_init.o Reference.o Rostream.o 
Rstreambuf.o S4.o Symbol.o WeakReference.o barrier.o cache.o coerce.o 
complex.o debugging.o exceptions.o posixt.o r_cast.o
/usr/bin/ld: skipping incompatible 
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.so when 
searching for -lstdc++
/usr/bin/ld: skipping incompatible 
/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/libstdc++.a when 
searching for -lstdc++
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status

There is definitely some conflict or missing libraries going on...
Any help is appreciated.

Thank you.

PS: Dirk do you want me to post this on the Rcpp list for record?
#
Make sure you have installed multilib gcc and the ia32 dev packages - it seems you don't have them. I'm a

Sent from my iPhone
On Jun 8, 2012, at 6:27 AM, Renaud Gaujoux <renaud at mancala.cbio.uct.ac.za> wrote:

            
#
Thank you for your reply Simon.

I have the gcc-multilib and ia32-libs packages installed (I think their 
installation is part of the procedure you described in your previous 
post). Could not find the package ia32-dev you mention. It seems to be 
flagged as obsolete in Natty repositories:

$ sudo apt-get install  ia32-libs-dev lib32readline6-dev 
lib32ncurses5-dev lib32icu-dev gcc-multilib gfortran-multilib
[sudo] password for renaud:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs-dev is not available, but is referred to by another 
package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
   lib32bz2-dev ia32-libs lib32z1-dev

I succeeded in compiling both architecture of R without a problem 
though. Would that have been possible if some of the files provided by 
this package were missing?
I can try look around for this exact package.
#
R doesn't use C++ nor the other libraries so you wouldn't find out about such missing pieces. Unfortunately I'm traveling w/o computer today so I can't look up what you need. If someone doesn't beat me to it I'll have a look when I get back.
Simon

Sent from my iPhone
On Jun 8, 2012, at 11:08 AM, Renaud Gaujoux <renaud at mancala.cbio.uct.ac.za> wrote:

            
2 days later
#
On 8 June 2012 at 12:27, Renaud Gaujoux wrote:
| PS: Dirk do you want me to post this on the Rcpp list for record?

Yes, that generally is where Rcpp questions / comments / hints should go. 

As for multi-arch builds, I am not sure we even thought about supporting this so if
it breaks your use of Rcpp and related packages, you get to keep the pieces.
That said, I'd be interested in supporting it eventually but I guess I want
to first understand better how/if it is supported (on Linux) by R itself.

Dirk
#
On Jun 10, 2012, at 9:24 PM, Dirk Eddelbuettel wrote:

            
R itself of course supports it and essentially all packages (including Rcpp ;)) have to because we require it on Windows and OS X since all binaries there are multi-lib. As far as R is concerned it works equally well on Linux - the problem there is more on the side of distributions, because it is more unusual to have multi-lib Linux (originally it was used on Linux only to get 3rd party [mostly proprietary] 32-bit binaries working on 64-bit systems and that is now less of an issue). As I said in the original post it works reasonably well on Debian (not for all libraries since only a subset is available, but all the basic ones) -- there were shakeups in Ubuntu which were messing with the multilib support, so I don't know the current status but I can check at work tomorrow (probably not for something as ancient as natty, though).

Cheers,
Simon
#
On 11 June 2012 at 09:33, Renaud Gaujoux wrote:
| On 11/06/2012 03:43, Simon Urbanek wrote:
|     As far as R is concerned it works equally well on Linux - the problem there is more on the side of distributions, because it is more unusual to have multi-lib Linux (originally it was used on Linux only to get 3rd party [mostly proprietary] 32-bit binaries working on 64-bit systems and that is now less of an issue). As I said in the original post it works reasonably well on Debian (not for all libraries since only a subset is available, but all the basic ones) -- there were shakeups in Ubuntu which were messing with the multilib support, so I don't know the current status but I can check at work tomorrow (probably not for something as ancient as natty, though).

Right.  I still haven't gotten bugged within Debian to ensure that my
packages are build.  More and more 'core' libraries seem to appear in
multi-arch mode though.  We're getting there, slowly but surely.
 
| I think you are right Simon: the issue likely comes from my Linux distrib,
| which I effectively should upgrade. This gives me one more reason to do it
| asap.

[ As a total aside: A nice low risk option is to first test in a virtual
env. I am very happy with my virtual instances, using Kvm and libvirt, on my
main server ... ]

| If you have some -- even untested -- clues on how to get things working on
| Natty I am happy to test them though, as upgrades always have hidden issues and
| time black holes...

I usually disagree with statements like this. Debian does this pretty reliably, and
I also update all my Ubuntu machines within a few weeks of the releases. And
Ubuntu 12.04 has been a rather smooth upgrade on all of them. But if you're
several releases behind, maybe you did more 'funky' stuff you now need to
consider.

Dirk, who thinks this should have been on r-sig-debian all along
1 day later