Building polymake 4.6 on Ubuntu 20.04, linking problems with flint

Discussions on installation issues go here.
ren
Posts: 37
Joined: 03 May 2011, 15:21

Building polymake 4.6 on Ubuntu 20.04, linking problems with flint

Postby ren » 13 Feb 2022, 15:20

I need some help to resolve following error when trying to compile polymake 4.6 on Ubuntu 20.04.3, does anybody know what may be the cause of it?

Code: Select all

ren@thinkpad:~/polymake$ make ninja -C build/Opt all ninja: Entering directory `build/Opt' [1/3] LINK /home/ren/polymake/build/Opt/perlx/5.30.0/x86_64-linux-gnu-thread-multi/auto/Polymake/Ext/Ext.so FAILED: /home/ren/polymake/build/Opt/perlx/5.30.0/x86_64-linux-gnu-thread-multi/auto/Polymake/Ext/Ext.so g++ -shared -L/usr/local/lib -fstack-protector-strong -Wl,-z,lazy -Wl,--as-needed -o /home/ren/polymake/build/Opt/perlx/5.30.0/x86_64-linux-gnu-thread-multi/auto/Polymake/Ext/Ext.so /home/ren/polymake/build/Opt/lib/core/AccurateFloat.o /home/ren/polymake/build/Opt/lib/core/Bitset.o /home/ren/polymake/build/Opt/lib/core/CharBuffer.o /home/ren/polymake/build/Opt/lib/core/chunk_allocator.o /home/ren/polymake/build/Opt/lib/core/color.o /home/ren/polymake/build/Opt/lib/core/FacetList.o /home/ren/polymake/build/Opt/lib/core/FlintPolynomial.o /home/ren/polymake/build/Opt/lib/core/inlines.o /home/ren/polymake/build/Opt/lib/core/Integer.o /home/ren/polymake/build/Opt/lib/core/lib_init.o /home/ren/polymake/build/Opt/lib/core/linalg_float.o /home/ren/polymake/build/Opt/lib/core/numerical_functions.o /home/ren/polymake/build/Opt/lib/core/numerical_linalg.o /home/ren/polymake/build/Opt/lib/core/PlainParser.o /home/ren/polymake/build/Opt/lib/core/PolynomialVarNames.o /home/ren/polymake/build/Opt/lib/core/RandomGenerators.o /home/ren/polymake/build/Opt/lib/core/Rational.o /home/ren/polymake/build/Opt/lib/core/socketstream.o /home/ren/polymake/build/Opt/lib/core/type_utils.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/BigObject.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/calls.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/cout_bridge.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Scope.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/types.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Value.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/wrappers.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/BigObjectXS.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/BSONbooleanAdapter.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/CPlusPlus.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Ext.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/interrupts.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/JSON-XS.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/namespaces.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Overload.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Poly.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/RefHash.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/RuleGraph.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/SchedulerHeap.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Shell.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Struct.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/UserSettings.o -fuse-ld=gold -fopenmp -lflint -ldl -lmpfr -lgmp -lpthread /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(printf.o): requires dynamic R_X86_64_PC32 reloc against 'parse_fmt' which may overflow at runtime; recompile with -fPIC collect2: error: ld returned 1 exit status [2/3] LINK /home/ren/polymake/build/Opt/perlx/5.30.0/x86_64-linux-gnu-thread-multi/libpolymake.so.4.6 FAILED: /home/ren/polymake/build/Opt/perlx/5.30.0/x86_64-linux-gnu-thread-multi/libpolymake.so.4.6 g++ -shared -L/usr/local/lib -fstack-protector-strong -Wl,-z,lazy -Wl,--as-needed -fstack-protector-strong -L/usr/local/lib -o /home/ren/polymake/build/Opt/perlx/5.30.0/x86_64-linux-gnu-thread-multi/libpolymake.so.4.6 /home/ren/polymake/build/Opt/lib/core/AccurateFloat.o /home/ren/polymake/build/Opt/lib/core/Bitset.o /home/ren/polymake/build/Opt/lib/core/CharBuffer.o /home/ren/polymake/build/Opt/lib/core/chunk_allocator.o /home/ren/polymake/build/Opt/lib/core/color.o /home/ren/polymake/build/Opt/lib/core/FacetList.o /home/ren/polymake/build/Opt/lib/core/FlintPolynomial.o /home/ren/polymake/build/Opt/lib/core/inlines.o /home/ren/polymake/build/Opt/lib/core/Integer.o /home/ren/polymake/build/Opt/lib/core/lib_init.o /home/ren/polymake/build/Opt/lib/core/linalg_float.o /home/ren/polymake/build/Opt/lib/core/numerical_functions.o /home/ren/polymake/build/Opt/lib/core/numerical_linalg.o /home/ren/polymake/build/Opt/lib/core/PlainParser.o /home/ren/polymake/build/Opt/lib/core/PolynomialVarNames.o /home/ren/polymake/build/Opt/lib/core/RandomGenerators.o /home/ren/polymake/build/Opt/lib/core/Rational.o /home/ren/polymake/build/Opt/lib/core/socketstream.o /home/ren/polymake/build/Opt/lib/core/type_utils.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/BigObject.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/calls.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/cout_bridge.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Scope.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/types.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Value.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/wrappers.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/BigObjectXS.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/BSONbooleanAdapter.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/CPlusPlus.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Ext.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/interrupts.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/JSON-XS.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/namespaces.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Overload.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Poly.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/RefHash.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/RuleGraph.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/SchedulerHeap.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Shell.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Struct.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/UserSettings.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/Main.o /home/ren/polymake/build/Opt/lib/perlx/5.30.0/x86_64-linux-gnu-thread-multi/methods.o -Wl,-soname,libpolymake.so.4.6 -L/usr/lib/x86_64-linux-gnu/perl/5.30/CORE -lperl -Wl,-E -fuse-ld=gold -fopenmp -lflint -ldl -lmpfr -lgmp -lpthread /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(memory_manager.o): unsupported reloc 23 against global symbol flint_num_cleanup_functions /usr/bin/ld.gold: error: /usr/local/lib/libflint.a(printf.o): requires dynamic R_X86_64_PC32 reloc against 'parse_fmt' which may overflow at runtime; recompile with -fPIC collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. make: *** [Makefile:35: all] Error 1
I have installed all dependencies listed on the installation page (https://polymake.org/doku.php/install/i ... rom_source) and also tried reinstall reinstalling `libflint-dev` using the package manager as well as building flint-2.5.2 from source.

Building without flint works fine.

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

Re: Building polymake 4.6 on Ubuntu 20.04, linking problems with flint

Postby blorenz » 13 Feb 2022, 18:16

Have you tried manually removing the (manual) flint installation from /usr/local?
I.e. deleting /usr/local/lib/libflint* and /usr/local/include/flint.
That should make sure that the package manager installation is used and at least give a different error message when building polymake.

For the manual installation please make sure that the shared library (libflint.so) is built in addition to / instead of the static library which is mentioned in the error message (you can try using ./configure --disable-static --enable-shared for flint).

ren
Posts: 37
Joined: 03 May 2011, 15:21

Re: Building polymake 4.6 on Ubuntu 20.04, linking problems with flint

Postby ren » 14 Feb 2022, 12:15

That fixed the build problem, thanks!


Return to “Installing polymake”