#67412 closed defect (fixed)
gcc12 @12.3.0_0+stdlib_flag on MacOS Catalina: libiberty/objalloc.c:198:42: error: unknown type name 'PTR'
Reported by: | dbl001 (dbl) | Owned by: | Chris Jones <jonesc@…> |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.1 |
Keywords: | Cc: | ||
Port: | gcc12 |
Description
gcc12 builds on MacOS Ventura, but fails on Catalina.
Attachments (2)
Change History (20)
Changed 17 months ago by dbl001 (dbl)
comment:2 Changed 17 months ago by kencu (Ken)
Summary: | Error building gcc12 on MacOS Catalina → gcc12 @12.3.0_0+stdlib_flag on MacOS Catalina: libiberty/objalloc.c:198:42: error: unknown type name 'PTR' |
---|
Changed 17 months ago by kwolcott
Attachment: | gcc12_install_build_from_source_fails.log.bz2 added |
---|
comment:3 Changed 17 months ago by kwolcott
gcc12 build from source fails for me on Ventura 13.3.1(a); looks like the same PTR issue. I have a compressed log file.
comment:4 follow-up: 8 Changed 16 months ago by jmroot (Joshua Root)
Do you have binutils installed?
comment:6 Changed 16 months ago by jmroot (Joshua Root)
That doesn't answer the question; try port installed binutils
.
comment:7 Changed 16 months ago by dbl001 (dbl)
% port installed binutils None of the specified ports are installed.
comment:8 Changed 16 months ago by Gandoon (Erik Hedlund)
Replying to jmroot:
Do you have binutils installed?
As far as I know it is not possible to install lib/gcc12 with binutils active. The build system will complain and die with an error.
Nevertheless, neither libgcc12 nor gcc12 @12.3.0_0 builds on 10.15 and it has been that way for weeks now. The most irritating bit is that around the same time an upgrade somewhere broke also opencv4 and it also fails to build cleanly past around 78% according to the build progress meter. Opencv4 seems to depend on this port for the build, but the old libgcc12/gcc12 @12.2.0_2 does not seem to do the trick. If these two issues are even related is to me still a mystery.
comment:9 follow-up: 11 Changed 16 months ago by kencu (Ken)
It is apparently not a general issue, because it appears that gcc12/libgcc12 builds on every supported OS system and version when built by the buildbot <http://packages.macports.com/gcc12/>
Presumably some port you have installed is killing the build.
comment:10 Changed 16 months ago by dbl001 (dbl)
It's installed now ... did something change?
(ai) davidlaxer@macbook-pro ~ % port installed gcc12 The following ports are currently installed: gcc12 @12.3.0_0+stdlib_flag (active) (ai) davidlaxer@macbook-pro ~ % port installed libgcc12 The following ports are currently installed: libgcc12 @12.1.0_0+enable_stdlib_flag libgcc12 @12.1.0_1+enable_stdlib_flag libgcc12 @12.1.0_2+enable_stdlib_flag libgcc12 @12.1.0_3+stdlib_flag libgcc12 @12.1.0_4+stdlib_flag libgcc12 @12.1.0_6+stdlib_flag libgcc12 @12.2.0_0+stdlib_flag libgcc12 @12.2.0_1+stdlib_flag libgcc12 @12.2.0_2+stdlib_flag libgcc12 @12.3.0_0+stdlib_flag (active)
comment:11 follow-up: 12 Changed 16 months ago by Gandoon (Erik Hedlund)
Replying to kencu:
It is apparently not a general issue, because it appears that gcc12/libgcc12 builds on every supported OS system and version when built by the buildbot <http://packages.macports.com/gcc12/>
Presumably some port you have installed is killing the build.
Not to be rude, but that is exactly why the ticket exists. We are several people here who have issues on several OS versions. The previous version built just fine, so something has changed somewhere. We are hoping for a solution, e.g. a port to disable to make the build work.
I just now tried to disable gdb and the build worked… There, that's a potential solution.
comment:12 Changed 16 months ago by kencu (Ken)
Replying to kencu:
Presumably some port you have installed is killing the build.
gdb would be the sort of port that might trip up the gcc build.
If that turns out to be a consistent finding, perhaps someone might sort out exactly why and upstream the issue.
comment:13 Changed 16 months ago by jmroot (Joshua Root)
This is ultimately an include ordering issue, as -I/opt/local/include
comes before -I.
in the compile commands.
comment:14 follow-up: 15 Changed 13 months ago by dbl001 (dbl)
I am trying to migrate from MacOS 13 to MacOS 14. gcc12 does not build. Many of my ports depend upon gcc12 (R, Octave, fftw, hdf5, etc.). This was working on MacOS 13. Suggestions?
comment:15 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to dbl001:
I am trying to migrate from MacOS 13 to MacOS 14. gcc12 does not build. Many of my ports depend upon gcc12 (R, Octave, fftw, hdf5, etc.). This was working on MacOS 13. Suggestions?
Well, this ticket is about a build failure of gcc12 caused by having binutils or gdb installed. If that is what you are experiencing now, deactivate binutils or gdb, clean gcc12 and try again. If that is not what you are experiencing now, file a new ticket.
comment:16 Changed 12 months ago by dbl001 (dbl)
On Catalina, deactivating port 'gdb' solved the problem.
comment:17 Changed 12 months ago by Chris Jones <jonesc@…>
Owner: | set to Chris Jones <jonesc@…> |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:18 Changed 12 months ago by jmroot (Joshua Root)
That's a workaround not a fix, as explained in comment:13.