[R] loading igraph package on Solaris
Peter McMahan
peter.mcmahan at gmail.com
Fri Jan 11 01:21:28 CET 2008
With a fresh copy of igraph 0.4.5 I made all of the changes at
http://code.google.com/p/igraph/issues/detail?id=1
*except* for those to rinterface.c (I know very little about C and it
wasn't clear what changes should be made).
This still left some errors with pottsmodel_2.cpp ('Overloading
ambiguity between "std::log(double)" and "std::log(long double)"'),
which I worked around by replacing the offending instances of
"log(foo)" with "log(static_cast<double>(foo))". (again, C and C++ are
mostly black boxes to me, so I have no idea if this was the right
thing to do)
I compiled and installed using:
R CMD INSTALL --configure-args="CC='gcc'" igraph
and still, library(igraph) gives me:
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library '/home/mcmahan/R/i386-pc-
solaris2.10-library/2.5/igraph/libs/igraph.so':
ld.so.1: R: fatal: relocation error: file /home/mcmahan/R/i386-pc-
solaris2.10-library/2.5/igraph/libs/igraph.so: symbol __1cDstdEcerr_:
referenced symbol not found
Error : .onLoad failed in 'loadNamespace' for 'igraph'
Error: package/namespace load failed for 'igraph'
At this point I think I'm going to give up getting it working. The
initial reason to use the remote solaris system was for convenience —
to run some long-running code on a remote machine rather than my
laptop — but it seems like it will be easier to just run it here.
Thanks, everybody, for all of your help and patience.
Peter
On Jan 9, 2008, at 2:17 AM, Gabor Csardi wrote:
> On Wed, Jan 09, 2008 at 08:03:59AM +0000, Prof Brian Ripley wrote:
> [...]
>>
>> You say you are using gcc, but that would be relevant to the Sun C++
>> compiler (see the R-admin manual, which also says that configure
>> adds it
>> where needed). So which C++ compiler is this? The symptoms do
>> look as if
>> you are mixing incompatible C and C++ compilers.
>>
>> I don't have anything like as old components as you have, but igraph
>> contains C++ errors and will not compile under the SunStudio 12 C++
>> compiler (reported to the maintainer a long time ago). It did work
>> for me
>> just now using gcc/g++ 4.2.1 and R 2.6.1 patched.
>
> Brian, indeed, i made the fixes you sent me, but it seems that only
> in the development branch of igraph not in the one which is on CRAN.
> Anyway, i'll fix them in both. Thanks again.
>
> Peter, here are the changes you need to make to the source if
> compiling
> with the Sun Studio compiler:
> http://code.google.com/p/igraph/issues/detail?id=1
> (although it seems that the easiest is compiling with gcc/g++).
>
> Gabor
>
>>> Any ideas? My system info is:
>>> SunOS 5.10 i386 Generic_120012-14 09-19-2007
>>> gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
>>> R version 2.5.1 (2007-06-27)
>>> igraph version 0.4.5 (with a few changes to compile on Solaris)
>>
>> Since no changes are needed to compile under gcc, this suggests you
>> are
>> not using gcc's C++ compiler.
>>
>>> thanks,
>>> Peter
>>
>> --
>> 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-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> --
> Csardi Gabor <csardi at rmki.kfki.hu> MTA RMKI, ELTE TTK
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list