qcscine / xtb_wrapper Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://scine.ethz.ch
License: BSD 3-Clause "New" or "Revised" License
Home Page: https://scine.ethz.ch
License: BSD 3-Clause "New" or "Revised" License
Trying to build this wrapper against the conda-forge xtb
distribution currently fails to pickup the installed library. Instead xtb
is downloaded and build again:
❯ cmake -B _build -G Ninja -DCMAKE_INSTALL_PREFIX=$PWD/PREFIX -DSCINE_MARCH=""
-- The C compiler identification is GNU 11.1.0
-- The CXX compiler identification is GNU 11.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/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: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The Fortran compiler identification is GNU 11.1.0
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran - skipped
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP_Fortran: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - not found
-- 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
-- Looking for Fortran sgemm
-- Looking for Fortran sgemm - found
-- Found BLAS: /opt/intel/mkl/lib/intel64_lin/libmkl_gf_lp64.so;/opt/intel/mkl/lib/intel64_lin/libmkl_gnu_thread.so;/opt/intel/mkl/lib/intel64_lin/libmkl_core.so;/usr/lib/libgomp.so;-lpthread;-lm;-ldl
-- Looking for Fortran cheev
-- Looking for Fortran cheev - found
-- Found LAPACK: /opt/intel/mkl/lib/intel64_lin/libmkl_gf_lp64.so;/opt/intel/mkl/lib/intel64_lin/libmkl_gnu_thread.so;/opt/intel/mkl/lib/intel64_lin/libmkl_core.so;/usr/lib/libgomp.so;-lpthread;-lm;-ldl;-lpthread;-lm;-ldl
-- xtb was not found in your PATH, so it was downloaded.
-- Setting build type to default 'RelWithDebInfo'
-- Scine::UtilsOS found locally at /home/awvwgk/software/opt/conda/envs/scine/lib/cmake/ScineUtilsOS
-- Configuring done
CMake Warning at src/Xtb/CMakeLists.txt:10 (add_library):
Cannot generate a safe runtime search path for target Xtb because files in
some directories may conflict with libraries in implicit directories:
runtime library [libgomp.so.1] in /usr/lib may be hidden by files in:
/home/awvwgk/software/opt/conda/envs/scine/lib
Some of these libraries may not be found correctly.
-- Generating done
-- Build files have been written to: /home/awvwgk/projects/src/git/scine/xtb_wrapper/_build
❯ mamba list
# packages in environment at /home/awvwgk/software/opt/conda/envs/scine:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_gnu conda-forge
boost-cpp 1.74.0 h6cacc03_7 conda-forge
bzip2 1.0.8 h7f98852_4 conda-forge
ca-certificates 2021.10.8 ha878542_0 conda-forge
cereal 1.3.2 hd8ed1ab_0 conda-forge
eigen 3.4.0 h4bd325d_0 conda-forge
icu 69.1 h9c3ff4c_0 conda-forge
ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge
libblas 3.9.0 13_linux64_openblas conda-forge
libcblas 3.9.0 13_linux64_openblas conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-ng 11.2.0 h1d223b6_14 conda-forge
libgfortran-ng 11.2.0 h69a702a_14 conda-forge
libgfortran5 11.2.0 h5c6108e_14 conda-forge
libgomp 11.2.0 h1d223b6_14 conda-forge
liblapack 3.9.0 13_linux64_openblas conda-forge
libnsl 2.0.0 h7f98852_0 conda-forge
libopenblas 0.3.18 pthreads_h8fe5266_0 conda-forge
libstdcxx-ng 11.2.0 he4da1e4_14 conda-forge
libuuid 2.32.1 h7f98852_1000 conda-forge
libzlib 1.2.11 h166bdaf_1014 conda-forge
lz4-c 1.9.3 h9c3ff4c_1 conda-forge
ncurses 6.3 h27087fc_1 conda-forge
numpy 1.22.3 py310h45f3432_1 conda-forge
openssl 3.0.2 h166bdaf_1 conda-forge
pip 22.0.4 pyhd8ed1ab_0 conda-forge
pkg-config 0.29.2 h36c2ea0_1008 conda-forge
pybind11-abi 4 hd8ed1ab_3 conda-forge
python 3.10.4 h2660328_0_cpython conda-forge
python_abi 3.10 2_cp310 conda-forge
readline 8.1 h46c0cb4_0 conda-forge
scine-core 4.0.0 h6e2fe03_0 conda-forge
scine-sparrow 3.0.0 h108e910_0 conda-forge
scine-utilities-python 4.0.0 py310hdda0239_1 conda-forge
scine-utilsos 4.0.0 hab723ef_0 conda-forge
scipy 1.8.0 py310hea5193d_1 conda-forge
setuptools 62.0.0 py310hff52083_0 conda-forge
sqlite 3.37.1 h4ff8645_0 conda-forge
tk 8.6.12 h27826a3_0 conda-forge
tzdata 2022a h191b570_0 conda-forge
wheel 0.37.1 pyhd8ed1ab_0 conda-forge
xtb 6.4.1 hf06ca72_2 conda-forge
xz 5.2.5 h516909a_1 conda-forge
yaml-cpp 0.6.3 he1b5a44_4 conda-forge
zlib 1.2.11 h166bdaf_1014 conda-forge
zstd 1.5.2 ha95c52a_0 conda-forge
❯ mamba info
__ __ __ __
/ \ / \ / \ / \
/ \/ \/ \/ \
███████████████/ /██/ /██/ /██/ /████████████████████████
/ / \ / \ / \ / \ \____
/ / \_/ \_/ \_/ \ o \__,
/ _/ \_____/ `
|/
███╗ ███╗ █████╗ ███╗ ███╗██████╗ █████╗
████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
██╔████╔██║███████║██╔████╔██║██████╔╝███████║
██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
██║ ╚═╝ ██║██║ ██║██║ ╚═╝ ██║██████╔╝██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝
mamba (0.22.1) supported by @QuantStack
GitHub: https://github.com/mamba-org/mamba
Twitter: https://twitter.com/QuantStack
█████████████████████████████████████████████████████████████
active environment : scine
active env location : /home/awvwgk/software/opt/conda/envs/scine
shell level : 2
user config file : /home/awvwgk/.condarc
populated config files : /home/awvwgk/software/opt/conda/.condarc
/home/awvwgk/.condarc
conda version : 4.12.0
conda-build version : not installed
python version : 3.9.12.final.0
virtual packages : __linux=5.10.93=0
__glibc=2.33=0
__unix=0=0
__archspec=1=x86_64
base environment : /home/awvwgk/software/opt/conda (writable)
conda av data dir : /home/awvwgk/software/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/awvwgk/software/opt/conda/pkgs
/home/awvwgk/.conda/pkgs
envs directories : /home/awvwgk/software/opt/conda/envs
/home/awvwgk/.conda/envs
platform : linux-64
user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.12 Linux/5.10.93-1-MANJARO manjaro/21.2.2 glibc/2.33
UID:GID : 1000:1000
netrc file : None
offline mode : False
Building this project against
boost-cpp: 1.74.0
eigen: 3.4.0
scine-core: 4.0.2
scine-utilsos: 5.0.0
xtb: 6.5.1
yaml-cpp: 0.7.0
fails to link with
[8/8] Linking CXX shared library src/Xtb/xtb.module.so
FAILED: src/Xtb/xtb.module.so
: && $BUILD_PREFIX/bin/x86_64-conda-linux-gnu-c++ -fPIC -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/scine-xtb-1.0.2 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -Wall -Wextra -Wpedantic -O2 -g -DNDEBUG -Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,$PREFIX/lib -Wl,-rpath-link,$PREFIX/lib -L$PREFIX/lib -Wl,--no-as-needed -shared -Wl,-soname,xtb.module.so -o src/Xtb/xtb.module.so src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/GFN0Wrapper.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/GFN1Wrapper.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/GFN2Wrapper.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/GFNFFWrapper.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/XtbCalculatorBase.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/XtbSettings.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/XtbModule.cpp.o $PREFIX/lib/libutilsos.so -llib-xtb-static -lgfortran $PREFIX/lib/libboost_filesystem.so.1.74.0 $PREFIX/lib/libboost_system.so.1.74.0 $PREFIX/lib/libblas.so && :
$BUILD_PREFIX/bin/../lib/gcc/x86_64-conda-linux-gnu/10.4.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -llib-xtb-static
collect2: error: ld returned 1 exit status
Due to using the lib-xtb-static
target rather than the generated interface library from pkg-config finder.
active environment : base
active env location : /opt/conda
shell level : 1
user config file : /home/conda/.condarc
populated config files : /opt/conda/.condarc
/home/conda/.condarc
conda version : 4.13.0
conda-build version : 3.22.0
python version : 3.9.13.final.0
virtual packages : __linux=5.15.0=0
__glibc=2.17=0
__unix=0=0
__archspec=1=x86_64
base environment : /opt/conda (writable)
conda av data dir : /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/conda/feedstock_root/build_artifacts/pkg_cache
/opt/conda/pkgs
envs directories : /opt/conda/envs
/home/conda/.conda/envs
platform : linux-64
user-agent : conda/4.13.0 requests/2.28.1 CPython/3.9.13 Linux/5.15.0-1014-azure centos/7.9.2009 glibc/2.17
UID:GID : 1001:1001
netrc file : None
offline mode : False
Another issue with the LLVM toolchain, linking with the clang and the ld on MacOS (LLVM based) I get an error because the --no-as-needed
option is unknown.
[8/8] Linking CXX shared library src/Xtb/xtb.module.dylib
FAILED: src/Xtb/xtb.module.dylib
: && $BUILD_PREFIX/bin/x86_64-apple-darwin13.4.0-clang++ -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -fmessage-length=0 -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/scine-xtb-1.0.0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -Wall -Wextra -Wpedantic -O3 -DNDEBUG -isysroot /Applications/Xcode_12.4.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -mmacosx-version-min=10.9 -dynamiclib -Wl,-headerpad_max_install_names -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs -Wl,-rpath,$PREFIX/lib -L$PREFIX/lib -Wl,--no-as-needed -o src/Xtb/xtb.module.dylib -install_name @rpath/xtb.module.dylib src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/GFN0Wrapper.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/GFN1Wrapper.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/GFN2Wrapper.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/GFNFFWrapper.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/XtbCalculatorBase.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/Wrapper/XtbSettings.cpp.o src/Xtb/CMakeFiles/Xtb.dir/Xtb/XtbModule.cpp.o $PREFIX/lib/libutilsos.dylib -lgfortran $PREFIX/lib/libboost_filesystem.dylib $PREFIX/lib/libboost_system.dylib -framework Accelerate $PREFIX/lib/libxtb.dylib && :
ld: unknown option: --no-as-needed
clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
active environment : base
active env location : /Users/runner/mambaforge
shell level : 1
user config file : /Users/runner/.condarc
populated config files : /Users/runner/mambaforge/.condarc
conda version : 4.12.0
conda-build version : 3.21.8
python version : 3.9.10.final.0
virtual packages : __osx=10.15.7=0
__unix=0=0
__archspec=1=x86_64
base environment : /Users/runner/mambaforge (writable)
conda av data dir : /Users/runner/mambaforge/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/osx-64
https://conda.anaconda.org/conda-forge/noarch
package cache : /Users/runner/mambaforge/pkgs
/Users/runner/.conda/pkgs
envs directories : /Users/runner/mambaforge/envs
/Users/runner/.conda/envs
platform : osx-64
user-agent : conda/4.12.0 requests/2.27.1 CPython/3.9.10 Darwin/19.6.0 OSX/10.15.7
UID:GID : 501:20
netrc file : None
offline mode : False
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.