Opened 3 years ago

Closed 3 years ago

#64019 closed defect (fixed)

py38-numpy @1.21.4 cannot be installed on PPC Mac OS X 10.4.11, Tiger, because: "unknown architecture"

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: tiger Cc: mascguy (Christopher Nielsen), evanmiller (Evan Miller)
Port: py-numpy

Description

compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/common -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/npymath -c'
extra options: '-march=native'
CCompilerOpt.dist_test[581] : CCompilerOpt._dist_test_spawn[716] : Command (/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/compwrap/cc/opt/local/bin/gcc-mp-7 -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/ -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/common -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/npymath -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/numpy-1.21.4/numpy/distutils/checks/test_flags.c -o /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/.tmp/tmpug5tjgld/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/numpy-1.21.4/numpy/distutils/checks/test_flags.o -MMD -MF /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/.tmp/tmpug5tjgld/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/numpy-1.21.4/numpy/distutils/checks/test_flags.o.d -march=native) failed with exit status 1 output -> 
gcc-mp-7: error: unrecognized command line option '-march=native'; did you mean '-mcpu=native'?

CCompilerOpt.cc_test_flags[1017] : testing failed
CCompilerOpt.cc_test_flags[1013] : testing flags (-O3)
C compiler: /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/compwrap/cc/opt/local/bin/gcc-mp-7 -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/

compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/common -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/npymath -c'
extra options: '-O3'
CCompilerOpt.cc_test_flags[1013] : testing flags (-Werror)
C compiler: /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/compwrap/cc/opt/local/bin/gcc-mp-7 -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/

compile options: '-Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/common -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/npymath -c'
extra options: '-Werror'
CCompilerOpt.__init__[1701] : check requested baseline
CCompilerOpt.__init__[1710] : check requested dispatch-able features
CCompilerOpt.__init__[1726] : initialize targets groups
CCompilerOpt.__init__[1728] : parse target group simd_test
CCompilerOpt._parse_target_tokens[1939] : skip targets (FMA4 XOP SSE42 VSX3 VSX2 SSE2 VSX NEON AVX512F AVX512_SKX (AVX2 FMA3) ASIMD) not part of baseline or dispatch-able features
CCompilerOpt.generate_dispatch_header[2272] : generate CPU dispatch header: (build/src.macosx-10.4-ppc-3.8/numpy/distutils/include/npy_cpu_dispatch_config.h)
CCompilerOpt.generate_dispatch_header[2281] : dispatch header dir build/src.macosx-10.4-ppc-3.8/numpy/distutils/include does not exist, creating it
building 'npymath' library
compiling C sources
C compiler: /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/compwrap/cc/opt/local/bin/gcc-mp-7 -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/

creating build/temp.macosx-10.4-ppc-3.8
creating build/temp.macosx-10.4-ppc-3.8/numpy
creating build/temp.macosx-10.4-ppc-3.8/numpy/core
creating build/temp.macosx-10.4-ppc-3.8/numpy/core/src
creating build/temp.macosx-10.4-ppc-3.8/numpy/core/src/npymath
creating build/temp.macosx-10.4-ppc-3.8/build
creating build/temp.macosx-10.4-ppc-3.8/build/src.macosx-10.4-ppc-3.8
creating build/temp.macosx-10.4-ppc-3.8/build/src.macosx-10.4-ppc-3.8/numpy
creating build/temp.macosx-10.4-ppc-3.8/build/src.macosx-10.4-ppc-3.8/numpy/core
creating build/temp.macosx-10.4-ppc-3.8/build/src.macosx-10.4-ppc-3.8/numpy/core/src
creating build/temp.macosx-10.4-ppc-3.8/build/src.macosx-10.4-ppc-3.8/numpy/core/src/npymath
compile options: '-Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/npymath -Inumpy/core/include -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/include/numpy -Ibuild/src.macosx-10.4-ppc-3.8/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/common -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/npymath -c'
gcc-mp-7: numpy/core/src/npymath/npy_math.c
In file included from numpy/core/src/common/npy_cpu_features.h:5:0,
                 from numpy/core/src/common/npy_config.h:5,
                 from numpy/core/src/npymath/npy_math_private.h:24,
                 from numpy/core/src/npymath/npy_math_internal.h.src:56,
                 from numpy/core/src/npymath/npy_math.c:9:
numpy/core/include/numpy/numpyconfig.h:33:10: error: #error "unknown architecture"
         #error "unknown architecture"
          ^~~~~
Running from numpy source directory.
Warning: attempted relative import with no known parent package
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
/opt/local/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(

########### CLIB COMPILER OPTIMIZATION ###########
Platform      : 
  Architecture: unsupported
  Compiler    : gcc

CPU baseline  : 
  Requested   : optimization disabled
  Enabled     : none
  Flags       : none
  Extra checks: none
  Requested   : optimization disabled

CPU dispatch  : 
  Enabled     : none
  Generated   : none
CCompilerOpt.cache_flush[809] : write cache to path -> /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/numpy-1.21.4/build/temp.macosx-10.4-ppc-3.8/ccompiler_opt_cache_clib.py
error: Command "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/compwrap/cc/opt/local/bin/gcc-mp-7 -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/ -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/npymath -Inumpy/core/include -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/include/numpy -Ibuild/src.macosx-10.4-ppc-3.8/numpy/distutils/include -Inumpy/core/src/common -Inumpy/core/src -Inumpy/core -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath -Inumpy/core/src/npysort -Inumpy/core/src/_simd -I/opt/local/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/common -Ibuild/src.macosx-10.4-ppc-3.8/numpy/core/src/npymath -c numpy/core/src/npymath/npy_math.c -o build/temp.macosx-10.4-ppc-3.8/numpy/core/src/npymath/npy_math.o -MMD -MF build/temp.macosx-10.4-ppc-3.8/numpy/core/src/npymath/npy_math.o.d" failed with exit status 1
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/numpy-1.21.4" && /opt/local/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 setup.py --no-user-cfg build -j1 
Exit code: 1

Attachments (2)

main.log (378.3 KB) - added by ballapete (Peter "Pete" Dyballa) 3 years ago.
Main.log from PPC Tiger
patch-numpy_core_include_numpy_numpyconfig.h.diff (901 bytes) - added by ballapete (Peter "Pete" Dyballa) 3 years ago.
Patch to add PPC and PPC64 support to numpy, based on evanmiller's work

Download all attachments as: .zip

Change History (14)

Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Cc: michaelld@… removed
Owner: set to michaelld
Port: py-numpy added; py38-numpy removed
Status: newassigned

comment:2 Changed 3 years ago by evanmiller (Evan Miller)

comment:3 in reply to:  2 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Replying to evanmiller: This is a terrible site for my TenFourFox – it lets the fans of my PowerBook G4 run at a deafening noise level. Actually the page where I found your patch. Since for x86_64 and PPC the sizes are equal couldn't they be united as:

    #elif defined(__x86_64) || defined(__ppc__) || defined (__ppc64__)
        #define NPY_SIZEOF_LONGDOUBLE         16
        #define NPY_SIZEOF_COMPLEX_LONGDOUBLE 32

comment:4 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

PPC Leopard, Mac OS X 10.5.8, has the same issue.

comment:5 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Patch to add PPC and PPC64 support to numpy, based on evanmiller's work

comment:6 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

The build started…

comment:7 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Wouldn't this also need an update to support PPC and PPC64?

/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py38-numpy/work/compwrap/cc/opt/local/bin/gcc-mp-7 -bundle -undefined dynamic_lookup -L/opt/local/lib -Wl,-headerpad_max_install_names -isysroot/ -arch ppc build/temp.macosx-10.5-ppc-3.8/build/src.macosx-10.5-ppc-3.8/numpy/core/src/multiarray/_multiarray_tests.o build/temp.macosx-10.5-ppc-3.8/numpy/core/src/common/mem_overlap.o build/temp.macosx-10.5-ppc-3.8/numpy/core/src/common/npy_argparse.o -Lbuild/temp.macosx-10.5-ppc-3.8 -lnpymath -o build/lib.macosx-10.5-ppc-3.8/numpy/core/_multiarray_tests.cpython-38-darwin.so
building 'numpy.core._multiarray_umath' extension
compiling C dispatch-able sources
CCompilerOpt.parse_targets[1768] : looking for '@targets' inside ->  build/src.macosx-10.5-ppc-3.8/numpy/core/src/umath/loops_unary_fp.dispatch.c
CCompilerOpt._parse_target_tokens[1939] : skip targets (NEON VSX2 SSE2) not part of baseline or dispatch-able features
CCompilerOpt._parse_target_tokens[1963] : policy 'MAXOPT' is ON
CCompilerOpt._parse_policy_maxopt[2074] : optimization is disabled, policy 'maxopt' is skipped.
CCompilerOpt._generate_config[2506] : generate dispatched config ->  build/src.macosx-10.5-ppc-3.8/numpy/core/src/umath/loops_unary_fp.dispatch.h
CCompilerOpt.parse_targets[1768] : looking for '@targets' inside ->  build/src.macosx-10.5-ppc-3.8/numpy/core/src/umath/loops_arithm_fp.dispatch.c
CCompilerOpt._parse_target_tokens[1939] : skip targets (AVX512F AVX2 SSE2) not part of baseline or dispatch-able features
CCompilerOpt._parse_target_tokens[1963] : policy 'MAXOPT' is ON
CCompilerOpt._parse_policy_maxopt[2074] : optimization is disabled, policy 'maxopt' is skipped.
CCompilerOpt._generate_config[2506] : generate dispatched config ->  build/src.macosx-10.5-ppc-3.8/numpy/core/src/umath/loops_arithm_fp.dispatch.h
CCompilerOpt.parse_targets[1768] : looking for '@targets' inside ->  build/src.macosx-10.5-ppc-3.8/numpy/core/src/umath/loops_arithmetic.dispatch.c
CCompilerOpt._parse_target_tokens[1939] : skip targets (AVX512F NEON AVX2 VSX2 AVX512_SKX SSE41 SSE2) not part of baseline or dispatch-able features
CCompilerOpt._parse_target_tokens[1963] : policy 'MAXOPT' is ON
CCompilerOpt._parse_policy_maxopt[2074] : optimization is disabled, policy 'maxopt' is skipped.
CCompilerOpt._generate_config[2506] : generate dispatched config ->  build/src.macosx-10.5-ppc-3.8/numpy/core/src/umath/loops_arithmetic.dispatch.h
CCompilerOpt.parse_targets[1768] : looking for '@targets' inside ->  build/src.macosx-10.5-ppc-3.8/numpy/core/src/umath/loops_trigonometric.dispatch.c
CCompilerOpt._parse_target_tokens[1939] : skip targets (AVX512F NEON_VFPV4 (FMA3 AVX2) VSX2) not part of baseline or dispatch-able features
CCompilerOpt._parse_target_tokens[1963] : policy 'MAXOPT' is ON
CCompilerOpt._parse_policy_maxopt[2074] : optimization is disabled, policy 'maxopt' is skipped.
CCompilerOpt._generate_config[2506] : generate dispatched config ->  build/src.macosx-10.5-ppc-3.8/numpy/core/src/umath/loops_trigonometric.dispatch.h
CCompilerOpt.parse_targets[1768] : looking for '@targets' inside ->  build/src.macosx-10.5-ppc-3.8/numpy/core/src/umath/loops_exponent_log.dispatch.c
CCompilerOpt._parse_target_tokens[1939] : skip targets (AVX512F AVX512_SKX (FMA3 AVX2)) not part of baseline or dispatch-able features
CCompilerOpt._parse_target_tokens[1963] : policy 'MAXOPT' is ON
CCompilerOpt._parse_policy_maxopt[2074] : optimization is disabled, policy 'maxopt' is skipped.
CCompilerOpt._generate_config[2506] : generate dispatched config ->  build/src.macosx-10.5-ppc-3.8/numpy/core/src/umath/loops_exponent_log.dispatch.h

comment:8 Changed 3 years ago by mascguy (Christopher Nielsen)

Cc: evanmiller added

comment:9 Changed 3 years ago by evanmiller (Evan Miller)

@ballapete I don't see anything about the snippet that indicates a change is needed for PPC to work. These look like they have to do with enabling extra CPU features.

comment:10 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

py38-numpy @1.21.4_0+gfortran+openblas built and installed. I tried to test it, but obviously failed to run the proper command. I tried ./runtests.py but this seems to have tried a re-build… and failed!

comment:11 Changed 3 years ago by michaelld (Michael Dickens)

Apparently closed with the update of NumPy to 1.22.1. Please reopen if this is still an issue for you and add more info as to what's going on.

comment:12 Changed 3 years ago by michaelld (Michael Dickens)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.