python3Packages.scipy: fix build on aarch64-darwin

by disabling stack-protector

essentially the same fix as we used for openmpi in
https://github.com/NixOS/nixpkgs/pull/128606
launchpad/nixpkgs/master
Pavol Rusnak 3 years ago committed by Frederik Rietdijk
parent 5f68a74569
commit f97fb96ea0
  1. 24
      pkgs/development/python-modules/scipy/default.nix

@ -1,4 +1,15 @@
{lib, fetchPypi, python, buildPythonPackage, gfortran, nose, pytest, pytest-xdist, numpy, pybind11 }:
{ lib
, stdenv
, fetchPypi
, python
, buildPythonPackage
, gfortran
, nose
, pytest
, pytest-xdist
, numpy
, pybind11
}:
buildPythonPackage rec {
pname = "scipy";
@ -30,6 +41,17 @@ buildPythonPackage rec {
ln -s ${numpy.cfg} site.cfg
'';
# disable stackprotector on aarch64-darwin for now
#
# build error:
#
# /private/tmp/nix-build-python3.9-scipy-1.6.3.drv-0/ccDEsw5U.s:109:15: error: index must be an integer in range [-256, 255].
#
# ldr x0, [x0, ___stack_chk_guard];momd
#
hardeningDisable = lib.optionals (stdenv.isAarch64 && stdenv.isDarwin) [ "stackprotector" ];
checkPhase = ''
runHook preCheck
pushd dist

Loading…
Cancel
Save