Opened 4 years ago

Closed 17 months ago

#59571 closed defect (fixed)

py37-numpy @1.17.3 does not build on PPC Tiger, Mac OS X 10.4.11, because of many errors

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version:
Keywords: tiger Cc:
Port: py-numpy

Description

C compiler: /opt/local/bin/gcc-apple-4.2 -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 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
gcc-apple-4.2: _configtest.c
_configtest.c:1:20: error: endian.h: No such file or directory
failure.
removing: _configtest.c _configtest.o
C compiler: /opt/local/bin/gcc-apple-4.2 -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 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
gcc-apple-4.2: _configtest.c
_configtest.c:1:24: error: sys/endian.h: No such file or directory
failure.
removing: _configtest.c _configtest.o

endian.h exists here:

-r--r--r--   1 root  wheel  3829 20 Sep  2007 /usr/include/i386/endian.h
-r--r--r--   1 root  wheel  1295 20 Sep  2007 /usr/include/machine/endian.h
-r--r--r--   1 root  wheel  4664 20 Sep  2007 /usr/include/ppc/endian.h
C compiler: /opt/local/bin/gcc-apple-4.2 -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 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c'
gcc-apple-4.2: _configtest.c
_configtest.c: In function 'main':
_configtest.c:7: error: 'SIZEOF_LONGDOUBLE' undeclared (first use in this function)
_configtest.c:7: error: (Each undeclared identifier is reported only once
_configtest.c:7: error: for each function it appears in.)
failure.
removing: _configtest.c _configtest.o

GGC 4.2 #defines: #define __LONG_DOUBLE_128__ 1

Many more errors follow.

Attachments (1)

main.log (163.7 KB) - added by ballapete (Peter "Pete" Dyballa) 4 years ago.
Main.log from PPC Tiger

Download all attachments as: .zip

Change History (8)

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

Attachment: main.log added

Main.log from PPC Tiger

comment:1 Changed 4 years ago by mf2k (Frank Schima)

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

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

gcc-7 works on 10.4 PPC.

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

Replying to kencu:

gcc-7 works on 10.4 PPC.

GCC 6 too. It shows quite the same errors as GCC 4.2 during the configure step.

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

Version @1.17.4 seems to need a modern compiler as well:

building extension "numpy.random.mtrand" sources
building data_files sources
build_src: building npy-pkg config files
running build_py
copying numpy/version.py -> build/lib.macosx-10.4-ppc-3.7/numpy
copying build/src.macosx-10.4-ppc-3.7/numpy/__config__.py -> build/lib.macosx-10.4-ppc-3.7/numpy
copying build/src.macosx-10.4-ppc-3.7/numpy/distutils/__config__.py -> build/lib.macosx-10.4-ppc-3.7/numpy/distutils
running build_clib
customize UnixCCompiler
customize UnixCCompiler using build_clib
building 'npysort' library
compiling C sources
C compiler: /opt/local/bin/gcc-apple-4.2 -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -pipe -Os -arch ppc -isysroot/

compile options: '-Ibuild/src.macosx-10.4-ppc-3.7/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-10.4-ppc-3.7/numpy/core/include/numpy -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 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -Ibuild/src.macosx-10.4-ppc-3.7/numpy/core/src/common -Ibuild/src.macosx-10.4-ppc-3.7/numpy/core/src/npymath -Ibuild/src.macosx-10.4-ppc-3.7/numpy/core/src/common -Ibuild/src.macosx-10.4-ppc-3.7/numpy/core/src/npymath -c'
gcc-apple-4.2: build/src.macosx-10.4-ppc-3.7/numpy/core/src/npysort/radixsort.c
numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_bool':
numpy/core/src/npysort/radixsort.c.src:112: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_bool':
numpy/core/src/npysort/radixsort.c.src:202: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_byte':
numpy/core/src/npysort/radixsort.c.src:112: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_byte':
numpy/core/src/npysort/radixsort.c.src:202: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_ubyte':
numpy/core/src/npysort/radixsort.c.src:112: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_ubyte':
numpy/core/src/npysort/radixsort.c.src:202: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_short':
numpy/core/src/npysort/radixsort.c.src:112: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_short':
numpy/core/src/npysort/radixsort.c.src:202: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_ushort':
numpy/core/src/npysort/radixsort.c.src:112: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_ushort':
numpy/core/src/npysort/radixsort.c.src:202: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_int':
numpy/core/src/npysort/radixsort.c.src:112: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_int':
numpy/core/src/npysort/radixsort.c.src:202: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_uint':
numpy/core/src/npysort/radixsort.c.src:112: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_uint':
numpy/core/src/npysort/radixsort.c.src:202: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_long':
numpy/core/src/npysort/radixsort.c.src:112: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_long':
numpy/core/src/npysort/radixsort.c.src:202: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_ulong':
numpy/core/src/npysort/radixsort.c.src:112: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_ulong':
numpy/core/src/npysort/radixsort.c.src:202: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_longlong':
numpy/core/src/npysort/radixsort.c.src:112: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_longlong':
numpy/core/src/npysort/radixsort.c.src:202: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'radixsort_ulonglong':
numpy/core/src/npysort/radixsort.c.src:112: error: 'for' loop initial declaration used outside C99 mode
numpy/core/src/npysort/radixsort.c.src: In function 'aradixsort_ulonglong':
numpy/core/src/npysort/radixsort.c.src:202: error: 'for' loop initial declaration used outside C99 mode
Running from numpy source directory.
/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
  warnings.warn(msg)
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_python_py-numpy/py37-numpy/work/numpy-numpy-93e9dd8/numpy/distutils/fcompiler/__init__.py:482: UserWarning: F90FLAGS is used as is, not appended to flags already defined by numpy.distutils! Use NPY_DISTUTILS_APPEND_FLAGS=1 to obtain appending behavior instead (this behavior will become default in a future release).
  f90flags = self.flag_vars.f90
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_python_py-numpy/py37-numpy/work/numpy-numpy-93e9dd8/numpy/distutils/fcompiler/__init__.py:517: UserWarning: FFLAGS is used as is, not appended to flags already defined by numpy.distutils! Use NPY_DISTUTILS_APPEND_FLAGS=1 to obtain appending behavior instead (this behavior will become default in a future release).
  fflags = self.flag_vars.flags + dflags + oflags + aflags
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_python_py-numpy/py37-numpy/work/numpy-numpy-93e9dd8/numpy/distutils/fcompiler/__init__.py:530: UserWarning: LDFLAGS is used as is, not appended to flags already defined by numpy.distutils! Use NPY_DISTUTILS_APPEND_FLAGS=1 to obtain appending behavior instead (this behavior will become default in a future release).
  linker_so_flags = self.flag_vars.linker_so
/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_python_py-numpy/py37-numpy/work/numpy-numpy-93e9dd8/numpy/distutils/fcompiler/__init__.py:540: UserWarning: LDFLAGS is used as is, not appended to flags already defined by numpy.distutils! Use NPY_DISTUTILS_APPEND_FLAGS=1 to obtain appending behavior instead (this behavior will become default in a future release).
  linker_exe_flags = self.flag_vars.linker_exe
error: Command "/opt/local/bin/gcc-apple-4.2 -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.7/numpy/core/src/common -Inumpy/core/include -Ibuild/src.macosx-10.4-ppc-3.7/numpy/core/include/numpy -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 -I/opt/local/Library/Frameworks/Python.framework/Versions/3.7/include/python3.7m -Ibuild/src.macosx-10.4-ppc-3.7/numpy/core/src/common -Ibuild/src.macosx-10.4-ppc-3.7/numpy/core/src/npymath -Ibuild/src.macosx-10.4-ppc-3.7/numpy/core/src/common -Ibuild/src.macosx-10.4-ppc-3.7/numpy/core/src/npymath -c build/src.macosx-10.4-ppc-3.7/numpy/core/src/npysort/radixsort.c -o build/temp.macosx-10.4-ppc-3.7/build/src.macosx-10.4-ppc-3.7/numpy/core/src/npysort/radixsort.o -MMD -MF build/temp.macosx-10.4-ppc-3.7/build/src.macosx-10.4-ppc-3.7/numpy/core/src/npysort/radixsort.o.d" failed with exit status 1
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_python_py-numpy/py37-numpy/work/numpy-1.17.4" && /opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 setup.py --no-user-cfg build 
Exit code: 1
Error: Failed to build py37-numpy: command execution failed

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

Since py37-numpy @1.17.4 is set up to use

F77='/opt/local/bin/gfortran-mp-6'
F90='/opt/local/bin/gfortran-mp-6'
FC='/opt/local/bin/gfortran-mp-6'

it should stop using

CC='/opt/local/bin/gcc-apple-4.2'
CXX='/opt/local/bin/g++-apple-4.2'

and maybe also

CXXFLAGS='-arch ppc -isysroot/'

and use instead GCC6 for compilation of everything. Anyway, with

ARCHFLAGS='-arch ppc'
ATLAS='None'
CC='/opt/local/bin/gcc-mp-6'
CFLAGS='-arch ppc -isysroot/'
CPATH='/opt/local/include'
CXX='/opt/local/bin/g++-mp-6'
CXXFLAGS='-arch ppc -isysroot/'
DEVELOPER_DIR='/Developer'
F77='/opt/local/bin/gfortran-mp-6'
F90='/opt/local/bin/gfortran-mp-6'
F90FLAGS='-m32'
FC='/opt/local/bin/gfortran-mp-6'
FCFLAGS='-m32'
FFLAGS='-m32'
LDFLAGS='-arch ppc'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.4'
OBJC='/opt/local/bin/gcc-mp-6'
OBJCFLAGS='-arch ppc -isysroot/'
OPENBLAS='/opt/local/lib'

the port builds.

comment:6 Changed 17 months ago by ballapete (Peter "Pete" Dyballa)

Meanwhile a more up-to-date version builds without problem. So this ticket can be closed.

comment:7 Changed 17 months ago by kencu (Ken)

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