michellab / Sire

Sire Molecular Simulations Framework
http://siremol.org
GNU General Public License v3.0
95 stars 26 forks source link

[feat_serialize] related issues compiling sire with compile sire #350

Closed ppxasjsm closed 3 years ago

ppxasjsm commented 3 years ago

OS:

Mac osx Catilina 10.15.7

cmake: version 3.19.2

clang: 9.0.1

Compile sire produces the following error:

  The C++ compiler

    "/Users/toni_brain/sire.app/bin/clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /Users/toni_brain/Projects_git/Sire/build/corelib/CMakeFiles/CMakeTmp

    Run Build Command(s):/Users/toni_brain/sire.app/bin/make cmTC_de7e6/fast && /Users/toni_brain/sire.app/bin/make -f CMakeFiles/cmTC_de7e6.dir/build.make CMakeFiles/cmTC_de7e6.dir/build
    make[1]: Entering directory '/Users/toni_brain/Projects_git/Sire/build/corelib/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_de7e6.dir/testCXXCompiler.cxx.o
    /Users/toni_brain/sire.app/bin/clang++    -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.9   -o CMakeFiles/cmTC_de7e6.dir/testCXXCompiler.cxx.o -c /Users/toni_brain/Projects_git/Sire/build/corelib/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    Linking CXX executable cmTC_de7e6
    /Users/toni_brain/sire.app/bin/cmake -E cmake_link_script CMakeFiles/cmTC_de7e6.dir/link.txt --verbose=1
    /Users/toni_brain/sire.app/bin/clang++    -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.9 -Wl,-search_paths_first -Wl,-headerpad_max_install_names   CMakeFiles/cmTC_de7e6.dir/testCXXCompiler.cxx.o  -o cmTC_de7e6 
    ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/lib/libSystem.tbd' for architecture x86_64
    clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
    make[1]: *** [CMakeFiles/cmTC_de7e6.dir/build.make:104: cmTC_de7e6] Error 1
    make[1]: Leaving directory '/Users/toni_brain/Projects_git/Sire/build/corelib/CMakeFiles/CMakeTmp'
    make: *** [Makefile:138: cmTC_de7e6/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:189 (project)
lohedges commented 3 years ago

https://stackoverflow.com/questions/63592445/ld-unsupported-tapi-file-type-tapi-tbd-in-yaml-file

ppxasjsm commented 3 years ago

Updating clang seems to have done the trick for now....thanks :)

lohedges commented 3 years ago

Great, glad it was a simple fix. Now on to the next issue ;-)

ppxasjsm commented 3 years ago

Ok issues compiling wrappers:

/Users/toni_brain/Projects_git/Sire/wrapper/Helpers/objectregistry.hpp:5:10: fatal error: 'boost/python.hpp' file not
      found
#include <boost/python.hpp>
         ^~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [Helpers/CMakeFiles/SirePython.dir/build.make:80: Helpers/CMakeFiles/SirePython.dir/objectregistry.cpp.o] Error 1
make[2]: Leaving directory '/Users/toni_brain/Projects_git/Sire/build/wrapper'
make[1]: *** [CMakeFiles/Makefile2:559: Helpers/CMakeFiles/SirePython.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/Users/toni_brain/Projects_git/Sire/wrapper/python/main.cpp:8:10: fatal error: 'tbb/task_scheduler_init.h' file not
      found
#include "tbb/task_scheduler_init.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[2]: *** [python/CMakeFiles/sire_python.dir/build.make:80: python/CMakeFiles/sire_python.dir/main.cpp.o] Error 1
make[2]: Leaving directory '/Users/toni_brain/Projects_git/Sire/build/wrapper'
make[1]: *** [CMakeFiles/Makefile2:1072: python/CMakeFiles/sire_python.dir/all] Error 2
make[1]: Leaving directory '/Users/toni_brain/Projects_git/Sire/build/wrapper'
make: *** [Makefile:147: all] Error 2
SOMETHING WENT WRONG WHEN COMPILING WRAPPER!
lohedges commented 3 years ago

I've seen this issue periodically too. Some times a simple re-run of ./compile_sire.sh fixes things, other times it's worked following a complete rebuild after deleting everything. I'm not sure what the problem is, but imagine that CMake has messed up, or the cache isn't correct. The files that it's complaining about definitely exist in the Miniconda and I've even got CMake to print out the supposed BOOST and TBB paths, which are also correct.

lohedges commented 3 years ago

Closing since this has been reported elsewhere and can be solved with the workaround export CPLUS_INCLUDE_PATH=...conda/include (Using the full path to the Sire conda include.)