Skip to content

Instantly share code, notes, and snippets.

@pgbarletta
Created September 22, 2024 14:32
Show Gist options
  • Save pgbarletta/80ef48dc4ae47130a3c55dbca62cb2e2 to your computer and use it in GitHub Desktop.
Save pgbarletta/80ef48dc4ae47130a3c55dbca62cb2e2 to your computer and use it in GitHub Desktop.
swig error
# Configure with this line:
cmake -S. -Bbuild -DXTB_INCLUDE_DIR=/mnt/simdata/pbarletta/miniforge3/envs/mope/include -DXTB_LIBRARY_DIR=/mnt/simdata/pbarletta/miniforge3/envs/mope/lib -DCMAKE_INSTALL_PREFIX=/mnt/simdata/pbarletta/openmm-8.1.2 -DSWIG_EXECUTABLE=`which swig` -DCMAKE_PREFIX_PATH=/mnt/simdata/pbarletta/openmm-8.1.2
# go into build and compile+install
(mope) [yorkgroup@chardonnay build]$ make install
[ 11%] Building CXX object CMakeFiles/OpenMMXTB.dir/openmmapi/src/XtbForce.cpp.o
[ 22%] Building CXX object CMakeFiles/OpenMMXTB.dir/openmmapi/src/XtbForceImpl.cpp.o
[ 33%] Building CXX object CMakeFiles/OpenMMXTB.dir/serialization/src/XtbForceProxy.cpp.o
[ 44%] Building CXX object CMakeFiles/OpenMMXTB.dir/serialization/src/XtbSerializationProxyRegistration.cpp.o
[ 55%] Linking CXX shared library libOpenMMXTB.so
[ 55%] Built target OpenMMXTB
[ 66%] Building CXX object tests/CMakeFiles/TestXtbForce.dir/TestXtbForce.cpp.o
[ 77%] Linking CXX executable TestXtbForce
[ 77%] Built target TestXtbForce
[ 88%] Building CXX object serialization/tests/CMakeFiles/TestSerializeXtbForce.dir/TestSerializeXtbForce.cpp.o
[100%] Linking CXX executable TestSerializeXtbForce
[100%] Built target TestSerializeXtbForce
Install the project...
-- Install configuration: ""
-- Up-to-date: /mnt/simdata/pbarletta/openmm-8.1.2/include/XtbForce.h
-- Up-to-date: /mnt/simdata/pbarletta/openmm-8.1.2/include/XtbKernels.h
-- Up-to-date: /mnt/simdata/pbarletta/openmm-8.1.2/include/internal/XtbForceImpl.h
-- Up-to-date: /mnt/simdata/pbarletta/openmm-8.1.2/include/internal/windowsExportXtb.h
-- Installing: /mnt/simdata/pbarletta/openmm-8.1.2/lib/libOpenMMXTB.so
-- Set runtime path of "/mnt/simdata/pbarletta/openmm-8.1.2/lib/libOpenMMXTB.so" to ""
# and then get an error when trying to generate the plugin using swig:
(mope) [yorkgroup@chardonnay build]$ make PythonInstall
[ 20%] CMake-copying file /mnt/simdata/pbarletta/openmm-xtb/python/openmmxtb/forcefields/xtb/gfnff.xml to /mnt/simdata/pbarletta/openmm-xtb/build/python/openmmxtb/forcefields/xtb/gfnff.xml
[ 40%] CMake-copying file /mnt/simdata/pbarletta/openmm-xtb/python/openmmxtb/__init__.py to /mnt/simdata/pbarletta/openmm-xtb/build/python/openmmxtb/__init__.py
[ 60%] CMake-copying file /mnt/simdata/pbarletta/openmm-xtb/python/openmmxtb/forcefields/xtb/gfn1xtb.xml to /mnt/simdata/pbarletta/openmm-xtb/build/python/openmmxtb/forcefields/xtb/gfn1xtb.xml
[ 80%] CMake-copying file /mnt/simdata/pbarletta/openmm-xtb/python/openmmxtb/forcefields/xtb/gfn2xtb.xml to /mnt/simdata/pbarletta/openmm-xtb/build/python/openmmxtb/forcefields/xtb/gfn2xtb.xml
[100%] Generating XtbPluginWrapper.cpp
/mnt/simdata/pbarletta/openmm-xtb/python/xtbplugin.i:3: Error: Unable to find 'swig/OpenMMSwigHeaders.i'
make[3]: *** [python/CMakeFiles/PythonInstall.dir/build.make:77: python/XtbPluginWrapper.cpp] Error 1
make[2]: *** [CMakeFiles/Makefile2:214: python/CMakeFiles/PythonInstall.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:221: python/CMakeFiles/PythonInstall.dir/rule] Error 2
make: *** [Makefile:218: PythonInstall] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment