Opened 3 years ago

Closed 3 years ago

#63055 closed defect (fixed)

Go build fails because of -j1 flag despite use_parallel_build no

Reported by: TruePath (Peter Gerdes) Owned by: ci42
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: herbygillot (Herby Gillot), cjones051073 (Chris Jones)
Port: go

Description

On the latest macports (build from master at commit e641f42a) attempts to install go fail with the error given below because make.bash doesn't like the -j1 option

This can be solved via the quick hack of changing the build.cmd in the portfile to build.cmd bash -c "./make.bash" but this is an ugly hack. The docs don't say that -j1 will be passed if use_parrallel_build is set to no but there should be some way to suppress this so no weird shim to eliminate the -j1 arg is needed (I'm sure I just don't know how to do it)

:info:build Executing:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_go/go/work/go/src" && ./make.bash -j1
:debug:build system:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_go/go/work/go/src" && ./make.bash -j1
:info:build Building Go cmd/dist using /opt/local/lib/go-1.4. (go1.4.3 darwin/amd64)
:info:build flag provided but not defined: -j1
:info:build usage: go tool dist bootstrap [options]
:info:build   -a=false: rebuild all
:info:build   -d=false: enable debugging of bootstrap process
:info:build   -no-banner=false: do not print banner
:info:build   -v=0: verbosity
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_go/go/work/go/src" && ./make.bash -j1
:info:build Exit code: 2
:error:build Failed to build go: command execution failed
:debug:build Error code: CHILDSTATUS 26474 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_go/go/main.log for details.

Change History (7)

comment:1 Changed 3 years ago by TruePath (Peter Gerdes)

Ohh sorry, this is on OS X 11.4 Xcode 12.5, Build version 12E262 installing go 1.16.4

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

Cc: herbygillot added
Keywords: make.bash parallel removed
Owner: set to ci42
Status: newassigned

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

Cc: cjones051073 added

This is a consequence of [d148e62c89c0fee07e202dd64b132e6134e7537e/macports-base]. Clearing build.jobs should work around the issue I think.

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

And this seems to have been fixed already in [1d7be07f3f1c1404c50e503d8ef25360616b50b1/macports-ports]?

comment:5 Changed 3 years ago by cjones051073 (Chris Jones)

The check here

https://github.com/macports/macports-base/blob/d148e62c89c0fee07e202dd64b132e6134e7537e/src/port1.0/portbuild.tcl#L175

is I believe supposed to catch build systems that are not known to support the -j option, but clearly fails in this case as the custom build script matches *make*. Maybe that check should be made more robust, so somehow make sure it only matches the make, ninja and scons build commands ?

Last edited 3 years ago by cjones051073 (Chris Jones) (previous) (diff)

comment:6 Changed 3 years ago by herbygillot (Herby Gillot)

@TruePath, can you confirm this is still happening? A fix was added as @jmroot has mentioned. Most recent version of Go built fine on all platforms: https://ports.macports.org/port/go/builds

comment:7 Changed 3 years ago by herbygillot (Herby Gillot)

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