Opened 8 years ago
Last modified 6 years ago
#52161 new defect
mp-buildbot: incorrect error message when a port cannot be installed due to arch mismatch
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | contrib | Version: | 2.3.4 |
Keywords: | Cc: | neverpanic (Clemens Lang), larryv (Lawrence Velázquez), dliessi (Davide Liessi) | |
Port: |
Description
If I try to install wine on PowerPC, it fails, as it should:
# /opt/local/bin/port install wine Error: wine cannot be installed for the configured build_arch 'ppc' because it only supports the arch(s) 'i386'. To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port wine failed
However, when the buildbot tries to install dependencies of wine, using dependencies.tcl, it fails with a weirder error:
Error: Cannot install wine for the arch(s) 'powerpc' because Error: its dependency bison does not build for the required arch(s) by default Error: and the configured universal_archs 'i386 ppc' are not sufficient. architecture mismatch while executing "mportdepends $mport "activate"" invoked from within "if {[mportdepends $mport "activate"] != 0} { ui_error "mportdepends $portname activate failed." exit 1 }" (file "/opt/bblocal/var/buildworker/ports/build/mpbb/tools/dependencies.tcl" line 74)
It should fail, of course, but the reason given for the failure is wrong.
- "powerpc" is not a valid build architecture. It's a valid system architecture—a valid value for
${os.arch}
—but not a valid${build_arch}
. - The problem is not that wine's dependencies can't be built on this system. The problem is that wine itself can't be built on this system.
I didn't see any architecture-related code in dependencies.tcl, so this might actually be a base bug.
Change History (4)
comment:1 Changed 8 years ago by larryv (Lawrence Velázquez)
Cc: | larryv@… added |
---|
comment:2 follow-up: 3 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)
Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option Warning: All compilers are either blacklisted or unavailable; defaulting to first fallback option Error: Cannot install svn2git for the arch(s) 'powerpc' because Error: its dependency apr does not build for the required arch(s) by default Error: and the configured universal_archs 'i386 ppc' are not sufficient. architecture mismatch while executing "mportdepends $mport "activate"" invoked from within "if {[mportdepends $mport "activate"] != 0} { ui_error "mportdepends $portname activate failed." exit 1 }" (file "/opt/bblocal/var/buildworker/ports/build/mpbb/tools/dependencies.tcl" line 83) Calculating dependencies for 'svn2git' failed, aborting. ./mpbb/mpbb: error: `install-dependencies' failed to run successfully
Actually, it cannot install svn2git for ppc because its dependency qt5-qtbase only builds for x86_64.
comment:3 Changed 7 years ago by jmroot (Joshua Root)
Replying to ryandesign:
Actually, it cannot install svn2git for ppc because its dependency qt5-qtbase only builds for x86_64.
Not sure if anything changed since you wrote this, but currently svn2git includes the qmake5 portgroup which in turn includes the qt5 portgroup, which sets supported_archs.
Basically the issue here is that check_supported_archs (which produces the error seen in the wine example) is only called when you execute a target on the port. The incorrect error being seen here is generated during dependency calculation, before any targets are run. The reason for the ppc/powerpc mismatch is that unsupported archs are filtered out of configure.build_arch, which in this case leaves it empty. So get_canonical_archs falls back to returning ${os.arch} rather than return an empty string.
comment:4 Changed 6 years ago by dliessi (Davide Liessi)
Cc: | dliessi added |
---|
Cc Me!