pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Py-numpy on Darwin



Py-numpy was failing with “cannot find a valid fortran version”.  I fixed that with the following addition:

< --- numpy/distutils/fcompiler/gnu.py.orig	2020-07-10 04:52:40.000000000 +0000
---
> --- numpy/distutils/fcompiler/gnu.py.orig	2021-01-04 21:16:38.000000000 +0000
12c12,22
< @@ -60,8 +60,10 @@ class GnuFCompiler(FCompiler):
---
> @@ -41,6 +41,9 @@ class GnuFCompiler(FCompiler):
>          while version_string.startswith('gfortran: warning'):
>              version_string = version_string[version_string.find('\n') + 1:]
>  
> +        # Fails on Darwin with invalid Fortran version due to leading nl
> +        version_string=version_string.lstrip()
> +
>          # Gfortran versions from after 2010 will output a simple string
>          # (usually "x.y", "x.y.z" or "x.y.z-q") for ``-dumpversion``; older
>          # gfortrans may still return long version strings (``-dumpversion`` w

Now it’s failing with a faulty library path.  Before I deep dive into the bumpy build system, thought I’d ask if anyone has seen this issue before and knows how to fix it.

Thanks,

	JB

gfortran: warning: couldn't understand version 11.2

ld: warning: directory not found for option '-L/Users/bacon/Pkgsrc/pkg/gcc8/x86_64-apple-darwin20/lib/.'
ld: library not found for -lgcc_s.10.4
collect2: error: ld returned 1 exit status
error: Command "/Users/bacon/Pkgsrc/pkgsrc/math/py-numpy/work/.cwrapper/bin/gfortran -Wall -shared -Wall -shared -undefined dynamic_lookup -m64 -L/Users/bacon/Pkgsrc/pkg/lib build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/alloc.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/arrayobject.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/arraytypes.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/array_assign_scalar.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/array_assign_array.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/arrayfunction_override.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/buffer.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/calculation.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/compiled_base.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/common.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/convert.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/convert_datatype.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/conversion_utils.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/ctors.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/datetime.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/datetime_strings.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/datetime_busday.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/datetime_busdaycal.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/descriptor.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/dragon4.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/dtype_transfer.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/einsum.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/flagsobject.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/getset.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/hashdescr.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/item_selection.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/iterators.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/lowlevel_strided_loops.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/mapping.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/methods.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/multiarraymodule.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/nditer_templ.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/nditer_api.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/nditer_constr.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/nditer_pywrap.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/number.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/refcount.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/sequence.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/shape.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/scalarapi.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/scalartypes.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/strfuncs.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/temp_elide.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/typeinfo.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/usertypes.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/multiarray/vdot.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/umath/umathmodule.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/umath/reduction.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/umath/loops.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/umath/matmul.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/umath/clip.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/umath/ufunc_object.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/umath/extobj.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/umath/scalarmath.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/umath/ufunc_type_resolution.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/umath/override.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/npymath/npy_math.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/npymath/ieee754.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/npymath/npy_math_complex.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/npymath/halffloat.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/common/array_assign.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/common/mem_overlap.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/common/npy_longdouble.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/common/ucsnarrow.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/common/ufunc_override.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/common/numpyos.o build/temp.macosx-11.2-x86_64-3.8/build/src.macosx-11.2-x86_64-3.8/numpy/core/src/common/npy_cpu_features.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/common/cblasfuncs.o build/temp.macosx-11.2-x86_64-3.8/numpy/core/src/common/python_xerbla.o build/temp.macosx-11.2-x86_64-3.8/Users/bacon/Pkgsrc/pkgsrc/math/py-numpy/work/numpy-1.19.5/numpy/_build_utils/src/apple_sgemv_fix.o -L/Users/bacon/Pkgsrc/pkg/gcc8/lib/gcc/x86_64-apple-darwin20/8.4.0 -L/Users/bacon/Pkgsrc/pkg/gcc8/lib/gcc/x86_64-apple-darwin20/8.4.0/../../.. -L/Users/bacon/Pkgsrc/pkg/gcc8/lib/gcc/x86_64-apple-darwin20/8.4.0/../../.. -L/Users/bacon/Pkgsrc/pkg/lib -Lbuild/temp.macosx-11.2-x86_64-3.8 -lnpymath -lnpysort -lgfortran -o build/lib.macosx-11.2-x86_64-3.8/numpy/core/_multiarray_umath.so -framework Accelerate -lcblas" failed with exit status 1
*** Error code 1

Stop.
bmake[1]: stopped in /Users/bacon/Pkgsrc/pkgsrc/math/py-numpy
*** Error code 1

Stop.
bmake: stopped in /Users/bacon/Pkgsrc/pkgsrc/math/py-numpy



Home | Main Index | Thread Index | Old Index