Installing under ubuntu 12.04

Discussions on installation issues go here.
gdias

Installing under ubuntu 12.04

Postby gdias » 14 Mar 2014, 17:58

Dear all,

I am trying to build/install polymake 2.12 from source under ubuntu 12.04 using gcc/g++ 4.8.1. I have (successfully) installed all packages/dependencies according to http://www.polymake.org/doku.php/howto/install. I run "./configure" with no problems, but when I try to run "make", apart from some warnings regarding typedefs (error_if_unimplemented) locally defined but not used, I get the following error from g++:

Code: Select all

g++ -shared -O2 -g -L/usr/local/lib -fstack-protector -o ../../lib/graph.so altshuler_det.o bipartite_signature.o bounded_embedder.o complete_bipartite.o complete.o connectivity.o diameter.o edge_lengths.o f2_vector.o graph_compare.o greedy_coloring.o HasseDiagram.o HasseDiagram_tools.o hd_embedder.o petersen.o se_interactive.o spring_embedder.o SpringEmbedder.o triangle_free.o perl/auto-automorphisms.o perl/auto-connected_components.o perl/auto-dim.o perl/auto-dual_faces.o perl/auto-find_node_permutation.o perl/auto-find_row_col_permutation.o perl/auto-is_connected.o perl/auto-isomorphic.o perl/auto-max_cliques.o perl/auto-nodes_of_dim.o perl/auto-top_node.o ../../external/nauty/libnauty.a -lmpfr -lgmp /usr/bin/ld: ../../external/nauty/libnauty.a(naugraph.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC ../../external/nauty/libnauty.a: could not read symbols: Bad value collect2: error: ld returned 1 exit status make[1]: *** [../../lib/graph.so] Error 1 make[1]: Leaving directory `/home/dias/Downloads/polymake-2.12/build.x86_64/apps/graph' make: *** [compile] Error 2
I would like to try g++'s suggestion (apparently I should compile polymake with -fPIC flag), but I have no idea how to do it with such complex (at least to me) makefiles. Any help, please? Let me know if you need more infos.
Thanks a lot! Gustavo

blorenz
Developer
Posts: 139
Joined: 10 Jan 2011, 17:21

Re: Installing under ubuntu 12.04

Postby blorenz » 15 Mar 2014, 13:33

The -fPIC flag should be set automatically by the configure script, the relevant entry is in
'build.x86_64/conf.make': CsharedFlags=-fPIC
If you cant find this entry can you post the contents of this file please?

You can try recompiling the nauty files by changing into 'build.x86_64/external/nauty' and running 'make clean' and 'make' there. You should see the flag in the compile output, e.g:

Code: Select all

$ make gcc -c -o nauty.o -fPIC -march=native -Wall -Wno-uninitialized -Wno-unused -Wno-parentheses -DNDEBUG -DPOLYMAKE_DEBUG=0 -O3 -MD -MT 'libnauty.a(nauty.o)' -DBIGNAUTY -I. ~/polymake-2.12/external/nauty/nauty.c
Ben

PS: You could also try the perpetual beta instead, which also offers the possibility to choose between nauty and bliss for isomorphism tests, and has a lot more new features.


Return to “Installing polymake”