When linking the PyNormaliz_cpp.dll
module, there is a long spew of errors mostly in two classes that look like:
g++ -shared -Wl,--enable-auto-image-base -L/home/embray/src/sagemath/sage/local/lib -Wl,-rpath,/home/embray/src/sagemath/sage/local/lib -L/home/embray/src/sagemath/sage/local/lib -Wl,-rpath,/home/embray/src/sagemath/sage/local/lib build/temp.cygwin-3.0.7-x86_64-2.7/NormalizModule.o -L/home/embray/src/sagemath/sage/local/lib/python2.7/config -L/home/embray/src/sagemath/sage/local/lib -lnormaliz -lgmp -lflint -larb -leanticxx -lpython2.7 -o build/lib.cygwin-3.0.7-x86_64-2.7/PyNormaliz_cpp.dll
...
build/temp.cygwin-3.0.7-x86_64-2.7/NormalizModule.o: In function `renf_elem_class::renf_elem_class(renf_class&)':
/home/embray/src/sagemath/sage/local/include/e-antic/renfxx.h:649: undefined reference to `renf_elem_init'
/home/embray/src/sagemath/sage/local/include/e-antic/renfxx.h:649:(.text+0x2a21): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `renf_elem_init'
...
/home/embray/src/sagemath/sage/local/lib/libnormaliz.a(other_algorithms.o): In function `libnormaliz::DescentFace<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >::compute(libnormaliz::DescentSystem<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> >&, unsigned long, boost::dynamic_bitset<unsigned long, std::allocator<unsigned long> > const&, std::vector<unsigned int, std::allocator<unsigned int> >&, std::vector<boost::dynamic_bitset<unsigned long, std::allocator<unsigned long> >, std::allocator<boost::dynamic_bitset<unsigned long, std::allocator<unsigned long> > > >&, std::vector<unsigned int, std::allocator<unsigned int> >&, std::vector<__gmp_expr<__mpz_struct [1], __mpz_struct [1]>, std::allocator<__gmp_expr<__mpz_struct [1], __mpz_struct [1]> > >&, unsigned int&) [clone ._omp_fn.42]':
...
/home/embray/src/sagemath/sage/local/var/tmp/sage/build/normaliz-3.7.2/src/source/./libnormaliz/descent.cpp:397: undefined reference to `omp_get_num_threads'
There basically seem to be two broad classes of problems here; one is linking with its library dependencies, either eantic or libnormaliz, or both. Another seems to be with functions that require OpenMP.
It seems libnormaliz is compiled with -fopenmp
by default, but since pynormaliz isn't, this breaks.
Reported upstream:
https://github.com/Normaliz/PyNormaliz/issues/71