#58462 closed defect (fixed)
gcc9 @9.1.0, gcc10 @10-20190505: Portfile parse failures
Reported by: | mndavidoff (Monte Davidoff) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | cjones051073 (Chris Jones) | |
Port: | gcc9 gcc10 |
Description
The gcc9 and gcc10 Portfiles fail to parse:
$ sudo port -v selfupdate ... Error: Failed to determine active llvm variant for cctools. Please check variant list. Failed to parse file lang/gcc10/Portfile: configuration error Error: Failed to determine active llvm variant for cctools. Please check variant list. Failed to parse file lang/gcc9/Portfile: configuration error ... $ port info gcc9 Error: Port gcc9 not found $ port info gcc10 Error: Port gcc10 not found
The problems appear to have been introduced in:
Change History (18)
comment:1 Changed 6 years ago by mf2k (Frank Schima)
comment:3 Changed 6 years ago by mndavidoff (Monte Davidoff)
Here's what I have:
$ port version Version: 2.5.4 $ port installed cctools The following ports are currently installed: cctools @921_1+xcode (active)
The message Failed to determine active llvm variant for cctools. Please check variant list comes from the Portfile itself:
ui_error "Failed to determine active llvm variant for cctools. Please check variant list."
I presume MacPorts base issues Failed to parse file .../Portfile: configuration error when ui_error
is invoked.
comment:4 Changed 6 years ago by cjones051073 (Chris Jones)
The default variants for cctools where changed a while back. Please run
sudo port -f uninstall cctools sudo port install cctools
you should then have tools using one of the llvm variants, instead of xcode.
comment:5 Changed 6 years ago by cjones051073 (Chris Jones)
Also, guess I should extend the gcc9/10 checks to catch when cctools still has the xcode variant ...
comment:6 Changed 6 years ago by mndavidoff (Monte Davidoff)
Is reinstalling cctools with the default variant a temporary workaround until you can fix the parse error, or are you saying I'm required to use the default variant on cctools? A portfile parse error seems like an extreme way to report the problem. If cctools +xcode is invalid, perhaps the xcode variant should be removed from cctools?
comment:7 Changed 6 years ago by cjones051073 (Chris Jones)
what I am saying is the Xcode variant is no longer the default. It was for a while, but was changed some time ago. However, on upgrades it will be retained so if you wish to switch back to the defaults you need to manually uninstall cctools then reinstall it. Once done, you can then leave it alone.
comment:8 Changed 6 years ago by cjones051073 (Chris Jones)
b.t.w. Are you intentionally building from source here ? gcc9 and gcc10 are both available in binary tarball form for macOS10.7+. Is your ${prefix} non-standard, or is there some other reason this is happening ? gcc are fairly big builds.... if you can you would do well to avoid building them yourself..
comment:9 follow-up: 11 Changed 6 years ago by mndavidoff (Monte Davidoff)
I've uninstalled/reinstalled cctools using the default cctools variant, did a selfupdate, and the gcc9/gcc10 ports are now back. That solved the immediate problem. I was only using the cctools +xcode variant because it was the default at the time I installed cctools. I'm ok with using the new cctools default variant.
I'm intentionally building from source. I'm well aware of how long it takes. ;-)
At the risk of being pedantic, I do think there's a bug in the gcc9/gcc10 portfiles: they should not fail to parse if the wrong variant of some other port is installed.
comment:10 Changed 6 years ago by mndavidoff (Monte Davidoff)
FYI, when I did a sudo port selfupdate
(no -v
), there was no error message. The gcc9/gcc10 ports just silently disappeared.
comment:11 Changed 6 years ago by cjones051073 (Chris Jones)
Replying to mndavidoff:
I'm intentionally building from source. I'm well aware of how long it takes. ;-)
Fair enough, just checking...
At the risk of being pedantic, I do think there's a bug in the gcc9/gcc10 portfiles: they should not fail to parse if the wrong variant of some other port is installed.
There is a loop hole in that they don't take the Xcode variant possibility into account. I'll submit something to address this shortly.
comment:13 Changed 6 years ago by kencu (Ken)
I thought the xcode variant might be the issue. But let's find a way to allow that variant, as there are other tickets where the clang assembler fails whereas the xcode assembler works.
comment:14 Changed 6 years ago by kencu (Ken)
see here for an example where the current clang assembler fails whereas the slight older xcode assembler works:
comment:15 Changed 6 years ago by cjones051073 (Chris Jones)
comment:16 Changed 6 years ago by mouse07410 (Mouse)
Not to mention that cctools +llvm70
(the current default) requires installation of LLVM-7.0, which could make some (including myself) unhappy - it plainly did not work with libgcc9
, as the above ticket showed.
comment:17 Changed 6 years ago by cjones051073 (Chris Jones)
Resolution: | → fixed |
---|---|
Status: | new → closed |
The issues in https://trac.macports.org/ticket/58442 are not directly related to those here. The issue here is just lack of handling of the Xcode variant, which is now added.
comment:18 Changed 6 years ago by mndavidoff (Monte Davidoff)
I've verified the fix for this issue.
$ port installed cctools The following ports are currently installed: cctools @921_1+xcode (active) $ port list gcc9 gcc10 gcc9 @9.1.0 lang/gcc9 gcc10 @10-20190505 lang/gcc10
Thanks!
It WFM. I'm on the latest base though. However I don't see anything obvious that would cause a problem.