igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Installing igraph 4.5 in R on Solaris 5.10 i386


From: Gabor Csardi
Subject: Re: [igraph] Installing igraph 4.5 in R on Solaris 5.10 i386
Date: Mon, 7 Jan 2008 09:32:16 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Peter, here is what i found:

http://cran.r-project.org/doc/manuals/R-admin.html

Search for 'SunPro' on the page. This is a recommended configuration
for SunPro compilers, although not on Solaris but on X86_64:

     CC=cc
     CFLAGS="-xO5 -xc99 -xlibmil -nofstore"
     CPICFLAGS=-Kpic
     F77=f95
     FFLAGS="-O5 -libmil -nofstore"
     FPICFLAGS=-Kpic
     CXX=CC
     CXXFLAGS="-xO5 -xlibmil -nofstore"
     CXXPICFLAGS=-Kpic
     FC=f95
     FCFLAGS=$FFLAGS
     FCPICFLAGS=-Kpic
     LDFLAGS=-L/opt/sunstudio12/lib/amd64
     SHLIB_LDFLAGS=-shared
     SHLIB_CXXLDFLAGS="-G -lCstd"
     SHLIB_FCLDFLAGS=-G
     SAFE_FFLAGS="-O5 -libmil"

The 

     SHLIB_CXXLDFLAGS="-G -lCstd"

line indicates that the standard C++ library is called Cstd here,
so first please try replacing -lstdc++ with -lCstd in Makevars.in
(I've no idea what -G is, you can try to add that too). 

If this does not work, then please write to the R-help mailing list,
there are people there who have Solaris, i think they can help 
you immediately. Make sure you tell them your operating system and 
compiler version, R version, igraph version.
I cannot tell anything more, as i don't have access to
Solaris systems. I'm not even sure that the error is in igraph.

Hope this helps.
Gabor

On Sun, Jan 06, 2008 at 05:34:53PM -0600, address@hidden wrote:
> Hmm. still no luck. Same message as before.
> After changing Makevars.in so the last line is:
> address@hidden@ -lstdc++
> I'm running:
> R CMD REMOVE igraph
> R CMD INSTALL igraph
> 
> I'm very inexperienced with package linking in R, so I'm at a loss.
> Thanks,
> Peter
> 
> On Jan 4, 2008, at 1:03 PM, Gabor Csardi csardi-at-rmki.kfki.hu | 
> igraph-help| wrote:
> 
> >Peter, it seems that you need to link against the standard c++
> >library explicitly. Try adding
> >
> >-lstdc++
> >
> >to the file src/Makevars.in at the end of the line PKG_LIBS=
> >Other libraries might be also needed, e.g. -lm -lc
> >Hope this helps.
> >
> >G.
> >
> >On Fri, Jan 04, 2008 at 12:45:09PM -0600, address@hidden  
> >wrote:
> >>Oops, I spoke too soon.
> >>With my changes the package compiled without a problem, but
> >>library(graph) in R gets 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'
> >>
> >>
> >>I don't know what to do about this.
> >>
> >>Thanks,
> >>Peter
> >>
> >>On Jan 4, 2008, at 12:42 PM, uxzmdlj02-at-sneakemail.com |igraph- 
> >>help|
> >>wrote:
> >>
> >>>Thanks, I finally got it working. The Sun C++ compiler must be
> >>>seriously strict.
> >>>
> >>>The error.h edit got rid of the first warning, but all the
> >>>pottsmodel_2.cpp errors were still there.
> >>>I got rid of those errors by changing all the instances of
> >>>"log(foo)" to "log(static_cast<double>(foo))"
> >>>(should I have used long double instead?)
> >>>After that pottsmodel_2 compiled fine
> >>>
> >>>
> >>>Then, however, there is a problem in walktrap_communities.cpp. The
> >>>ouput is:
> >>>"walktrap_communities.cpp", line 422: Error: The function "min" must
> >>>have a prototype.
> >>>
> >>>This I "fixed" by avoiding min() altogether, replacing line 422  
> >>>with:
> >>> ((G->vertices[i].degree) <  (G->vertices[G-
> >>>>vertices[i].edges[j].neighbor].degree))?
> >>>     N->delta_sigma = -1./double(G->vertices[i].degree):
> >>>     N->delta_sigma = -1./double(G->vertices[G-
> >>>>vertices[i].edges[j].neighbor].degree);
> >>>
> >>>Probably not ideal, but it should work?
> >>>
> >>>
> >>>Then there was a problem with walktrap_graph.cpp:
> >>>"walktrap_graph.cpp", line 166: Error: The function "sort" must have
> >>>a prototype.
> >>>
> >>>With this I simply added an "#include <algorithm>" at the beginning
> >>>of the file, which seemed to fix things. Is this not necessary with
> >>>non-Sun compilers? It seems strange.
> >>>
> >>>
> >>>This is my first time doing anything more than "hello world" in C++,
> >>>so take my solutions above with a grain of salt.
> >>>
> >>>Thanks again,
> >>>Peter
> >>>
> >>>
> >>>
> >>>On Jan 1, 2008, at 3:14 AM, Gabor Csardi csardi-at-rmki.kfki.hu |
> >>>igraph-help| wrote:
> >>>
> >>>>Peter, the sun compiler is a bit picky, please try to remove the
> >>>>trailing
> >>>>comma from line 277 in src/error.h. For this you need to download  
> >>>>and
> >>>>extract the package. You don't need to repack it, just use
> >>>>
> >>>>R CMD INSTALL igraph
> >>>>
> >>>>Btw. you might need to use the -l option of R CMD INSTALL.
> >>>>Tell me if you need more assistance, unfortunately i have no
> >>>>longer access to a solaris system to make this more smooth...
> >>>>
> >>>>To summarize:
> >>>>
> >>>>wget http://cran.at.r-project.org/src/contrib/igraph_0.4.5.tar.gz
> >>>>tar xzf igraph_0.4.5.tar.gz
> >>>><< edit igraph/src/error.h >>
> >>>>R CMD INSTALL igraph
> >>>>
> >>>>Gabor
> >>>>
> >>>>ps this is of course 0.4.5, not 4.5
> >>>>
> >>>>On Mon, Dec 31, 2007 at 11:10:30AM -0600, address@hidden
> >>>>wrote:
> >>>>>Hello,
> >>>>>Trying to install igraph in R via ssh on a Solaris 5.10 i386
> >>>>>machine,
> >>>>>I keep getting an error. Here's the last bit of output:
> >>>>>
> >>>>>
> >>>>>/opt/SUNWspro/bin/CC -I/opt/sscs/lib/R/include -I/opt/sscs/lib/R/
> >>>>>include  -I/opt/sscs/include -I/usr/sfw/include -I/opt/sfw/
> >>>>>include    -
> >>>>>KPIC  -xO3 -c pottsmodel_2.cpp -o pottsmodel_2.o
> >>>>>"error.h", line 278: Warning: Identifier expected instead of "}".
> >>>>>"pottsmodel_2.cpp", line 579: Warning: num_of_nodes hides
> >>>>>PottsModel::num_of_nodes.
> >>>>>"pottsmodel_2.cpp", line 754: Warning: num_of_nodes hides
> >>>>>PottsModel::num_of_nodes.
> >>>>>"pottsmodel_2.cpp", line 1211: Error: Overloading ambiguity  
> >>>>>between
> >>>>>"std::log(double)" and "std::log(long double)".
> >>>>>"pottsmodel_2.cpp", line 1211: Error: Overloading ambiguity  
> >>>>>between
> >>>>>"std::log(double)" and "std::log(long double)".
> >>>>>"pottsmodel_2.cpp", line 1211: Error: Overloading ambiguity  
> >>>>>between
> >>>>>"std::log(double)" and "std::log(long double)".
> >>>>>"pottsmodel_2.cpp", line 1215: Error: Overloading ambiguity  
> >>>>>between
> >>>>>"std::log(double)" and "std::log(long double)".
> >>>>>"pottsmodel_2.cpp", line 1218: Error: Overloading ambiguity  
> >>>>>between
> >>>>>"std::log(double)" and "std::log(long double)".
> >>>>>"pottsmodel_2.cpp", line 1219: Error: Overloading ambiguity  
> >>>>>between
> >>>>>"std::log(double)" and "std::log(long double)".
> >>>>>"pottsmodel_2.cpp", line 1220: Error: Overloading ambiguity  
> >>>>>between
> >>>>>"std::log(double)" and "std::log(long double)".
> >>>>>7 Error(s) and 3 Warning(s) detected.
> >>>>>*** Error code 7
> >>>>>make: Fatal error: Command failed for target `pottsmodel_2.o'
> >>>>>chmod: WARNING: can't access /mnt/ide0/home/mcmahan/R/i386-pc-
> >>>>>solaris2.10-library/2.5/igraph/libs/*
> >>>>>ERROR: compilation failed for package 'igraph'
> >>>>>** Removing '/mnt/ide0/home/mcmahan/R/i386-pc-solaris2.10-library/
> >>>>>2.5/
> >>>>>igraph'
> >>>>>
> >>>>>The downloaded packages are in
> >>>>>    /tmp/RtmpDAzVRk/downloaded_packages
> >>>>>Warning messages:
> >>>>>1: installation of package 'igraph' had non-zero exit status in:
> >>>>>install.packages("igraph")
> >>>>>2: cannot create HTML package index in:
> >>>>>tools:::unix.packages.html(.Library)
> >>>>>
> >>>>>
> >>>>>
> >>>>>I can install other packages fine, so I'm not sure what's going  
> >>>>>on.
> >>>>>Any thoughts?
> >>>>>Thanks,
> >>>>>Peter
> >>>>>
> >>>>>
> >>>>>
> >>>>>_______________________________________________
> >>>>>igraph-help mailing list
> >>>>>address@hidden
> >>>>>http://lists.nongnu.org/mailman/listinfo/igraph-help
> >>>>
> >>>>-- 
> >>>>Csardi Gabor <address@hidden>    MTA RMKI, ELTE TTK
> >>>>
> >>>>
> >>>>_______________________________________________
> >>>>igraph-help mailing list
> >>>>address@hidden
> >>>>http://lists.nongnu.org/mailman/listinfo/igraph-help
> >>>
> >>>
> >>>
> >>>_______________________________________________
> >>>igraph-help mailing list
> >>>address@hidden
> >>>http://lists.nongnu.org/mailman/listinfo/igraph-help
> >>
> >>
> >>
> >>_______________________________________________
> >>igraph-help mailing list
> >>address@hidden
> >>http://lists.nongnu.org/mailman/listinfo/igraph-help
> >
> >-- 
> >Csardi Gabor <address@hidden>    MTA RMKI, ELTE TTK
> >
> >
> >_______________________________________________
> >igraph-help mailing list
> >address@hidden
> >http://lists.nongnu.org/mailman/listinfo/igraph-help
> 
> 
> 
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help

-- 
Csardi Gabor <address@hidden>    MTA RMKI, ELTE TTK




reply via email to

[Prev in Thread] Current Thread [Next in Thread]