Opened 5 years ago

Closed 22 months ago

#59122 closed defect (fixed)

py-numpy @1.17.2 does not build on PPC Tiger, Mac OS X 10.4.11, because of "'for' loop initial declaration used outside C99 mode"

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

Description

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

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-97b2160/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-97b2160/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-97b2160/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-97b2160/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 -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.2" && /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

Attachments (1)

main.log (191.1 KB) - added by ballapete (Peter "Pete" Dyballa) 5 years ago.
Main.log from build on Tiger with PowerPC 7447A

Download all attachments as: .zip

Change History (5)

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

Attachment: main.log added

Main.log from build on Tiger with PowerPC 7447A

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

Cc: michaelld@… removed
Owner: set to michaelld
Status: newassigned

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

py37-numpy and py-numpy could be built with option configure.compiler=macports-gcc-6.

comment:3 Changed 22 months ago by ballapete (Peter "Pete" Dyballa)

This package is not needed anymore by some other port (once needed by boost?). When I start to build it I still see

/usr/bin/gnutar: numpy-1.23.5/.coveragerc: implausibly old time stamp 1970-01-01 01:00:00

plus a few hundred similar lines. When will this vanish? I have lbzip2 installed, doesn't this work without such silly complaints?

CC='/opt/local/bin/gcc-mp-7' is now recorded in the build process' environment, so it should build. Before I see this report:

Running from numpy source directory.
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_python_py-numpy/py310-numpy/work/numpy-1.23.5/setup.py:86: DeprecationWarning: 

  `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
  of the deprecation of `distutils` itself. It will be removed for
  Python >= 3.12. For older Python versions it will remain present.
  It is recommended to use `setuptools < 60.0` for those Python versions.
  For more details, see:
    https://numpy.org/devdocs/reference/distutils_status_migration.html 

py-numpy and py310-numpy built, because the Portfile was upgraded. So this ticket can be closed.

comment:4 Changed 22 months ago by kencu (Ken)

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