Skip to content

Commit

Permalink
tidedb: fix libcxx builds
Browse files Browse the repository at this point in the history
libcxx (as of llvm-19) does not yet support `stop_token` and `jthread`
without the -fexperimental-library flag. Tidedb adds its own
implementations in the std namespace which conflict with libcxx.  This
test can be re-enabled once libcxx supports stop_token and jthread.

https://hydra.nixos.org/build/281874632
https://cache.nixos.org/log/60fzb06ivb7cf4bx4f3varzib1wdyy5z-tiledb-2.18.2.drv
  • Loading branch information
paparodeo committed Dec 22, 2024
1 parent 2ab355a commit b2eae10
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions pkgs/by-name/ti/tiledb/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,24 @@ stdenv.mkDerivation rec {
./FindMagic_EP.cmake.patch
];

postPatch = ''
# copy pre-fetched external project to directory where it is expected to be
mkdir -p build/externals/src
cp -a ${ep-file-windows} build/externals/src/ep_magic
chmod -R u+w build/externals/src/ep_magic
# add openssl on path
sed -i '49i list(APPEND OPENSSL_PATHS "${openssl.dev}" "${openssl.out}")' \
cmake/Modules/FindOpenSSL_EP.cmake
'';
postPatch =
''
# copy pre-fetched external project to directory where it is expected to be
mkdir -p build/externals/src
cp -a ${ep-file-windows} build/externals/src/ep_magic
chmod -R u+w build/externals/src/ep_magic
# add openssl on path
sed -i '49i list(APPEND OPENSSL_PATHS "${openssl.dev}" "${openssl.out}")' \
cmake/Modules/FindOpenSSL_EP.cmake
''
# libcxx (as of llvm-19) does not yet support `stop_token` and `jthread`
# without the -fexperimental-library flag. Tidedb adds its own
# implementations in the std namespace which conflict with libcxx. This
# test can be re-enabled once libcxx supports stop_token and jthread.
+ lib.optionalString (stdenv.cc.libcxx != null) ''
truncate -s0 tiledb/stdx/test/CMakeLists.txt
'';

# upstream will hopefully fix this in some newer release
env.CXXFLAGS = "-include random";
Expand Down

0 comments on commit b2eae10

Please sign in to comment.