Re: [igraph] Problems compiling igraph 0.6 on MacOS X

9 views
Skip to first unread message

Bob Pap

unread,
Nov 5, 2012, 6:08:24 PM11/5/12
to Help for igraph users
Hi Tamás,

I seem to have the same problem compiling the recent snapshot on OSX 10.8.2 (R CMD install ~/Downloads/igraph_nightly_0.7-3053-20121105.tar.gz). I get errors (not always the same) with all the recent snapshots (igraph_nightly_0.6.1-3000-20121102.tar.gz  igraph_nightly_0.6.1-3005-20121103.tar.gz  igraph_nightly_0.7-3043-20121102.tar.gz    igraph_nightly_0.7-3050-20121103.tar.gz    igraph_nightly_0.7-3053-20121105.tar.gz). Do you know which is the latest snapshot to compile without problems? Am I in the wrong direction?  Many thanks for any help.

Kind regards,
Bob Pap

gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -DUSING_R -I. -Ics -Iglpk -Iglpk/amd -Iglpk/colamd -g -O2 -I/usr/include/libxml2 -g -O2 -I/usr/include/libxml2 -DNDEBUG -DPACKAGE_VERSION=\"0.7\" -DINTERNAL_ARPACK -DIGRAPH_THREAD_LOCAL=/**/ -fPIC  -g -O2  -c rinterface.c -o rinterface.o
rinterface.c: In function ‘R_igraph_get_shortest_paths’:
rinterface.c:3692: error: too few arguments to function ‘igraph_get_shortest_paths_dijkstra’
rinterface.c: In function ‘R_igraph_bipartite_game_gnp’:
rinterface.c:12012: warning: implicit declaration of function ‘igraph_bipartite_game_gnp’
rinterface.c: In function ‘R_igraph_bipartite_game_gnm’:
rinterface.c:12063: warning: implicit declaration of function ‘igraph_bipartite_game_gnm’
make: *** [rinterface.o] Error 1
ERROR: compilation failed for package ‘igraph’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/igraph’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/igraph’


On 24 April 2012 22:26, Bob Pap <bob...@googlemail.com> wrote:
Perfect! Many thanks, it worked with the build from 04.13.


On Tue, Apr 24, 2012 at 10:15 PM, Tamás Nepusz <nta...@gmail.com> wrote:
Dear Bob,

Thanks for the bug report; this is an error on our side. We have recently added a new argument to igraph_community_eb_get_merges in the C core and the R interface has not been updated yet. Please try an earlier nightly snapshot; any nightly build released before 19 April 2012 would do.

Best,
--
T.


On Tuesday, 24 April 2012 at 22:07, Bob Pap wrote:

> Dear all,
>
> I get the error below compiling igraph on MacOS X 10.7.3 (with command: R CMD install ~/Downloads/igraph_nightly_0.6-2694-20120421.tar.gz ). Could a guru please maybe point me in the right direction? Any help is appreciated (I need to use weighted betweeness measure that I understand is available in th enew version).
>
> Kind regards,
> Bob
>
> gcc -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64 -DNDEBUG -I/usr/local/include -DUSING_R -I. -Ics -Iglpk -Iglpk/amd -Iglpk/colamd -g -O2 -I/usr/include/libxml2 -g -O2 -I/usr/include/libxml2 -DNDEBUG -DPACKAGE_VERSION=\"0.6\" -DINTERNAL_ARPACK -DIGRAPH_THREAD_LOCAL=/**/ -fPIC -g -O2 -c rinterface.c -o rinterface.o
> rinterface.c: In function ‘R_SEXP_to_vector_complex_copy’:
> rinterface.c:2380: warning: passing argument 2 of ‘igraph_vector_complex_init_copy’ from incompatible pointer type
> rinterface.c: In function ‘R_SEXP_to_matrix_complex_copy’:
> rinterface.c:2393: warning: passing argument 2 of ‘igraph_vector_complex_init_copy’ from incompatible pointer type
> rinterface.c: In function ‘R_igraph_community_eb_get_merges’:
> rinterface.c:6177: warning: passing argument 3 of ‘igraph_community_eb_get_merges’ from incompatible pointer type
> rinterface.c:6177: warning: passing argument 4 of ‘igraph_community_eb_get_merges’ from incompatible pointer type
> rinterface.c:6177: error: too few arguments to function ‘igraph_community_eb_get_merges’
> make: *** [rinterface.o] Error 1
> ERROR: compilation failed for package ‘igraph’
> * removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/igraph’
> * restoring previous ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/igraph’
>
>
> _______________________________________________
> igraph-help mailing list
> igrap...@nongnu.org (mailto:igrap...@nongnu.org)
> https://lists.nongnu.org/mailman/listinfo/igraph-help




_______________________________________________
igraph-help mailing list
igrap...@nongnu.org
https://lists.nongnu.org/mailman/listinfo/igraph-help


Gábor Csárdi

unread,
Nov 5, 2012, 8:13:17 PM11/5/12
to Help for igraph users
Hi Bob,

On Mon, Nov 5, 2012 at 6:08 PM, Bob Pap <bob...@googlemail.com> wrote:
Hi Tamás,

I seem to have the same problem compiling the recent snapshot on OSX 10.8.2 (R CMD install ~/Downloads/igraph_nightly_0.7-3053-20121105.tar.gz). I get errors (not always the same) with all the recent snapshots (igraph_nightly_0.6.1-3000-20121102.tar.gz  igraph_nightly_0.6.1-3005-20121103.tar.gz  igraph_nightly_0.7-3043-20121102.tar.gz    igraph_nightly_0.7-3050-20121103.tar.gz    igraph_nightly_0.7-3053-20121105.tar.gz). Do you know which is the latest snapshot to compile without problems? Am I in the wrong direction?  Many thanks for any help.

3043 should compile, I guess. I'll fix the issue in a sec, and the next nightly after 3053 should compile, too. 

Gabor



--
Gabor Csardi <csa...@rmki.kfki.hu>     MTA KFKI RMKI

Bob Pap

unread,
Nov 6, 2012, 2:57:58 AM11/6/12
to Help for igraph users
Hi Gábor,

Snapshot 0.7-3055 from last night fails
R CMD install ~/Downloads/igraph_nightly_0.7-3055-20121106.tar.gz 
...
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -DNDEBUG  -I/usr/local/include   -DUSING_R -I. -Ics -Iglpk -Iglpk/amd -Iglpk/colamd -g -O2 -I/usr/include/libxml2 -g -O2 -I/usr/include/libxml2 -DNDEBUG -DPACKAGE_VERSION=\"0.7\" -DINTERNAL_ARPACK -DIGRAPH_THREAD_LOCAL=/**/ -fPIC  -g -O2  -c rinterface.c -o rinterface.o
rinterface.c: In function ‘R_igraph_get_shortest_paths’:
rinterface.c:3692: error: too few arguments to function ‘igraph_get_shortest_paths_dijkstra’
rinterface.c: In function ‘R_igraph_bipartite_game_gnp’:
rinterface.c:12012: warning: implicit declaration of function ‘igraph_bipartite_game_gnp’
rinterface.c: In function ‘R_igraph_bipartite_game_gnm’:
rinterface.c:12063: warning: implicit declaration of function ‘igraph_bipartite_game_gnm’
make: *** [rinterface.o] Error 1
ERROR: compilation failed for package ‘igraph’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/igraph’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/igraph’

Snapshot 0.6.1-3007 also from last night also fails with a bunch of ld errors
R CMD install ~/Downloads/igraph_nightly_0.6.1-3007-20121106.tar.gz 
....
ld: warning: can't find atom for N_GSYM stabs nopx:G(0,3) in dstatn.o
ld: sectionForAddress(0x80) address not in any section for architecture i386
collect2: ld returned 1 exit status
make: *** [igraph.so] Error 1
ERROR: compilation failed for package ‘igraph’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/igraph’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/igraph’

Snapshot 3043 from Friday also fails with the ld problems
R CMD install ~/Downloads/igraph_nightly_0.7-3043-20121102.tar.gz 
...
ld: warning: can't find atom for N_GSYM stabs nopx:G(0,3) in dstats.o
ld: sectionForAddress(0x80) address not in any section for architecture i386
collect2: ld returned 1 exit status
make: *** [igraph.so] Error 1
ERROR: compilation failed for package ‘igraph’
* removing ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/igraph’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/2.15/Resources/library/igraph’

I am using gcc 4.2.1 (plain vanilla from the lastest XCode) on the latest copy of OsX 10.8.2.  Maybe an issue of the architecture?  I am using R64 only and I see the i386 is referred to in the errors.

Kind regards,
Bob Pap

Bob Pap

unread,
Nov 15, 2012, 7:24:49 AM11/15/12
to Help for igraph users
Hi Gabor and Tamás,

I noticed that new tarballs were added yesterday. Just to let you know that the problems with compiing on OSX (R version 2.15.2) remain. Would you know the most recent useable tarball that has the revision to alpha centrality included? Many thanks.
Kind regards,
Ivan

for 7:

interface.c: In function ‘R_igraph_get_shortest_paths’:
rinterface.c:3692: error: too few arguments to function ‘igraph_get_shortest_paths_dijkstra’
rinterface.c: In function ‘R_igraph_bipartite_game_gnp’:
rinterface.c:12012: warning: implicit declaration of function ‘igraph_bipartite_game_gnp’
rinterface.c: In function ‘R_igraph_bipartite_game_gnm’:
rinterface.c:12063: warning: implicit declaration of function ‘igraph_bipartite_game_gnm’
make: *** [rinterface.o] Error 1
ERROR: compilation failed for package ‘igraph’

For 6.1:

ld: warning: can't find atom for N_GSYM stabs logfil:G(0,6) in dseupd.o
ld: sectionForAddress(0x80) address not in any section for architecture i386
collect2: ld returned 1 exit status
make: *** [igraph.so] Error 1
ERROR: compilation failed for package ‘igraph’


Tamás Nepusz

unread,
Nov 16, 2012, 6:51:41 PM11/16/12
to Help for igraph users
Hi,

> I noticed that new tarballs were added yesterday. Just to let you know that the problems with compiing on OSX (R version 2.15.2) remain. Would you know the most recent useable tarball that has the revision to alpha centrality included? Many thanks.
I have just uploaded a tarball of the R interface for the 0.7 tree that should build correctly -- I have tested it on our build server and it seemed to work (at least I was able to import the built package). This is just a temporary fix, hopefully Gabor will do it properly soon.

Best,
Tamas

Bob Pap

unread,
Nov 19, 2012, 4:54:09 AM11/19/12
to Help for igraph users
Hi Tamás,

Many thanks. Unfortunately image 7-3058 as a (new) problem:

can't find atom for N_GSYM stabs nopx:G(0,3) in dstatn.old: warning: 
can't find atom for N_GSYM stabs nopx:G(0,3) in dstats.o
ld: sectionForAddress(0x80) address not in any section for architecture i386
collect2: ld returned 1 exit status
make: *** [igraph.so] Error 1
ERROR: compilation failed for package ‘igraph’

I also tried the (more recently posted) 6-3011 tarball,, and had a similar problem with N_GSYM:

ld: warning: can't find atom for N_GSYM stabs nopx:G(0,3) in dstats.o
ld: sectionForAddress(0x80) address not in any section for architecture i386
collect2: ld returned 1 exit status
make: *** [igraph.so] Error 1
ERROR: compilation failed for package ‘igraph’

I apologise for not understanding enough, as the problem seems a missing something and is probably easily solvable.  Any guidance would be appreciated.

Kind regards,
Bob

Tamás Nepusz

unread,
Nov 19, 2012, 5:10:34 AM11/19/12
to Help for igraph users
Hi Bob,

This seems to be an issue that is specific to your machine as I cannot reproduce it on mine. Maybe Gabor has some ideas here. Gabor?

T.

Bob Pap

unread,
Nov 19, 2012, 5:32:31 AM11/19/12
to Help for igraph users
Hi Tamás,

tried something bold (having briefly and mostly unsuccessfully consulted http://www.macresearch.org/gfortran-0 and http://r.research.att.com).  Issuing the commend below it succeeded compiling (shall see the functionality). The lesson? the R CMD matters when choosing the architecture...

R --arch=x86_64 CMD INSTALL ~/Downloads/igraph_nightly_0.7-3058-20121116.tar.gz

...

nstalling to /Library/Frameworks/R.framework/Versions/2.15/Resources/library/igraph/libs/x86_64
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded

* DONE (igraph)

Once again many thanks for your help.

Kind regards,
Bob

Tamás Nepusz

unread,
Nov 19, 2012, 5:38:02 AM11/19/12
to Help for igraph users
Hi,

Okay, then it seems that it is a 32-bit-specific issue only. Thanks for the feedback!

Best,
Tamas

Gábor Csárdi

unread,
Nov 19, 2012, 2:40:16 PM11/19/12
to Help for igraph users
It seems that this is specific to older gcc versions, i386 and OSX. I see the warnings, but not the error, and the package itself seems to work fine.

I am not really sure what to do about this, actually. First I would need to reproduce it on a machine, but it is unlikely that I'll be able to do that. 

Good thing is, most people probably use 64 bit R on OSX, anyway, at least that is the default AFAIK.

Gabor

Bob Pap

unread,
Nov 20, 2012, 4:07:36 AM11/20/12
to Help for igraph users
Hi Gabor,

The problem was on 64 bit R anyway, and I do not think that R thinks this is the default.  The issue I had I think arouse as I ONLY installed the 64 bit R and not the 32 bit one.  The successful compilation required the flag  --arch=x86_64, as the default 386 did not work.

Kind regards,
Bob

Gábor Csárdi

unread,
Nov 20, 2012, 3:28:39 PM11/20/12
to Help for igraph users
On Tue, Nov 20, 2012 at 4:07 AM, Bob Pap <bob...@googlemail.com> wrote:
Hi Gabor,

The problem was on 64 bit R anyway, and I do not think that R thinks this is the default.  The issue I had I think arouse as I ONLY installed the 64 bit R and not the 32 bit one.  

There are no two versions, if you install R from the provided package, AFAIK. You download a single installer and it installs both the 32bit and the 64bit versions. You can start them with 'R32' and 'R64', or alternatively, with the --arch flag. Packages from CRAN also contain both versions.

If you install a package by hand, using 

R CMD INSTALL ...

then only the default will be installed. For my machine, this default is 64 bit, and 'R' is equivalent to 'R64'. For you maybe it is not, I don't know. From the fact that you had to specify --arch=x86_64 it seems that i386 is the default for you, at least if you start R from a terminal. If you have a shortcut, or some other way to start it, that might refer to another version.

Things are also different if you didn't use the default installer, but compiled R for yourself.
 
The successful compilation required the flag  --arch=x86_64, as the default 386 did not work.

Yes, that's the hint that i386 (=32 bit) is the default for you.

G.

Bob Pap

unread,
Nov 21, 2012, 4:05:46 AM11/21/12
to Help for igraph users
Hi Gabor,

I have installed R from the official 2.15.2 package, updated with the daily development package available at http://r.research.att.com (the standard development site I believe). So I have not compiled R myself.  What I mean installed the 64 bit version only, is that when installing the packages mentioned above, in the process you select a 'customized' instlalation and do not install R, just R64. If this has implications for the compilation of packages, I am not sure, possibly does, as I am not sure what binaries are involved when running R CMD INSTALL.  I should look into the internals of what is 'R' calling...

The bottom line is that one is to be careful when compiling the updates you so kindly provide, as something really trivial may prevent the user from compiling them.

Kind regards,
Bob
Reply all
Reply to author
Forward
0 new messages