Opened 6 years ago
Closed 6 years ago
#833 closed bug (fixed)
NTL 11.0.0 not recognized
Reported by: | Owned by: | somebody | |
---|---|---|---|
Priority: | critical | Milestone: | 4-1-0 and higher |
Component: | dontKnow | Version: | 4-1-0 |
Keywords: | ntl | Cc: |
Description
For NTL versions > 10.4.0
(tested 11.0.0
and 11.2.1
), the NTL check of the configure script fails. I've already added -std=c++11
and -O2
to the CXXFLAGS
as suggested in https://github.com/Singular/Sources/issues/874.
Interestingly enough, the check doesn't fail for the top-level configure script but just for the "sub-scripts". config.log
shows the following:
configure:20657: checking for NTL >= 5.0 configure:20687: g++ -o conftest -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -fno-threadsafe-statics -fno-enforce-eh-specs -fconserve-space -funroll-loops -fno-delete-null-pointer-checks -fno-rtti -pipe -fno-common -g0 -O3 -Wno-unused-function -Wno-trigraphs -Wno-unused-parameter -Wunknown-pragmas -Wno-unused-variable -fomit-frame-pointer -fwrapv -fvisibility=default -finline-functions -fno-exceptions -funroll-loops -fno-delete-null-pointer-checks conftest.cpp -lntl -lgmp >&5 /nix/store/0iggrca7z91pfniid12c63b75ga0rgbr-ntl-11.0.0/lib/libntl.so: undefined reference to `pthread_key_create' /nix/store/0iggrca7z91pfniid12c63b75ga0rgbr-ntl-11.0.0/lib/libntl.so: undefined reference to `pthread_setspecific' collect2: error: ld returned 1 exit status configure:20687: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "libpolys" | #define PACKAGE_TARNAME "libpolys" | #define PACKAGE_VERSION "4.1.1" | #define PACKAGE_STRING "libpolys 4.1.1" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define PACKAGE "libpolys" | #define VERSION "4.1.1" | #define OM_NDEBUG 1 | #define SING_NDEBUG 1 | #define SINGULAR_CFLAGS "-DSING_NDEBUG -DOM_NDEBUG" | #define STDC_HEADERS 1 | #define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 | #define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | #define HAVE_DLFCN_H 1 | #define LT_OBJDIR ".libs/" | #define HAVE_GMP 1 | /* end confdefs.h. */ | #include <NTL/ZZ.h> | int | main () | { | NTL::ZZ a; | ; | return 0; | } configure:20763: result: not found configure:20765: WARNING: Unable to find NTL (which is strongly recommended) on your machine: please use --with-ntl=PATH_TO_DIR_CONTAINING_LIB_AND_INCLUDE (see also ./configure --help if you do not understand what we are talking about)
And here is the complete build log (search for NTL).
Note: See
TracTickets for help on using
tickets.
fixed with 4d8cea0593f05b8294ebd7fa3cb8b5a11b049b14 (add pthread tests before all NTL tests).
Funny fact: here is does also work without this change (Linux,gcc 6.4.0, NTL 11.0; OsX clang, NTL 11.0)