Opened 2 years ago

Last modified 2 years ago

#57078 assigned defect

py27-numpy fails to compile with standard compiler on 10.5 due to: immintrin.h: No such file or directory

Reported by: rmottola (Riccardo) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version:
Keywords: leopard Cc: kencu (Ken)
Port: py-numpy

Description (last modified by kencu (Ken))

Package py27-numpy (1.15.1) fails to compile on Leopard 10.5 with the error below. I suppose not finding immintrin.h causes the issue.

C compiler: /usr/bin/gcc-4.2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386

compile options: '-DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/umath -Inumpy/core/include -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/private -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/npymath -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/private -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/npymath -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/private -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/npymath -c'
gcc-4.2: build/src.macosx-10.5-i386-2.7/numpy/core/src/umath/loops.c
In file included from numpy/core/src/umath/loops.c.src:49:
numpy/core/src/umath/simd.inc.src:26:23: warning: immintrin.h: No such file or directory
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:148157:non-relocatable subtraction expression, "LC33" minus "L00000000088$pb"
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:148157:symbol: "L00000000088$pb" can't be undefined in a subtraction expression
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:147636:non-relocatable subtraction expression, "LC33" minus "L00000000087$pb"
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:147636:symbol: "L00000000087$pb" can't be undefined in a subtraction expression
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:unknown:Undefined local symbol L00000000087$pb
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:unknown:Undefined local symbol L00000000088$pb
In file included from numpy/core/src/umath/loops.c.src:49:
numpy/core/src/umath/simd.inc.src:26:23: warning: immintrin.h: No such file or directory
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:148157:non-relocatable subtraction expression, "LC33" minus "L00000000088$pb"
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:148157:symbol: "L00000000088$pb" can't be undefined in a subtraction expression
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:147636:non-relocatable subtraction expression, "LC33" minus "L00000000087$pb"
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:147636:symbol: "L00000000087$pb" can't be undefined in a subtraction expression
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:unknown:Undefined local symbol L00000000087$pb
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/.tmp/ccA30IAK.s:unknown:Undefined local symbol L00000000088$pb
error: Command "/usr/bin/gcc-4.2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/umath -Inumpy/core/include -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/include/numpy -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -I/opt/local/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/private -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/npymath -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/private -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/npymath -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/private -Ibuild/src.macosx-10.5-i386-2.7/numpy/core/src/npymath -c build/src.macosx-10.5-i386-2.7/numpy/core/src/umath/loops.c -o build/temp.macosx-10.5-i386-2.7/build/src.macosx-10.5-i386-2.7/numpy/core/src/umath/loops.o -MMD -MF build/temp.macosx-10.5-i386-2.7/build/src.macosx-10.5-i386-2.7/numpy/core/src/umath/loops.o.d" failed with exit status 1
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py27-numpy/work/numpy-1.15.1" && /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 setup.py --no-user-cfg build 
Exit code: 1
Error: Failed to build py27-numpy: command execution failed

When built with clang 3.9 from macports, that is,

port -v upgrade py27-numpy configure.compiler=macports-clang-3.9

compiles and installs fine.

Change History (3)

comment:1 Changed 2 years ago by kencu (Ken)

Description: modified (diff)
Keywords: leopard added; py27 numpy leopart compiler removed
Owner: set to michaelld
Port: py-numpy added; py27-numpy removed
Status: newassigned
Summary: py27-numpy fails to compile with standard compiler on 10.5py27-numpy fails to compile with standard compiler on 10.5 due to: immintrin.h: No such file or directory

comment:2 Changed 2 years ago by kencu (Ken)

On Leopard PPC it builds fine with /usr/bin/gcc42, calling in -falitvec and doing what appears to be all the right things:

$ port -v installed | grep numpy
  py27-numpy @1.15.1_0+gfortran (active) platform='darwin 9' archs='ppc' date='2018-08-24T16:41:42-0700'

The file immintrin.h looks to run some Intel-specific optimizations. I have it on all versions of clang back to 1.7, and on gcc versions gcc48 and newer.

So tweaking this is possible. I'll see if I can sort something out and put it in "LeopardPorts" at least.

comment:3 Changed 2 years ago by kencu (Ken)

Cc: kencu added
Note: See TracTickets for help on using tickets.