forked from mirrors/nixpkgs
python: don't use optimizations on Darwin
Also, don't use autoreconfHook on Darwin with Python 3. Darwin builds are still impure and fail with ld: warning: directory not found for option '-L/nix/store/6yhj9djska835wb6ylg46d2yw9dl0sjb-configd-osx-10.8.5/lib' ld: warning: directory not found for option '-L/nix/store/6yhj9djska835wb6ylg46d2yw9dl0sjb-configd-osx-10.8.5/lib' ld: warning: object file (/nix/store/0lsij4jl35bnhqhdzla8md6xiswgig5q-Libsystem-osx-10.12.6/lib/crt1.10.6.o) was built for newer OSX version (10.12) than being linked (10.6) DYLD_LIBRARY_PATH=/private/tmp/nix-build-python3-3.8.3.drv-0/Python-3.8.3 ./python.exe -E -S -m sysconfig --generate-posix-vars ;\ if test $? -ne 0 ; then \ echo "generate-posix-vars failed" ; \ rm -f ./pybuilddir.txt ; \ exit 1 ; \ fi /nix/store/dsb7d4dwxk6bzlm845z2zx6wp9a8bqc1-bash-4.4-p23/bin/bash: line 5: 72015 Killed: 9 DYLD_LIBRARY_PATH=/private/tmp/nix-build-python3-3.8.3.drv-0/Python-3.8.3 ./python.exe -E -S -m sysconfig --generate-posix-vars generate-posix-vars failed make: *** [Makefile:592: pybuilddir.txt] Error 1
This commit is contained in:
parent
febc27b59a
commit
4087d3fe41
|
@ -23,6 +23,7 @@
|
|||
, sha256
|
||||
, passthruFun
|
||||
, static ? false
|
||||
, enableOptimizations ? (!stdenv.isDarwin)
|
||||
}:
|
||||
|
||||
assert x11Support -> tcl != null
|
||||
|
@ -138,8 +139,9 @@ let
|
|||
--replace 'os.popen(comm)' 'os.popen("${coreutils}/bin/nproc")'
|
||||
'';
|
||||
|
||||
configureFlags = [
|
||||
configureFlags = optionals enableOptimizations [
|
||||
"--enable-optimizations"
|
||||
] ++ [
|
||||
"--enable-shared"
|
||||
"--with-threads"
|
||||
"--enable-unicode=ucs${toString ucsEncoding}"
|
||||
|
|
|
@ -31,7 +31,9 @@
|
|||
, stripBytecode ? false
|
||||
, includeSiteCustomize ? true
|
||||
, static ? false
|
||||
, enableOptimizations ? true
|
||||
# Not using optimizations on Darwin
|
||||
# configure: error: llvm-profdata is required for a --enable-optimizations build but could not be found.
|
||||
, enableOptimizations ? (!stdenv.isDarwin)
|
||||
}:
|
||||
|
||||
assert x11Support -> tcl != null
|
||||
|
@ -54,8 +56,9 @@ let
|
|||
|
||||
version = with sourceVersion; "${major}.${minor}.${patch}${suffix}";
|
||||
|
||||
nativeBuildInputs = [
|
||||
nativeBuildInputs = optionals (!stdenv.isDarwin) [
|
||||
autoreconfHook
|
||||
] ++ [
|
||||
nukeReferences
|
||||
] ++ optionals (stdenv.hostPlatform != stdenv.buildPlatform) [
|
||||
buildPackages.stdenv.cc
|
||||
|
|
Loading…
Reference in a new issue