Opened 9 years ago

Closed 7 years ago

Last modified 7 years ago

#51210 closed defect (fixed)

ninja @1.6.0: bootstrap needs newer python on old systems

Reported by: grobbelaar@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: tiger leopard Cc:
Port: ninja

Description (last modified by mf2k (Frank Schima))

I tried to 'sudo port install ninja', but it failed with

Error: org.macports.build for port ninja returned: command execution failed
Please see the log file for port ninja for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ninja/ninja/main.log

The log contains:

:debug:configure Using compiler 'MacPorts Apple GCC 4.2'
:debug:configure Executing org.macports.configure (ninja)
:debug:configure Privilege de-escalation not attempted as not running as root.
:debug:build build phase started at Fri Apr 22 19:06:52 CEST 2016
:notice:build --->  Building ninja
:debug:build Executing org.macports.build (ninja)
:debug:build Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ninja/ninja/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
CXX='/opt/local/bin/g++-apple-4.2 -arch ppc'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.4'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ninja/ninja/work/ninja-1.6.0" && ./bootstrap.py --verbose'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ninja/ninja/work/ninja-1.6.0" && ./bootstrap.py --verbose 
:info:build   File "./bootstrap.py", line 16
:info:build     from __future__ import print_function
:info:build SyntaxError: future feature print_function is not defined
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ninja/ninja/work/ninja-1.6.0" && ./bootstrap.py --verbose 
:info:build Exit code: 1
:error:build org.macports.build for port ninja returned: command execution failed
:debug:build Error code: CHILDSTATUS 3893 1
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice \$fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"portbuild::build_main org.macports.build"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:build Warning: targets not executed for ninja: org.macports.activate org.macports.build org.macports.destroot org.macports.install
:notice:build Please see the log file for port ninja for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_ninja/ninja/main.log

The problem seems to be that even though I have Python 2.7 via MacPorts (which python -V says 2.7.11), bootstrap.py begins with #!/usr/bin/python, and that is 2.3.5 on this PPC Mac Mini with OS X 10.4.11 :(

#!/usr/bin/env python selects the "active" Python.

Change History (7)

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

Owner: changed from macports-tickets@… to 521E328E-2A13-4749-826A-E4EF4F22A0F1@…
Port: ninja added

In the future, please use WikiFormatting, fill in the Port field and Cc the port maintainers (port info --maintainers ninja), if any.

comment:2 Changed 9 years ago by mf2k (Frank Schima)

Description: modified (diff)

comment:3 Changed 8 years ago by mf2k (Frank Schima)

Owner: changed from 521E328E-2A13-4749-826A-E4EF4F22A0F1@… to macports-tickets@…

This port no longer has a maintainer. See #51714.

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

Keywords: powerpc tiger added

Is this fixed by r149580?

comment:5 Changed 8 years ago by grobbelaar@…

I'll check

Last edited 8 years ago by grobbelaar@… (previous) (diff)

comment:6 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: leopard added; powerpc removed
Owner: changed from macports-tickets@… to ryandesign
Status: newaccepted
Summary: build (bootstrap) of ninja 1.6.0 failedninja @1.6.0: bootstrap needs newer python on old systems

With 1.8.2 we have this on the Leopard buildbot worker:

Executing:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ninja/ninja/work/ninja-1.8.2" && ./configure --prefix=/opt/local 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_ninja/ninja/work/ninja-1.8.2" && ./configure --prefix=/opt/local 
  File "./configure.py", line 89
    return b'/FS' in out
                ^
SyntaxError: invalid syntax
./build.ninja: No such file or directory

It would seem ninja needs a newer Python than that which is included on Leopard and earlier. Going by our packages server directory, it built fine on Snow Leopard and later. The port should add a dependency on python27, and make configure.py use it, on Leopard and earlier.

Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:7 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: acceptedclosed

In 53f57e242a7dc2bc4692db47aad18d4e35bd82a1/macports-ports:

ninja: Several build fixes:

  • Build with MacPorts python27 on Leopard and older to fix build and with macOS python on newer systems
  • Remove configure wrapper script which seems unnecessary
  • Disable silent rules
  • Honor CXXFLAGS so that we build with the right cxx_stdlib
  • Install documentation files

Closes: #51210

Note: See TracTickets for help on using tickets.