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: uxzmdlj02
Subject: Re: [igraph] Installing igraph 4.5 in R on Solaris 5.10 i386
Date: Fri, 4 Jan 2008 12:42:46 -0600

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





reply via email to

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