Opened 3 years ago

Closed 5 weeks ago

Last modified 5 weeks ago

#63439 closed defect (fixed)

toxiproxy @2.1.5: sh: {MACPORTS_LEGACY_SUPPORT_LDFLAGS=-L/opt/local/lib: No such file or directory

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: amake (Aaron Madlon-Kay)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port: toxiproxy

Description

The toxiproxy portfile converts the build.env list into a string incorrectly resulting in a build failure on systems that require legacysupport:

https://build.macports.org/builders/ports-10.8_x86_64-builder/builds/59290/steps/install-port/logs/stdio

sh: {MACPORTS_LEGACY_SUPPORT_LDFLAGS=-L/opt/local/lib: No such file or directory
Command failed: GOPATH=/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_toxiproxy/toxiproxy/work/gopath GOARCH=amd64 GOOS=darwin GOPROXY=off GO111MODULE=off  CC=/usr/bin/clang CXX=/usr/bin/clang++ FC=  OBJC=/usr/bin/clang OBJCXX=/usr/bin/clang++ {MACPORTS_LEGACY_SUPPORT_LDFLAGS=-L/opt/local/lib -lMacportsLegacySupport} MACPORTS_LEGACY_SUPPORT_CPPFLAGS=-isystem/opt/local/include/LegacySupport C_INCLUDE_PATH=/opt/local/include/LegacySupport OBJC_INCLUDE_PATH=/opt/local/include/LegacySupport CPLUS_INCLUDE_PATH=/opt/local/include/LegacySupport OBJCPLUS_INCLUDE_PATH=/opt/local/include/LegacySupport MACPORTS_LEGACY_SUPPORT_ENABLED=1 CC=/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_toxiproxy/toxiproxy/work/compwrap/cc/usr/bin/clang CXX=/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_toxiproxy/toxiproxy/work/compwrap/cxx/usr/bin/clang++ OBJC=/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_toxiproxy/toxiproxy/work/compwrap/objc/usr/bin/clang OBJCXX=/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_net_toxiproxy/toxiproxy/work/compwrap/objcxx/usr/bin/clang++ FC= F90= F77= GO_EXTLINK_ENABLED=1 {BOOT_GO_LDFLAGS=-extldflags='-Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport'} {CGO_CFLAGS=-Os -arch x86_64} {CGO_CXXFLAGS=-Os -stdlib=libc++ -arch x86_64} {CGO_LDFLAGS=-Os -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -arch x86_64} {GO_LDFLAGS=-extldflags='-Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -arch x86_64'} /opt/local/bin/go build -ldflags='-s -w -X github.com/Shopify/toxiproxy.Version=2.1.5'
Exit code: 127

See #63305 for how a similar problem was solved in another go-using port.

Change History (2)

comment:1 Changed 5 weeks ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 1871b163756717c5110082581dfdff1dffc06502/macports-ports (master):

toxiproxy: Use build.env correctly

Closes: #63439

comment:2 Changed 5 weeks ago by jmroot (Joshua Root)

For reference, if you ever do actually need to use a *.env option to set the environment in a system command, this is how you can do it:

set envargs [lmap e ${build.env} {shellescape $e}]
system "env [join $envargs] ..." 
Note: See TracTickets for help on using tickets.