Open awvwgk opened 2 years ago
Did this issue resolve now that you sorted out the problem with having multiple versions of nauty on your system?
If it persists, I recommend you use an older version of GCC. We tested Molassembler successfully up to GCC 10.
No the issue is unfortunately not due to multiple nauty versions but due to non-portable C++ usage which is flagged only in GCC 11 and above.
Edit: Also happens with GCC 10
This seems to be solvable by this somewhat hacky patch
diff --git a/src/Molassembler/Graph/Canonicalization.cpp b/src/Molassembler/Graph/Canonicalization.cpp
index dcf244bc..0ac57edf 100644
--- a/src/Molassembler/Graph/Canonicalization.cpp
+++ b/src/Molassembler/Graph/Canonicalization.cpp
@@ -21,6 +21,7 @@
#include "Molassembler/Temple/Functional.h"
extern "C" {
+#define _Thread_local thread_local
#include "nauty/nausparse.h"
/*!
I don't much want to include this patch in molassembler; this seems like an upstream issue, no? _Thread_local
seems to have been substituted into your nauty/nausparse.h
header file by nauty's configure
script:
Line 5429: for ax_tls_keyword in _Thread_local __thread '__declspec(thread)' none; do
Fixing that by including a preprocessor redefinition in molassembler strikes me as the wrong way of fixing your issue.
Trying to build molassembler against Nauty 2.7.2 fails with
``` ❯ cmake -B _build -G Ninja -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DSCINE_MARCH="" -- The C compiler identification is GNU 11.2.0 -- The CXX compiler identification is GNU 11.2.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /home/abt-grimme/opt/conda/envs/gcc/bin/x86_64-conda-linux-gnu-cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /home/abt-grimme/opt/conda/envs/gcc/bin/x86_64-conda-linux-gnu-c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Setting build type to default 'Debug' -- Scine::UtilsOS found locally at /home/abt-grimme/opt/conda/envs/scine/lib/cmake/ScineUtilsOS -- Enabling GCC specific warning flags -- Could NOT find MKL (missing: MKL_INCLUDE_DIRS) -- Looking for pthread.h -- Looking for pthread.h - found -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found LAPACKE for use with Eigen3 -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success -- Performing Test COMPILER_HAS_DEPRECATED_ATTR -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success -- Configuring done CMake Warning at test/CMakeLists.txt:16 (add_executable): Cannot generate a safe runtime search path for target MolassemblerTests because files in some directories may conflict with libraries in implicit directories: runtime library [libgomp.so.1] in /home/abt-grimme/opt/conda/envs/gcc/lib may be hidden by files in: /home/abt-grimme/opt/conda/envs/scine/lib Some of these libraries may not be found correctly. -- Generating done -- Build files have been written to: /tmp1/ehlert/scine/molassembler/_build ```cmake
``` active environment : scine active env location : /home/abt-grimme/opt/conda/envs/scine shell level : 3 user config file : /home/ehlert/.condarc populated config files : /home/abt-grimme/opt/conda/.condarc /home/ehlert/.condarc conda version : 4.12.0 conda-build version : not installed python version : 3.9.10.final.0 virtual packages : __linux=4.12.14=0 __glibc=2.26=0 __unix=0=0 __archspec=1=x86_64 base environment : /home/abt-grimme/opt/conda (writable) conda av data dir : /home/abt-grimme/opt/conda/etc/conda conda av metadata url : None channel URLs : https://conda.anaconda.org/conda-forge/linux-64 https://conda.anaconda.org/conda-forge/noarch package cache : /home/abt-grimme/opt/conda/pkgs /home/ehlert/.conda/pkgs envs directories : /home/abt-grimme/opt/conda/envs /home/ehlert/.conda/envs platform : linux-64 user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.10 Linux/4.12.14-lp151.28.13-default opensuse-leap/15.1 glibc/2.26 UID:GID : 1748:1001 netrc file : None offline mode : False ```mamba info
``` _libgcc_mutex 0.1 conda_forge conda-forge _openmp_mutex 4.5 2_kmp_llvm conda-forge abseil-cpp 20211102.0 h27087fc_1 conda-forge boost-cpp 1.74.0 h75c5d50_8 conda-forge bzip2 1.0.8 h7f98852_4 conda-forge c-ares 1.18.1 h7f98852_0 conda-forge ca-certificates 2022.6.15 ha878542_0 conda-forge cyrus-sasl 2.1.27 h7604b24_5 conda-forge docutils 0.19 py310hff52083_0 conda-forge eigen 3.4.0 h4bd325d_0 conda-forge gitdb 4.0.9 pyhd8ed1ab_0 conda-forge gitpython 3.1.27 pyhd8ed1ab_0 conda-forge gmock 1.11.0 h924138e_0 conda-forge gtest 1.11.0 h924138e_0 conda-forge icu 70.1 h27087fc_0 conda-forge keyutils 1.6.1 h166bdaf_0 conda-forge krb5 1.19.3 h08a2579_0 conda-forge ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge libblas 3.9.0 15_linux64_openblas conda-forge libbson 1.21.2 h27087fc_0 conda-forge libcblas 3.9.0 15_linux64_openblas conda-forge libcurl 7.83.1 h2283fc2_0 conda-forge libedit 3.1.20191231 he28a2e2_2 conda-forge libev 4.33 h516909a_1 conda-forge libffi 3.4.2 h7f98852_5 conda-forge libgcc-ng 12.1.0 h8d9b700_16 conda-forge libgfortran-ng 12.1.0 h69a702a_16 conda-forge libgfortran5 12.1.0 hdcd56e2_16 conda-forge libgomp 12.1.0 h8d9b700_16 conda-forge liblapack 3.9.0 15_linux64_openblas conda-forge libmongoc 1.21.2 h0506597_0 conda-forge libmongocxx 3.6.7 h6e2fe03_0 conda-forge libnghttp2 1.47.0 he49606f_0 conda-forge libnsl 2.0.0 h7f98852_0 conda-forge libntlm 1.4 h7f98852_1002 conda-forge libopenblas 0.3.20 pthreads_h78a6416_0 conda-forge libssh2 1.10.0 ha35d2d1_2 conda-forge libstdcxx-ng 12.1.0 ha89aaad_16 conda-forge libuuid 2.32.1 h7f98852_1000 conda-forge libzlib 1.2.12 h166bdaf_1 conda-forge llvm-openmp 14.0.4 he0ac6c6_0 conda-forge lockfile 0.12.2 py_1 conda-forge lz4-c 1.9.3 h9c3ff4c_1 conda-forge mctc-lib 0.3.0 hc3ea6d6_0 conda-forge mkl 2022.1.0 h84fe81f_915 conda-forge mongodb 5.1.1 h0e13805_3 conda-forge nauty 2.7.2 h7f98852_0 conda-forge ncurses 6.3 h27087fc_1 conda-forge nlohmann_json 3.10.5 h27087fc_1 conda-forge numpy 1.23.0 py310h53a5b5f_0 conda-forge openssl 3.0.5 h166bdaf_0 conda-forge pcre 8.45 h9c3ff4c_0 conda-forge pip 22.1.2 pyhd8ed1ab_0 conda-forge psutil 5.9.1 py310h5764c6d_0 conda-forge pybind11 2.9.2 py310hbf28c38_1 conda-forge pybind11-global 2.9.2 py310hbf28c38_1 conda-forge python 3.10.5 ha86cf86_0_cpython conda-forge python-daemon 2.3.0 pyhd8ed1ab_1 conda-forge python_abi 3.10 2_cp310 conda-forge pyyaml 6.0 py310h5764c6d_4 conda-forge readline 8.1.2 h0f457ee_0 conda-forge ringdecomposerlib 1.1.3 h166bdaf_1 conda-forge scine-core 4.0.1 h6e2fe03_0 conda-forge scine-database 1.0.0 pypi_0 pypi scine-puffin 1.0.0 pypi_0 pypi scine-readuct 4.0.0 he3004b7_0 conda-forge scine-sparrow 3.0.1 he3004b7_1 conda-forge scine-utilsos 5.0.0 h99171d1_0 conda-forge scine-xtb 1.0.1 h886c582_1 conda-forge scipy 1.8.1 py310h7612f91_0 conda-forge setproctitle 1.2.3 py310h5764c6d_0 conda-forge setuptools 63.1.0 py310hff52083_0 conda-forge smmap 3.0.5 pyh44b312d_0 conda-forge snappy 1.1.9 hbd366e4_1 conda-forge sqlite 3.39.0 h4ff8645_0 conda-forge tbb 2021.5.0 h924138e_1 conda-forge tk 8.6.12 h27826a3_0 conda-forge typing_extensions 4.3.0 pyha770c72_0 conda-forge tzdata 2022a h191b570_0 conda-forge wheel 0.37.1 pyhd8ed1ab_0 conda-forge xtb 6.5.0 h9d67668_0 conda-forge xz 5.2.5 h516909a_1 conda-forge yaml 0.2.5 h7f98852_2 conda-forge yaml-cpp 0.7.0 h27087fc_1 conda-forge zlib 1.2.12 h166bdaf_1 conda-forge zstd 1.5.2 h8a70e8d_2 conda-forge ```mamba list