NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.02k stars 14.03k forks source link

compiler-rt-7.0.1 fails to compile on darwin #55655

Closed tobim closed 5 years ago

tobim commented 5 years ago

Issue description

Building this from a manually cloned working copy with clang_6 does not exhibit this problem, but fails later on because of an implicit dependency on CoreFoundation. I tried to modify the expression to use the clang_6 but somehow that wasn't picked up.

Steps to reproduce

Tried on rev = "b8d7c0cab5e5e5ea8002ce4ad38f336df12841fe";

Technical details

The actual output:

building '/nix/store/8g3hzi224z6rb64bhp0sa71z63wxrn5x-compiler-rt-7.0.1.drv'...
unpacking sources
unpacking source archive /nix/store/4xpwsr3z16i1q6fh7r6m70jz20i7hfw7-compiler-rt-7.0.1.src.tar.xz
source root is compiler-rt-7.0.1.src
setting SOURCE_DATE_EPOCH to timestamp 1536221973 of file compiler-rt-7.0.1.src/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
patching sources
applying patch /nix/store/3mzkrxhsy3fp1w87x23q2v00x8mgcq8x-compiler-rt-codesign.patch
patching file cmake/Modules/AddCompilerRT.cmake
Hunk #1 succeeded at 290 with fuzz 1 (offset 80 lines).
configuring
fixing cmake files...
cmake flags: -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/cv0llsnkcd0x25asf3shmvmz9fd2989r-compiler-rt-7.0.1-dev/include -DCMAKE_INSTALL_LIBDIR=/nix/store/fcf7pakjfcm62zi4b085c88kxz5w78kq-compiler-rt-7.0.1/lib -DCMAKE_INSTALL_NAME_DIR=/nix/store/fcf7pakjfcm62zi4b085c88kxz5w78kq-compiler-rt-7.0.1/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_DEPLOYMENT_TARGET= -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=last -DCMAKE_STRIP=/nix/store/d9503i6kmkxnxyx61mf0mrph4f3pziwv-cctools-binutils-darwin/bin/strip -DCMAKE_RANLIB=/nix/store/d9503i6kmkxnxyx61mf0mrph4f3pziwv-cctools-binutils-darwin/bin/ranlib -DCMAKE_AR=/nix/store/d9503i6kmkxnxyx61mf0mrph4f3pziwv-cctools-binutils-darwin/bin/ar -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX=/nix/store/fcf7pakjfcm62zi4b085c88kxz5w78kq-compiler-rt-7.0.1
-- The C compiler identification is Clang 5.0.2
-- The CXX compiler identification is Clang 5.0.2
-- The ASM compiler identification is Clang
-- Found assembler: /nix/store/pf127s1gf2bgasjxgilwh9azrsq4db8d-clang-wrapper-5.0.2/bin/clang
-- Check for working C compiler: /nix/store/pf127s1gf2bgasjxgilwh9azrsq4db8d-clang-wrapper-5.0.2/bin/clang
-- Check for working C compiler: /nix/store/pf127s1gf2bgasjxgilwh9azrsq4db8d-clang-wrapper-5.0.2/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /nix/store/pf127s1gf2bgasjxgilwh9azrsq4db8d-clang-wrapper-5.0.2/bin/clang++
-- Check for working CXX compiler: /nix/store/pf127s1gf2bgasjxgilwh9azrsq4db8d-clang-wrapper-5.0.2/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for unwind.h
-- Looking for unwind.h - found
-- Found PythonInterp: /nix/store/2w4ncc6x6hmqsyhyz8409yidnh6avjh2-python-2.7.15/bin/python2.7 (found version "2.7.15")
-- Looking for fopen in c
-- Looking for fopen in c - found
-- Looking for __gcc_personality_v0 in gcc_s
-- Looking for __gcc_personality_v0 in gcc_s - not found
-- Performing Test COMPILER_RT_HAS_NODEFAULTLIBS_FLAG
-- Performing Test COMPILER_RT_HAS_NODEFAULTLIBS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FPIC_FLAG
-- Performing Test COMPILER_RT_HAS_FPIC_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FPIE_FLAG
-- Performing Test COMPILER_RT_HAS_FPIE_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FNO_BUILTIN_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_BUILTIN_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG
-- Performing Test COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FUNWIND_TABLES_FLAG
-- Performing Test COMPILER_RT_HAS_FUNWIND_TABLES_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG
-- Performing Test COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FRTTI_FLAG
-- Performing Test COMPILER_RT_HAS_FRTTI_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FNO_RTTI_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_RTTI_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FFREESTANDING_FLAG
-- Performing Test COMPILER_RT_HAS_FFREESTANDING_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_STD_CXX11_FLAG
-- Performing Test COMPILER_RT_HAS_STD_CXX11_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC
-- Performing Test COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC - Success
-- Performing Test COMPILER_RT_HAS_FNO_LTO_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_LTO_FLAG - Success
-- Performing Test COMPILER_RT_HAS_MSSE3_FLAG
-- Performing Test COMPILER_RT_HAS_MSSE3_FLAG - Success
-- Performing Test COMPILER_RT_HAS_MSSE4_2_FLAG
-- Performing Test COMPILER_RT_HAS_MSSE4_2_FLAG - Success
-- Performing Test COMPILER_RT_HAS_SYSROOT_FLAG
-- Performing Test COMPILER_RT_HAS_SYSROOT_FLAG - Success
-- Performing Test COMPILER_RT_HAS_MCRC_FLAG
-- Performing Test COMPILER_RT_HAS_MCRC_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test COMPILER_RT_HAS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test COMPILER_RT_HAS_GR_FLAG
-- Performing Test COMPILER_RT_HAS_GR_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_GS_FLAG
-- Performing Test COMPILER_RT_HAS_GS_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_MT_FLAG
-- Performing Test COMPILER_RT_HAS_MT_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_Oy_FLAG
-- Performing Test COMPILER_RT_HAS_Oy_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG
-- Performing Test COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG - Success
-- Performing Test COMPILER_RT_HAS_G_FLAG
-- Performing Test COMPILER_RT_HAS_G_FLAG - Success
-- Performing Test COMPILER_RT_HAS_Zi_FLAG
-- Performing Test COMPILER_RT_HAS_Zi_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WALL_FLAG
-- Performing Test COMPILER_RT_HAS_WALL_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WERROR_FLAG
-- Performing Test COMPILER_RT_HAS_WERROR_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG
-- Performing Test COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG
-- Performing Test COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WC99_EXTENSIONS_FLAG
-- Performing Test COMPILER_RT_HAS_WC99_EXTENSIONS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WGNU_FLAG
-- Performing Test COMPILER_RT_HAS_WGNU_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WNON_VIRTUAL_DTOR_FLAG
-- Performing Test COMPILER_RT_HAS_WNON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG
-- Performing Test COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG
-- Performing Test COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG
-- Performing Test COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG - Success
-- Performing Test COMPILER_RT_HAS_W4_FLAG
-- Performing Test COMPILER_RT_HAS_W4_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WX_FLAG
-- Performing Test COMPILER_RT_HAS_WX_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4146_FLAG
-- Performing Test COMPILER_RT_HAS_WD4146_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4291_FLAG
-- Performing Test COMPILER_RT_HAS_WD4291_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4221_FLAG
-- Performing Test COMPILER_RT_HAS_WD4221_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4391_FLAG
-- Performing Test COMPILER_RT_HAS_WD4391_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4722_FLAG
-- Performing Test COMPILER_RT_HAS_WD4722_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4800_FLAG
-- Performing Test COMPILER_RT_HAS_WD4800_FLAG - Failed
-- Looking for __func__
-- Looking for __func__ - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for shm_open in rt
-- Looking for shm_open in rt - not found
-- Looking for pow in m
-- Looking for pow in m - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for __cxa_throw in c++
-- Looking for __cxa_throw in c++ - found
-- Looking for __cxa_throw in stdc++
-- Looking for __cxa_throw in stdc++ - not found
ERRORCould not detect OS X Sysroot. Either install Xcode or the Apple Command Line Tools
-- Performing Test COMPILER_RT_HAS_APP_EXTENSION
-- Performing Test COMPILER_RT_HAS_APP_EXTENSION - Success
-- Got ld supported ARCHES: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
-- Toolchain supported arches: armv6;armv7;armv7s;arm64;i386;x86_64;x86_64h;armv6m;armv7k;armv7m;armv7em;(tvOS)
-- Finding valid architectures for osx...
-- OSX supported arches: x86_64;x86_64h
-- Compiler-RT supported architectures: x86_64;x86_64h
-- Looking for rpc/xdr.h
CMake Warning (dev) at /nix/store/sryf67n17d1ja34gvraixfynb63zvn6h-cmake-3.12.1/share/cmake-3.12/Modules/CheckIncludeFile.cmake:70 (message):
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  CMAKE_REQUIRED_LIBRARIES is set to:

    c

  For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
  cmake/Modules/CompilerRTUtils.cmake:62 (check_include_file)
  lib/sanitizer_common/CMakeLists.txt:193 (append_have_file_definition)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Looking for rpc/xdr.h - not found
-- Looking for tirpc/rpc/xdr.h
-- Looking for tirpc/rpc/xdr.h - not found
-- Performing Test COMPILER_RT_HAS_STD_C11_FLAG
-- Performing Test COMPILER_RT_HAS_STD_C11_FLAG - Success
-- Performing Test COMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG
-- Performing Test COMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG - Success
-- Performing Test COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG
-- Performing Test COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FREESTANDING_FLAG
-- Performing Test COMPILER_RT_HAS_FREESTANDING_FLAG - Success
-- Performing Test COMPILER_RT_HAS_XRAY_COMPILER_FLAG
-- Performing Test COMPILER_RT_HAS_XRAY_COMPILER_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_ATOMIC_KEYWORD
-- Performing Test COMPILER_RT_HAS_ATOMIC_KEYWORD - Success
-- OSX supported arches: x86_64;x86_64h
-- OSX 10.4 supported builtin arches: i386;x86_64
-- Builtin supported architectures: x86_64;x86_64h
-- Performing Test COMPILER_RT_TARGET_HAS_ATOMICS
-- Performing Test COMPILER_RT_TARGET_HAS_ATOMICS - Success
-- Performing Test COMPILER_RT_TARGET_HAS_FCNTL_LCK
-- Performing Test COMPILER_RT_TARGET_HAS_FCNTL_LCK - Success
-- Performing Test COMPILER_RT_TARGET_HAS_UNAME
-- Performing Test COMPILER_RT_TARGET_HAS_UNAME - Success
-- Performing Test HAS_THREAD_LOCAL
-- Performing Test HAS_THREAD_LOCAL - Success
-- Configuring done
CMake Warning (dev):
  Policy CMP0068 is not set: RPATH settings on macOS do not affect
  install_name.  Run "cmake --help-policy CMP0068" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, the install_name fields for
  the following targets are still affected by RPATH settings:

   clang_rt.asan_osx_dynamic
   clang_rt.lsan_osx_dynamic
   clang_rt.stats_osx_dynamic
   clang_rt.ubsan_minimal_osx_dynamic
   clang_rt.ubsan_osx_dynamic

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_LIBDIR

-- Build files have been written to: /tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/build
building
build flags: -j1 -l1 SHELL=/nix/store/9b5p08gmyh0p3vxy4zgnwb23k2d3k8fn-bash-4.4-p23/bin/bash
Scanning dependencies of target RTXrayFDR.osx
[  0%] Building CXX object lib/xray/CMakeFiles/RTXrayFDR.osx.dir/xray_fdr_flags.cc.o
[  0%] Building CXX object lib/xray/CMakeFiles/RTXrayFDR.osx.dir/xray_buffer_queue.cc.o
[  1%] Building CXX object lib/xray/CMakeFiles/RTXrayFDR.osx.dir/xray_fdr_logging.cc.o
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:199:13: error: variable has incomplete type 'void'
static void setupNewBuffer(int (*wall_clock_reader)(
            ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:199:34: error: use of undeclared identifier 'wall_clock_reader'
static void setupNewBuffer(int (*wall_clock_reader)(
                                 ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:200:5: error: use of undeclared identifier 'clockid_t'
    clockid_t, struct timespec *)) XRAY_NEVER_INSTRUMENT {
    ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:200:16: error: expected expression
    clockid_t, struct timespec *)) XRAY_NEVER_INSTRUMENT {
               ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:200:35: error: expected ';' after top level declarator
    clockid_t, struct timespec *)) XRAY_NEVER_INSTRUMENT {
                                  ^
                                  ;
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:351:3: error: use of undeclared identifier 'decrementExtents'
  decrementExtents(FunctionRecSize);
  ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:406:5: error: use of undeclared identifier 'decrementExtents'
    decrementExtents(2 * FunctionRecSize);
    ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:422:52: error: C++ requires a type specifier for all declarations
                          int (*wall_clock_reader)(clockid_t,
                                                   ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:439:5: error: use of undeclared identifier 'writeNewCPUIdMetadata'
    writeNewCPUIdMetadata(CPU, TSC);
    ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:446:51: error: C++ requires a type specifier for all declarations
                         int (*wall_clock_reader)(clockid_t, struct timespec *))
                                                  ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:486:5: error: use of undeclared identifier 'writeNewCPUIdMetadata'
    writeNewCPUIdMetadata(CPU, TSC);
    ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:493:5: error: use of undeclared identifier 'writeNewCPUIdMetadata'
    writeNewCPUIdMetadata(CPU, TSC);
    ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:521:5: error: use of undeclared identifier 'writeNewCPUIdMetadata'
    writeNewCPUIdMetadata(CPU, TSC);
    ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:531:3: error: use of undeclared identifier 'writeTSCWrapMetadata'
  writeTSCWrapMetadata(TSC);
  ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:556:58: error: C++ requires a type specifier for all declarations
                                int (*wall_clock_reader)(clockid_t,
                                                         ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:660:3: error: use of undeclared identifier 'writeFunctionRecord'
  writeFunctionRecord(FuncId, RecordTSCDelta, Entry);
  ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:662:5: error: use of undeclared identifier 'writeCallArgumentMetadata'
    writeCallArgumentMetadata(Arg1);
    ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:945:32: error: use of undeclared identifier 'CLOCK_REALTIME'
    int result = clock_gettime(CLOCK_REALTIME, &TS);
                               ^
/tmp/nix-build-compiler-rt-7.0.1.drv-0/compiler-rt-7.0.1.src/lib/xray/xray_fdr_logging.cc:959:57: error: use of undeclared identifier 'clock_gettime'
  processFunctionHook(FuncId, Entry, TC.TSC, TC.CPU, 0, clock_gettime);
                                                        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [lib/xray/CMakeFiles/RTXrayFDR.osx.dir/build.make:89: lib/xray/CMakeFiles/RTXrayFDR.osx.dir/xray_fdr_logging.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4159: lib/xray/CMakeFiles/RTXrayFDR.osx.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
builder for '/nix/store/8g3hzi224z6rb64bhp0sa71z63wxrn5x-compiler-rt-7.0.1.drv' failed with exit code 2
cannot build derivation '/nix/store/scfqdvbcqajp3qvi11clqwwxq141nkba-clang-wrapper-7.0.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/p0b53c26vc283alk4dl6w5cc62dkhz3c-stdenv-darwin.drv': 1 dependencies couldn't be built
error: build of '/nix/store/9bbw32yfmzi5qpwn0clhf7xhys3ylnzc-gbenchmark-1.4.1.drv', '/nix/store/p0b53c26vc283alk4dl6w5cc62dkhz3c-stdenv-darwin.drv' failed

Please run nix-shell -p nix-info --run "nix-info -m" and paste the results.

 - system: `"x86_64-darwin"`
 - host os: `Darwin 18.2.0, macOS 10.14.2`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.1.2`
 - channels(tobim): `""`
 - channels(root): `"nixpkgs-19.03pre167327.11cf7d6e1ff"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

ignore the outdated channel, this from a shell.nix with:

  nixpkgs = builtins.fetchGit {
    url = https://github.com/NixOS/nixpkgs;
    rev = "b8d7c0cab5e5e5ea8002ce4ad38f336df12841fe";
  };
matthewbauer commented 5 years ago

The clock_gettime should be fixed once we bump the minimum macOS version to 10.12 which is the first libSystem to have that symbol. Patching is a possibility but I'm not thinking this is critical enough for that.

tobim commented 5 years ago

Is there an eta on that? Would be nice to have a working clang_7 on 19.03.

matthewbauer commented 5 years ago

It's not a priority for me but it should be very similar to this patch:

https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/libraries/mesa/darwin-clock-gettime.patch

tobim commented 5 years ago

I opened https://github.com/NixOS/nixpkgs/pull/55698.