Closed lohedges closed 4 years ago
Actually, having updated and restarted the MacBook it now no longer compiles there either. Output from running ./compile_sire.sh
:
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... /Users/lester/sire.app/bin/clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/Users/lester/Code/Sire/build/corelib/build_bundled/libcpuid-0.4.1':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
-- Patience... Compiling libcpuid...
make: *** No targets specified and no makefile found. Stop.
-- Patience... Installing libcpuid...
make: *** No rule to make target 'install'. Stop.
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: can't open file: /Users/lester/sire.app/pkgs/sire-2019.3.0/bundled/lib/libcpuid.dylib (No such file or directory)
CMake Error at src/bundled/install_cpuid.cmake:127 (message):
Cannot find CPUID library
/Users/lester/sire.app/pkgs/sire-2019.3.0/bundled/lib/libcpuid.dylib.
Error with compile?
Call Stack (most recent call first):
CMakeLists.txt:765 (include)
-- Configuring incomplete, errors occurred!
See also "/Users/lester/Code/Sire/build/corelib/CMakeFiles/CMakeOutput.log".
See also "/Users/lester/Code/Sire/build/corelib/CMakeFiles/CMakeError.log".
SOMETHING WENT WRONG WHEN USING CMAKE ON CORELIB!
This full contents of config.log
can be found below:
```
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libcpuid CPU Identification library configure 0.4.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ /Users/lester/Code/Sire/build/corelib/build_bundled/libcpuid-0.4.1/configure --enable-static=no --enable-shared=yes --prefix=/Users/lester/sire.app/pkgs/sire-2019.3.0/bundled --libdir=/Users/lester/sire.app/pkgs/sire-2019.3.0/bundled/lib CC=/Users/lester/sire.app/bin/clang CFLAGS=-DHAVE_STDINT_H
## --------- ##
## Platform. ##
## --------- ##
hostname = roll.local
uname -m = x86_64
uname -r = 18.7.0
uname -s = Darwin
uname -v = Darwin Kernel Version 18.7.0: Thu Jan 23 06:52:12 PST 2020; root:xnu-4903.278.25~1/RELEASE_X86_64
/usr/bin/uname -p = i386
/bin/uname -X = unknown
/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = Mach kernel version:
Darwin Kernel Version 18.7.0: Thu Jan 23 06:52:12 PST 2020; root:xnu-4903.278.25~1/RELEASE_X86_64
Kernel configured for up to 4 processors.
2 processors are physically available.
4 processors are logically available.
Processor type: x86_64h (Intel x86-64h Haswell)
Processors active: 0 1 2 3
Primary memory available: 16.00 gigabytes
Default processor set: 350 tasks, 1362 threads, 4 processors
Load average: 3.18, Mach factor: 1.10
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /Users/lester/sire.app/bin
PATH: /Users/lester/sire.app/condabin
PATH: /usr/local/gromacs/bin
PATH: /usr/local/bin
PATH: /usr/local/sbin
PATH: /usr/bin
PATH: /bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/local/MacGPG2/bin
PATH: /usr/local/munki
PATH: /opt/X11/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2272: checking for a BSD-compatible install
configure:2340: result: /usr/local/bin/ginstall -c
configure:2351: checking whether build environment is sane
configure:2406: result: yes
configure:2557: checking for a thread-safe mkdir -p
configure:2596: result: /usr/local/bin/gmkdir -p
configure:2603: checking for gawk
configure:2633: result: no
configure:2603: checking for mawk
configure:2633: result: no
configure:2603: checking for nawk
configure:2633: result: no
configure:2603: checking for awk
configure:2619: found /usr/bin/awk
configure:2630: result: awk
configure:2641: checking whether make sets $(MAKE)
configure:2663: result: yes
configure:2692: checking whether make supports nested variables
configure:2709: result: yes
configure:2846: checking whether make supports nested variables
configure:2863: result: yes
configure:2935: checking for gcc
configure:2962: result: /Users/lester/sire.app/bin/clang
configure:3191: checking for C compiler version
configure:3200: /Users/lester/sire.app/bin/clang --version >&5
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Users/lester/sire.app/bin
configure:3211: $? = 0
configure:3200: /Users/lester/sire.app/bin/clang -v >&5
clang version 4.0.1 (tags/RELEASE_401/final)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir: /Users/lester/sire.app/bin
configure:3211: $? = 0
configure:3200: /Users/lester/sire.app/bin/clang -V >&5
clang-4.0: error: argument to '-V' is missing (expected 1 value)
clang-4.0: error: no input files
configure:3211: $? = 1
configure:3200: /Users/lester/sire.app/bin/clang -qversion >&5
clang-4.0: error: unknown argument: '-qversion'
clang-4.0: error: no input files
configure:3211: $? = 1
configure:3231: checking whether the C compiler works
configure:3253: /Users/lester/sire.app/bin/clang -DHAVE_STDINT_H conftest.c >&5
configure:3257: $? = 0
configure:3305: result: yes
configure:3308: checking for C compiler default output file name
configure:3310: result: a.out
configure:3316: checking for suffix of executables
configure:3323: /Users/lester/sire.app/bin/clang -o conftest -DHAVE_STDINT_H conftest.c >&5
configure:3327: $? = 0
configure:3349: result:
configure:3371: checking whether we are cross compiling
configure:3379: /Users/lester/sire.app/bin/clang -o conftest -DHAVE_STDINT_H conftest.c >&5
conftest.c:11:10: fatal error: 'stdio.h' file not found
#include
This section contains some clang related errors:
configure:3200: /Users/lester/sire.app/bin/clang -V >&5
clang-4.0: error: argument to '-V' is missing (expected 1 value)
clang-4.0: error: no input files
configure:3211: $? = 1
configure:3200: /Users/lester/sire.app/bin/clang -qversion >&5
clang-4.0: error: unknown argument: '-qversion'
clang-4.0: error: no input files
configure:3211: $? = 1
configure:3231: checking whether the C compiler works
configure:3253: /Users/lester/sire.app/bin/clang -DHAVE_STDINT_H conftest.c >&5
configure:3257: $? = 0
configure:3305: result: yes
configure:3308: checking for C compiler default output file name
configure:3310: result: a.out
configure:3316: checking for suffix of executables
configure:3323: /Users/lester/sire.app/bin/clang -o conftest -DHAVE_STDINT_H conftest.c >&5
configure:3327: $? = 0
configure:3349: result:
configure:3371: checking whether we are cross compiling
configure:3379: /Users/lester/sire.app/bin/clang -o conftest -DHAVE_STDINT_H conftest.c >&5
conftest.c:11:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
configure:3383: $? = 1
configure:3390: ./conftest
/Users/lester/Code/Sire/build/corelib/build_bundled/libcpuid-0.4.1/configure: line 3392: ./conftest: No such file or directory
configure:3394: $? = 127
configure:3401: error: in `/Users/lester/Code/Sire/build/corelib/build_bundled/libcpuid-0.4.1':
configure:3403: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
Moving to the build/corelib/build_bundled/libcpuid-0.4.1
directory and manually running ./configure
followed by make
works just fine, so I assume that there's some issue with the way the build is configured in corelib/src/bundled/install_cpuid.cmake.
This is one of those annoying issues where simply re-running ./compile_sire.sh
allows the build to proceed without any further issue!
Having searched around I thought that the problem was likely a result of Apple moving the XCode development headers out of /usr/include
as of macOS 10.14. This can be fixed from the command line (albeit requiring sudo access) as described here, so we might be able to do this on the macOS VM image prior to building Sire. I had hoped that installing the one of the additional clangdev
or clang-tools
packages from conda-forge may have fixed the problem, but no luck. (This also bumps the clang version from 4 to 9, so we might not want to do this anyway.)
I wonder whether the first time round it tries to use the system headers, which don't exist in a standard path so fail, then the second time round it finds the ones installed by conda? That said, I would have thought they should have been visible at the first attempt at compiling.
I can confirm that installing the XCode command-line tools, as per the instructons here, fixed the problem. Annoyingly the command-line variant of the install failed for me, so I had to manually download the headers and run the installer. Not sure if the same problem would occur on the VM image. (I think I had an old install of the command-line tools that was causing issues.)
Adding the following line before compiling Sire in the macOS pipeline did the trick:
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /
Hopefully that's it with the Sire macOS issues for now. Now to fix the BIoSimSpace macOS Conda corruption issue. I'm keeping my fingers crossed that the updated 10.14 build will sort that...
As of March 23rd, we will need to upgrade the macOS VM image used by our Azure Pipeline to version 10.14 since this will be the oldest image that is available. I've tried doing this already, but currently the build fails. (See here for an example.)
It looks like the bundled
libcpuid
fails to compile under 10.14. I've tested reverting the image and the build works fine. Strangely I have no issues compiling Sire on a MacBook running an even newer macOS.