CONDA_BUILD_SYSROOT is incorrectly set on macOS
In my system (macOS Mojave - 10.14) and as well on the previous version (10.13), when I conda activate
an environment containing bob-devel
and installed compilers, the value of ${CONDA_BUILD_SYSROOT}
is not correctly set.
$ conda activate bug
(bug) $ echo $CONDA_BUILD_SYSROOT
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
Since in bob/bob.admin/gitlab/conda_build_config.yaml, the value of that variable points (correctly) to /opt/MacOSX10.9.sdk
, this should be same when you conda activate
the environment. Somehow, this variable is not making to the environment, which breaks it for building binaries:
(bug) $ buildout
Creating directory '/Users/andre/Projects/bob/bob.learn.boosting/eggs'.
mr.developer: Creating missing sources dir /Users/andre/Projects/bob/bob.learn.boosting/src.
Creating directory '/Users/andre/Projects/bob/bob.learn.boosting/bin'.
Creating directory '/Users/andre/Projects/bob/bob.learn.boosting/parts'.
Creating directory '/Users/andre/Projects/bob/bob.learn.boosting/develop-eggs'.
Develop: '/Users/andre/Projects/bob/bob.learn.boosting/.'
bob.buildout.tools: taking requirement `setuptools' (40.2.0) from `/Users/andre/conda/envs/bug/lib/python3.6/site-packages'
bob.buildout.tools: taking requirement `scipy' (1.1.0) from `/Users/andre/conda/envs/bug/lib/python3.6/site-packages'
bob.buildout.tools: taking requirement `bob.extension' (3.1.1b0) from `/Users/andre/conda/envs/bug/lib/python3.6/site-packages'
bob.buildout.tools: taking requirement `bob.blitz' (2.0.17b0) from `/Users/andre/conda/envs/bug/lib/python3.6/site-packages'
bob.buildout.tools: taking requirement `bob.core' (2.2.2b0) from `/Users/andre/conda/envs/bug/lib/python3.6/site-packages'
bob.buildout.tools: taking requirement `bob.io.base' (3.0.5b0) from `/Users/andre/conda/envs/bug/lib/python3.6/site-packages'
running develop
running egg_info
creating bob.learn.boosting.egg-info
writing bob.learn.boosting.egg-info/PKG-INFO
writing dependency_links to bob.learn.boosting.egg-info/dependency_links.txt
writing entry points to bob.learn.boosting.egg-info/entry_points.txt
writing requirements to bob.learn.boosting.egg-info/requires.txt
writing top-level names to bob.learn.boosting.egg-info/top_level.txt
writing manifest file 'bob.learn.boosting.egg-info/SOURCES.txt'
reading manifest file 'bob.learn.boosting.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'bootstrap-buildout.py'
writing manifest file 'bob.learn.boosting.egg-info/SOURCES.txt'
running build_ext
Re-run cmake no build system arguments
-- The C compiler identification is Clang 4.0.1
-- The CXX compiler identification is Clang 4.0.1
-- Check for working C compiler: /Users/andre/conda/envs/bug/bin/x86_64-apple-darwin13.4.0-clang
-- Check for working C compiler: /Users/andre/conda/envs/bug/bin/x86_64-apple-darwin13.4.0-clang -- broken
CMake Error at /Users/andre/conda/envs/bug/share/cmake-3.12/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler
"/Users/andre/conda/envs/bug/bin/x86_64-apple-darwin13.4.0-clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/andre/Projects/bob/bob.learn.boosting/build/build_cmake/bob_learn_boosting/CMakeFiles/CMakeTmp
Run Build Command:"/usr/local/bin/gmake" "cmTC_f66b7/fast"
/usr/local/bin/gmake -f CMakeFiles/cmTC_f66b7.dir/build.make CMakeFiles/cmTC_f66b7.dir/build
gmake[1]: Entering directory '/Users/andre/Projects/bob/bob.learn.boosting/build/build_cmake/bob_learn_boosting/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_f66b7.dir/testCCompiler.c.o
/Users/andre/conda/envs/bug/bin/x86_64-apple-darwin13.4.0-clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isysroot /opt/MacOSX10.9.sdk -mmacosx-version-min=10.9 -o CMakeFiles/cmTC_f66b7.dir/testCCompiler.c.o -c /Users/andre/Projects/bob/bob.learn.boosting/build/build_cmake/bob_learn_boosting/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_f66b7
/Users/andre/conda/envs/bug/bin/cmake -E cmake_link_script CMakeFiles/cmTC_f66b7.dir/link.txt --verbose=1
/Users/andre/conda/envs/bug/bin/x86_64-apple-darwin13.4.0-clang -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isysroot /opt/MacOSX10.9.sdk -mmacosx-version-min=10.9 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-pie -Wl,-headerpad_max_install_names -Wl,-dead_strip_dylibs CMakeFiles/cmTC_f66b7.dir/testCCompiler.c.o -o cmTC_f66b7
ld: warning: ignoring file /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd, file was built for unsupported file format ( 0x2D 0x2D 0x2D 0x20 0x21 0x74 0x61 0x70 0x69 0x2D 0x74 0x62 0x64 0x2D 0x76 0x33 ) which is not the architecture being linked (x86_64): /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd
ld: dynamic main executables must link with libSystem.dylib for architecture x86_64
clang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [CMakeFiles/cmTC_f66b7.dir/build.make:87: cmTC_f66b7] Error 1
gmake[1]: Leaving directory '/Users/andre/Projects/bob/bob.learn.boosting/build/build_cmake/bob_learn_boosting/CMakeFiles/CMakeTmp'
gmake: *** [Makefile:121: cmTC_f66b7/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:4 (project)
-- Configuring incomplete, errors occurred!
See also "/Users/andre/Projects/bob/bob.learn.boosting/build/build_cmake/bob_learn_boosting/CMakeFiles/CMakeOutput.log".
See also "/Users/andre/Projects/bob/bob.learn.boosting/build/build_cmake/bob_learn_boosting/CMakeFiles/CMakeError.log".
error: Could not generate makefiles with CMake
While:
Installing.
Processing develop directory '/Users/andre/Projects/bob/bob.learn.boosting/.'.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/Users/andre/conda/envs/bug/lib/python3.6/site-packages/zc/buildout/buildout.py", line 2128, in main
getattr(buildout, command)(args)
File "/Users/andre/conda/envs/bug/lib/python3.6/site-packages/zc/buildout/buildout.py", line 660, in install
installed_develop_eggs = self._develop()
File "/Users/andre/conda/envs/bug/lib/python3.6/site-packages/zc/buildout/buildout.py", line 903, in _develop
zc.buildout.easy_install.develop(setup, dest)
File "/Users/andre/conda/envs/bug/lib/python3.6/site-packages/bob/buildout/extension.py", line 213, in develop
zc.buildout.easy_install.call_subprocess(args)
File "/Users/andre/conda/envs/bug/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 166, in call_subprocess
% repr(args)[1:-1])
Exception: Failed to run command:
'/Users/andre/conda/envs/bug/bin/python', '/var/folders/b3/7l98n3bd7dqc1stjmgxb9mbw0000gn/T/tmpyhmf1cbq', '-v', 'develop', '-mxN', '-d', '/Users/andre/Projects/bob/bob.learn.boosting/develop-eggs/tmpwt4h3ep6build'