igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Installing igraph on Solaris


From: Tamas Nepusz
Subject: Re: [igraph] Installing igraph on Solaris
Date: Thu, 28 Jan 2010 11:15:51 +0000
User-agent: Mutt/1.5.20 (2009-06-14)

Hello,

> The first problem is that stdint.h does not exist on Solaris but is
> substituted by int_types.h. So I have to manually include
> sys/int_types.h instead of stdint.h in include/igraph_vector.h and
> src/bignum.h.
Thanks for reporting that, I will include a check for stdint.h and
int_types.h and let the headers choose the appropriate one.

> Configuring with --disable-graphml --disable-gmp and compiling with
> GCC 4.0.2, I get the following error: [...]
> math.c: In function 'igraph_finite':
> math.c:38: warning: implicit declaration of function 'finite'
I think libc on Solaris has this function in ieeefp.h, not in math.h.
Have you tried including ieeefp.h instead of math.h? If that works, let
me know so I can make this modification as well.

> not doing that but building on top of the work of the newer GCC, this
> version does compile for some time and then fails with this error:
> 
> In file included from bignum.h:29,
>                  from bigint.h:39,
>                  from centrality.c:40:
> pstdint.h:710: conflicting types for `uintptr_t'
> /usr/include/sys/int_types.h:111: previous declaration of `uintptr_t'
> pstdint.h:711: conflicting types for `intptr_t'
> /usr/include/sys/int_types.h:110: previous declaration of `intptr_t'
pstdint.h is a portable stdint.h replacement for systems that do not
have stdint.h. As you have already included sys/int_types.h instead of
stdint.h, you don't have to include pstdint.h.

> pottsmodel_2.cpp:1243: error: call of overloaded 'log(double)' is ambiguous
Hmmm... I wonder why you are getting this error message; it is true that
there are multiple overloaded versions of log(...) in the standard C++
library (double log(double), float log(float) and long double log(long
double)), but that's why the argument is explicitly cast into a double
to resolve the ambiguity in line 1243. Also, there are a couple of other
places where the log function is called in pottsmodel_2.cpp, do you get
the same error message in those lines or only in line 1243?

> pottsmodel_2.cpp: In member function 'void
> PottsModelN::assign_initial_conf(bool)':
> pottsmodel_2.cpp:1663: warning: converting to 'unsigned int' from 'double'
This seems harmless, but I will fix it anyway (replacing 0.0 with 0).

> pottsmodel_2.cpp: In member function 'double
> PottsModelN::HeatBathLookup(double, double, double, unsigned int)':
> pottsmodel_2.cpp:1918: error: call of overloaded 'exp(double)' is ambiguous
I guess this can also be solved by casting the argument to a double:

weights[spin_opt] = exp((double)(beta*weights[spin_opt]));

> /local/solaris86/apps/gcc-4.0.2/bin/../lib/gcc/i386-pc-solaris2.9/4.0.2/include/c++/cmath:210:
> note: candidates are: float std::exp(float)
> /local/solaris86/apps/gcc-4.0.2/bin/../lib/gcc/i386-pc-solaris2.9/4.0.2/include/c++/cmath:214:
> note:                 long double std::exp(long double)
Hmmmmm.... maybe there is no exp(double) variant in Solaris? In that
case, casting the argument to long double might help.

Please keep us posted -- I'd really like to know whether the fixes
suggested above worked or not.

-- 
Tamas




reply via email to

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