Nixpkgs: Clang 8 fails to build on MacOS Mojave

Created on 10 Apr 2019  Â·  21Comments  Â·  Source: NixOS/nixpkgs

Issue description

Building clang_8 results in:

/private/var/folders/f6/g6dgxl4j5_g8p5rq2t1plqnw0000gn/T/nix-build-clang-8.0.0.drv-0/clang/tools/extra/clangd/xpc/../xpc/Conversion.h:14:10: fatal error: 'xpc/xpc.h' file not found

include

     ^~~~~~~~~~~

1 error generated.

Steps to reproduce

  1. run: nix-env -iA nixpkgs.clang_8
  2. wait until approximately 88%

Technical details

  • system: "x86_64-darwin"
  • host os: Darwin 18.5.0, macOS 10.14.4
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 2.2.1
  • channels(sheelpatel): "nixpkgs-19.09pre174594.0c0954781e2"
  • nixpkgs: /Users/sheelpatel/.nix-defexpr/channels/nixpkgs
darwin

All 21 comments

It seems this xpc.h file is located in the macOS sdk. The derivation of which is created here: https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/apple-sdk/default.nix

It looks like the derivation depended on is also in the linked file: apple-lib-xpc

Running into the same issue. Here's my diagnostic output:

  • system: "x86_64-darwin"
  • host os: Darwin 18.5.0, macOS 10.14.4
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 2.2.1
  • channels: "nixpkgs-19.09pre173720.d73f16d6767"
  • nixpkgs: /Users/e/.nix-defexpr/channels/nixpkgs

I tried working around it by not building the broken target. Here's a post I made on discourse about it.

Looks like that linked apple-sdk package is the macOS 10.10 SDK? That's rather old, it should be updated to a more recent SDK. That said, it looks like there's XPC APIs dating back to macOS 10.7, so maybe header paths changed?

On my system the xpc header is now at:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/xpc/xpc.h

Likewise for mine: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/xpc/xpc.h.

In the darwin.apple_sdk derivation the path is /nix/store/hwzi8c5fcvrkcq6h9hinlfn0b43lzimd-MacOS_SDK-10.10-dev/include/xpc/xpc.h. As long as /nix/store/hwzi8c5fcvrkcq6h9hinlfn0b43lzimd-MacOS_SDK-10.10-dev/include is being set as an include path for clang then the #include <xpc/xpc.h> should work.

FWIW when I try on my machine I get a completely different error right off the bat at 0%:

In file included from /private/var/folders/cs/l6c6g06x0974_0w5pdg8dps80000gn/T/nix-build-compiler-rt-8.0.0.drv-0/compiler-rt-8.0.0.src/lib/xray/xray_fdr_logging.cc:35:
/private/var/folders/cs/l6c6g06x0974_0w5pdg8dps80000gn/T/nix-build-compiler-rt-8.0.0.drv-0/compiler-rt-8.0.0.src/lib/xray/xray_fdr_controller.h:30:26: error: C++ requires a type specifier for all declarations
  int (*WallClockReader)(clockid_t, struct timespec *) = 0;
                         ^
/private/var/folders/cs/l6c6g06x0974_0w5pdg8dps80000gn/T/nix-build-compiler-rt-8.0.0.drv-0/compiler-rt-8.0.0.src/lib/xray/xray_fdr_controller.h:81:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
    WallClockReader(CLOCK_MONOTONIC, &TS);
                    ^
/private/var/folders/cs/l6c6g06x0974_0w5pdg8dps80000gn/T/nix-build-compiler-rt-8.0.0.drv-0/compiler-rt-8.0.0.src/lib/xray/xray_fdr_controller.h:242:9: error: cannot initialize a member subobject of type 'int (*)(int, struct timespec *)' with an lvalue of type 'int (*)(clockid_t, timespec *)': type mismatch at 1st parameter ('int' vs 'clockid_t')
        WallClockReader(R),
        ^               ~
/private/var/folders/cs/l6c6g06x0974_0w5pdg8dps80000gn/T/nix-build-compiler-rt-8.0.0.drv-0/compiler-rt-8.0.0.src/lib/xray/xray_fdr_logging.cc:510:9: note: in instantiation of function template specialization '__xray::FDRController<5>::FDRController<int (*)(clockid_t, timespec *)>' requested here
        FDRController<>(TLD.BQ, TLD.Buffer, *TLD.Writer, clock_gettime,
        ^
3 errors generated.
make[2]: *** [lib/xray/CMakeFiles/RTXrayFDR.osx.dir/build.make:76: lib/xray/CMakeFiles/RTXrayFDR.osx.dir/xray_fdr_logging.cc.o] Error 1

This is true both with a fairly recent nixpkgs-unstable channel, as well as yesterday's nixpkgs master.

 - system: `"x86_64-darwin"`
 - host os: `Darwin 18.5.0, macOS 10.14.4`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.2`
 - channels(kevin): `"nixpkgs-19.09pre174594.0c0954781e2"`
 - nixpkgs: `/Users/kevin/.nix-defexpr/channels/nixpkgs`

@lilyball, @ekmecic and I are both on nix-env (Nix) 2.2.1, maybe this accounts for the differences we see?

@sheeldotme Unless Nix 2.2.1 changes the include paths that clang uses, I'm not sure how that would be relevant. Not sure why you're on 2.2.1 and I'm only on 2.2 though; I only see Nix-2.2 in the latest nixpkgs master.

@lilyball my nix install is fresh from the website. They mention 2.2.1 as the latest version there. I'll take a look at the clang include paths when I have access to my machine later today.

Interesting, I wonder why it's not available in nixpkgs?

As for the error I get, it looks like xray_fdr_logging.h is trying to use a type that hasn't been defined yet, and then xray_fdr_logging.cc has a block that looks like

#if __MACH__
#include <mach/clock.h>
#include <mach/mach.h>
enum clockid_t {
    CLOCK_MONOTONIC = REALTIME_CLOCK,
    CLOCK_REALTIME = REALTIME_CLOCK
};

int clock_gettime(clockid_t clock_id, struct timespec *ts) {
    …
}
#endif

Given that this is defined in the .cc for #if __MACH__ that suggests this expected to be defined already on non-Darwin platforms, and therefore not expected to be defined on Darwin, meaning xray_fdr_logging.h should fail to compile always. Which means I have no idea why you're not getting this same error.

@lilyball I can can reproduce your errors when I run nix-env -i nixpkgs.llvmPackages_8.compiler-rt.
If I run nix-env -i nixpkgs.llvmPackages_8.clang I don't get those particular errors..

I was just using nix-env -iA nixpkgs.clang_8. Using nix-env -i nixpkgs.llvmPackages_8.clang still gives me the same errors though.

Now I'm wondering if somehow you have a substitute available for compiler-rt that isn't available for me, though I can't think of why that would be.

Would that reflect in different hashes somewhere we could check for?

I think substitutes have the same hash, but if you had a substitute available then requesting installation of compiler-rt directly should still get you the substitute (unless the attribute for compiler-rt you listed is not the same as what clang_8 uses). But I don't know enough about Nix to talk about this definitively.

I'm in the same boat! @matthewbauer is there something we can do to help you resolve this?

Interesting, on a different macOS machine I get the same error as @lilyball.

Machine info:

  • system: "x86_64-darwin"
  • host os: Darwin 18.5.0, macOS 10.14.4
  • multi-user?: no
  • sandbox: no
  • version: nix-env (Nix) 2.2.1
  • channels: "nixpkgs-19.09pre174594.0c0954781e2"
  • nixpkgs: /Users/e/.nix-defexpr/channels/nixpkgs

stdout:

$ nix-shell --pure -p clang_8 llvm_8
these derivations will be built:
  /nix/store/9nhiwncims6480s3lmj21brgvmkk9wqv-clang-8.0.0.drv
  /nix/store/c57xrn7z8841ksklws85vs5sys584933-compiler-rt-8.0.0.drv
  /nix/store/azbvhri55h3zzj60cn9l55xh6nq9mchg-clang-wrapper-8.0.0.drv
these paths will be fetched (0.07 MiB download, 0.43 MiB unpacked):
  /nix/store/3yywyvrd98n2npni5qllkllqdarg8f47-libxml2-2.9.9-dev
building '/nix/store/c57xrn7z8841ksklws85vs5sys584933-compiler-rt-8.0.0.drv'...
unpacking sources
unpacking source archive /nix/store/53dsnawnl9m1bghgax6v9zgaiq9m3225-compiler-rt-8.0.0.src.tar.xz
source root is compiler-rt-8.0.0.src
setting SOURCE_DATE_EPOCH to timestamp 1550667659 of file compiler-rt-8.0.0.src/test/msan/Linux/name_to_handle_at.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).
applying patch /nix/store/zky9bv0gxz6w9v9nfz1z9r9svfr6akns-compiler-rt-clock_gettime.patch
patching file lib/xray/xray_basic_logging.cc
Hunk #1 succeeded at 38 with fuzz 1 (offset 2 lines).
patching file lib/xray/xray_fdr_logging.cc
Hunk #1 succeeded at 40 with fuzz 1 (offset 2 lines).
configuring
fixing cmake files...
cmake flags: -DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON -DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_SKIP_BUILD_RPATH=ON -DCMAKE_INSTALL_INCLUDEDIR=/nix/store/vx1n7sp5mmwrj9mm2jk3c0s4ryydpvvg-compiler-rt-8.0.0-dev/include -DCMAKE_INSTALL_LIBDIR=/nix/store/hk367qhb1whzjvny1fs39n8kqsyr9fgs-compiler-rt-8.0.0/lib -DCMAKE_INSTALL_NAME_DIR=/nix/store/hk367qhb1whzjvny1fs39n8kqsyr9fgs-compiler-rt-8.0.0/lib -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_OSX_DEPLOYMENT_TARGET= -DCMAKE_OSX_SYSROOT= -DCMAKE_FIND_FRAMEWORK=last -DCMAKE_STRIP=/nix/store/3ibh116gnggzgsvrq8vvalmqyipk8cy9-cctools-binutils-darwin/bin/strip -DCMAKE_RANLIB=/nix/store/3ibh116gnggzgsvrq8vvalmqyipk8cy9-cctools-binutils-darwin/bin/ranlib -DCMAKE_AR=/nix/store/3ibh116gnggzgsvrq8vvalmqyipk8cy9-cctools-binutils-darwin/bin/ar -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_INSTALL_PREFIX=/nix/store/hk367qhb1whzjvny1fs39n8kqsyr9fgs-compiler-rt-8.0.0 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON -DCMAKE_C_COMPILER_TARGET=x86_64-apple-darwin -DCMAKE_ASM_COMPILER_TARGET=x86_64-apple-darwin 
-- 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/c64nivj8qwfx6cy5x6a8gbh6nx9m7vpk-clang-wrapper-5.0.2/bin/clang
-- Check for working C compiler: /nix/store/c64nivj8qwfx6cy5x6a8gbh6nx9m7vpk-clang-wrapper-5.0.2/bin/clang
-- Check for working C compiler: /nix/store/c64nivj8qwfx6cy5x6a8gbh6nx9m7vpk-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/c64nivj8qwfx6cy5x6a8gbh6nx9m7vpk-clang-wrapper-5.0.2/bin/clang++
-- Check for working CXX compiler: /nix/store/c64nivj8qwfx6cy5x6a8gbh6nx9m7vpk-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
-- Looking for rpc/xdr.h
-- Looking for rpc/xdr.h - not found
-- Found PythonInterp: /nix/store/mmrhgalrfd51ib2w6rb0nyb9y00vmgvx-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_FFREESTANDING_FLAG
-- Performing Test COMPILER_RT_HAS_FFREESTANDING_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_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 backtrace in execinfo
-- Looking for backtrace in execinfo - not found
-- Looking for setupterm in terminfo
-- Looking for setupterm in terminfo - not found
-- Looking for setupterm in tinfo
-- Looking for setupterm in tinfo - 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
-- 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
-- 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_EXPORT_NO_PACKAGE_REGISTRY
    CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY
    CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY
    CMAKE_INSTALL_INCLUDEDIR
    CMAKE_INSTALL_LIBDIR


-- Build files have been written to: /private/var/folders/wc/ppwt2bgx16g_rph522ny_klm0000gn/T/nix-build-compiler-rt-8.0.0.drv-0/compiler-rt-8.0.0.src/build
building
build flags: -j4 -l4 SHELL=/nix/store/06z61jbgs0vkw4i9cqqf9yl7zsfkkhw2-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_fdr_logging.cc.o
In file included from /private/var/folders/wc/ppwt2bgx16g_rph522ny_klm0000gn/T/nix-build-compiler-rt-8.0.0.drv-0/compiler-rt-8.0.0.src/lib/xray/xray_fdr_logging.cc:35:
/private/var/folders/wc/ppwt2bgx16g_rph522ny_klm0000gn/T/nix-build-compiler-rt-8.0.0.drv-0/compiler-rt-8.0.0.src/lib/xray/xray_fdr_controller.h:30:26: error: C++ requires a type specifier for all declarations
  int (*WallClockReader)(clockid_t, struct timespec *) = 0;
                         ^
/private/var/folders/wc/ppwt2bgx16g_rph522ny_klm0000gn/T/nix-build-compiler-rt-8.0.0.drv-0/compiler-rt-8.0.0.src/lib/xray/xray_fdr_controller.h:81:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
    WallClockReader(CLOCK_MONOTONIC, &TS);
                    ^
/private/var/folders/wc/ppwt2bgx16g_rph522ny_klm0000gn/T/nix-build-compiler-rt-8.0.0.drv-0/compiler-rt-8.0.0.src/lib/xray/xray_fdr_controller.h:242:9: error: cannot initialize a member subobject of type 'int (*)(int, struct timespec *)' with an lvalue of type 'int (*)(clockid_t, timespec *)': type mismatch at 1st parameter ('int' vs 'clockid_t')
        WallClockReader(R),
        ^               ~
/private/var/folders/wc/ppwt2bgx16g_rph522ny_klm0000gn/T/nix-build-compiler-rt-8.0.0.drv-0/compiler-rt-8.0.0.src/lib/xray/xray_fdr_logging.cc:510:9: note: in instantiation of function template specialization '__xray::FDRController<5>::FDRController<int (*)(clockid_t, timespec *)>' requested here
        FDRController<>(TLD.BQ, TLD.Buffer, *TLD.Writer, clock_gettime,
        ^
3 errors generated.
make[2]: *** [lib/xray/CMakeFiles/RTXrayFDR.osx.dir/build.make:76: lib/xray/CMakeFiles/RTXrayFDR.osx.dir/xray_fdr_logging.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:3909: lib/xray/CMakeFiles/RTXrayFDR.osx.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
builder for '/nix/store/c57xrn7z8841ksklws85vs5sys584933-compiler-rt-8.0.0.drv' failed with exit code 2
cannot build derivation '/nix/store/azbvhri55h3zzj60cn9l55xh6nq9mchg-clang-wrapper-8.0.0.drv': 1 dependencies couldn't be built
error: build of '/nix/store/azbvhri55h3zzj60cn9l55xh6nq9mchg-clang-wrapper-8.0.0.drv' failed

Yeah compiler-rt is broken too. That will hopefully be addressed in https://github.com/NixOS/nixpkgs/pull/56744.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  Â·  3Comments

vaibhavsagar picture vaibhavsagar  Â·  3Comments

sid-kap picture sid-kap  Â·  3Comments

matthiasbeyer picture matthiasbeyer  Â·  3Comments

edolstra picture edolstra  Â·  3Comments