question about compiling polymake in ubuntu 14.04

Discussions on installation issues go here.
vissarion
Posts: 9
Joined: 30 May 2012, 19:01

question about compiling polymake in ubuntu 14.04

Postby vissarion » 23 Sep 2014, 17:43

Hello,

I'm trying to compile polymake 2.13-1 on an Ubuntu 14.04 LTS and get the following error.

Code: Select all

g++ -shared -L/usr/local/lib -fstack-protector -o ../../lib/graph.so GraphIso.o ../../staticlib/nauty/libnauty.a -lmpfr -lgmp -lpthread /usr/bin/ld: ../../staticlib/nauty/libnauty.a(naugraph.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC ../../staticlib/nauty/libnauty.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[1]: *** [../../lib/graph.so] Error 1 make[1]: Leaving directory `/home/vissarion/workspace/polymake-2.13-1/build.x86_64/bundled/nauty/apps/graph' make: *** [compile] Error 2
I recompiled nauty inside build.x86_64/bundled/nauty/staticlib/nauty with -fPIC but I still get the same error message.
I got the same error also with the current polymake version from github.

I'll appreciate any help or comment.

Thanks

User avatar
gawrilow
Main Author
Posts: 425
Joined: 25 Dec 2010, 17:40

Re: question about compiling polymake in ubuntu 14.04

Postby gawrilow » 23 Sep 2014, 23:01

Actually, -fPIC should be added automatically by configuration script at the very beginning and applied to all object files, not only libnauty.

Please look into build.x86_64/conf.make and check whether it contains a line like this:

CsharedFlags := -fPIC

If yes, please recompile everything: make clean; make all

If not, please tell your GCC version; also please post the complete contents of conf.make.

vissarion
Posts: 9
Joined: 30 May 2012, 19:01

Re: question about compiling polymake in ubuntu 14.04

Postby vissarion » 24 Sep 2014, 10:08

Hello. Thanks for your reply!

The answer is yes, "CsharedFlags := -fPIC" is contained. I make clean and then make all but I still got the same error.

However, I managed to compile the polymake Perpetual Beta, so I am ok with it! (nauty is replaced by bliss and this probably fixes my problem).

For your information I post my conf.make.

Code: Select all

# last configured with: # /home/vissarion/workspace/polymake-2.13-1/configure --with-jni-headers=/usr/lib/jvm/java-7-openjdk-amd64/include CC := gcc CXX := g++ Cflags := -march=native -Wall CXXflags := -march=native -ftemplate-depth-200 -Wall -Wno-strict-aliasing -Wno-parentheses CsharedFlags := -fPIC CXXOPT := -O3 CXXDEBUG := -g CflagsSuppressWarnings := -Wno-uninitialized -Wno-unused -Wno-parentheses -Wno-unused-but-set-variable -Wno-enum-compare -Wno-sign-compare -Wno-switch -Wno-format -Wno-write-strings GCCversion := 4.8 CCache := LDflags := LDsharedFlags := -shared -L/usr/local/lib -fstack-protector LDcallableFlags := -shared -L/usr/local/lib -fstack-protector -fstack-protector -L/usr/local/lib LDsonameFlag := -Wl,-soname, Libs := LIBXML2_CFLAGS := -I/usr/include/libxml2 LIBXML2_LIBS := -lxml2 Arch := x86_64 PERL := /usr/bin/perl InstallTop := /usr/local/share/polymake InstallArch := /usr/local/lib/polymake InstallBin := /usr/local/bin InstallInc := /usr/local/include InstallLib := /usr/local/lib InstallDoc := /usr/local/share/polymake/doc DirMask := 0755 export PERL InstallTop InstallArch InstallBin InstallInc InstallLib InstallDoc DirMask RANLIB=: SO=so export INSTALL_PL=/home/vissarion/workspace/polymake-2.13-1/support/install.pl DESTDIR= export FinalInstallTop := ${InstallTop} export FinalInstallArch := ${InstallArch} InstallTop := ${DESTDIR}${InstallTop} InstallArch := ${DESTDIR}${InstallArch} InstallBin := ${DESTDIR}${InstallBin} InstallInc := ${DESTDIR}${InstallInc} InstallLib := ${DESTDIR}${InstallLib} InstallDoc := ${DESTDIR}${InstallDoc} InSourceTree := y


Return to “Installing polymake”