[MacPorts] #70087: plplot fails to build: cc1: error: argument to '-O' should be a non-negative integer, 'g', 's', 'z' or 'fast'
MacPorts
noreply at macports.org
Tue May 28 07:25:04 UTC 2024
#70087: plplot fails to build: cc1: error: argument to '-O' should be a non-
negative integer, 'g', 's', 'z' or 'fast'
---------------------------+--------------------
Reporter: barracuda156 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.9.3
Resolution: | Keywords:
Port: plplot |
---------------------------+--------------------
Comment (by ryandesign):
Replying to [comment:1 barracuda156]:
> I do not see where the source adds this flag btw.
It's right there in cmake/modules/aqt.cmake:
{{{
set(aqt_COMPILE_FLAGS "-ObjC")
}}}
Replying to [comment:2 barracuda156]:
> Ah, this: `reinplace "s|-ObjC|-ObjC -framework AquaTerm|"
${worksrcpath}/cmake/modules/aqt.cmake`.
You can see that this `reinplace` does not add the `-ObjC` flag; it adds
the `-framework AquaTerm` flag after the existing `-ObjC` flag.
Replying to [comment:3 barracuda156]:
> Unfortunately fixing flags does not suffice, it is broken badly further
down:
> {{{
>
/System/Library/Frameworks/Foundation.framework/Headers/NSObjCRuntime.h:149:1:
error: stray '@' in program
> 149 | @class NSString, Protocol;
> | ^
> }}}
What do you mean by "fixing flags"? If you mean removing `-ObjC`, I expect
that is what caused this error. `@class` is Objective-C syntax. The
compiler needs to be told to compile in Objective-C mode, which is
presumably what the `-ObjC` flag was accomplishing.
--
Ticket URL: <https://trac.macports.org/ticket/70087#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list