[MacPorts] #70331: gcc14 (c++) can not compile trivial program
MacPorts
noreply at macports.org
Sat Jul 6 09:13:29 UTC 2024
#70331: gcc14 (c++) can not compile trivial program
----------------------+--------------------
Reporter: acmaggs | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: gcc14 |
----------------------+--------------------
Changes (by jmroot):
* keywords: gcc14 =>
Old description:
> Macbook Air m1, sonoma 14.5
> apple command line tools installed:
> clang -v
> Apple clang version 15.0.0 (clang-1500.3.9.4)
> Target: arm64-apple-darwin23.5.0
> ----------------
>
> Take the program:
>
> #include <iostream>
> int
> main(int argc, char * argv[]){
> }
>
> compile:
>
> g++-mp-14 j.cc
>
> In file included from
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/wchar.h:90,
> from /opt/local/include/gcc14/c++/cwchar:44,
> from /opt/local/include/gcc14/c++/bits/postypes.h:40,
> from /opt/local/include/gcc14/c++/iosfwd:42,
> from /opt/local/include/gcc14/c++/ios:40,
> from /opt/local/include/gcc14/c++/ostream:40,
> from /opt/local/include/gcc14/c++/iostream:41,
> from j.cc:1:
> /opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-
> fixed/stdio.h:383:153: error: macro "__API_AVAILABLE4" requires 5
> arguments, but only 4 given
> 383 | FILE *fmemopen(void * __restrict __buf, size_t __size, const char
> * __restrict __mode) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0),
> watchos(4.0));
> |
> ^
> In file included from
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/Availability.h:177,
> from
> /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/wchar.h:72:
> /opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-
> fixed/AvailabilityInternal.h:257:13: note: macro "__API_AVAILABLE4"
> defined here
> 257 | #define __API_AVAILABLE4(arg0,arg1,arg2,arg3,arg4)
> __API_A(arg0) __API_A(arg1) __API_A(arg2) __API_A(arg3) __API_A(arg4)
> | ^~~~~~~~~~~~~~~~
> /opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-
> fixed/stdio.h:384:119: error: macro "__API_AVAILABLE4" requires 5
> arguments, but only 4 given
New description:
Macbook Air m1, sonoma 14.5
apple command line tools installed:
{{{
clang -v
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.5.0
}}}
----------------
Take the program:
{{{
#include <iostream>
int
main(int argc, char * argv[]){
}
}}}
compile:
`g++-mp-14 j.cc`
{{{
In file included from
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/wchar.h:90,
from /opt/local/include/gcc14/c++/cwchar:44,
from /opt/local/include/gcc14/c++/bits/postypes.h:40,
from /opt/local/include/gcc14/c++/iosfwd:42,
from /opt/local/include/gcc14/c++/ios:40,
from /opt/local/include/gcc14/c++/ostream:40,
from /opt/local/include/gcc14/c++/iostream:41,
from j.cc:1:
/opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-
fixed/stdio.h:383:153: error: macro "__API_AVAILABLE4" requires 5
arguments, but only 4 given
383 | FILE *fmemopen(void * __restrict __buf, size_t __size, const char
* __restrict __mode) __API_AVAILABLE(macos(10.13), ios(11.0), tvos(11.0),
watchos(4.0));
|
^
In file included from
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/Availability.h:177,
from
/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/usr/include/wchar.h:72:
/opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-
fixed/AvailabilityInternal.h:257:13: note: macro "__API_AVAILABLE4"
defined here
257 | #define __API_AVAILABLE4(arg0,arg1,arg2,arg3,arg4)
__API_A(arg0) __API_A(arg1) __API_A(arg2) __API_A(arg3) __API_A(arg4)
| ^~~~~~~~~~~~~~~~
/opt/local/lib/gcc14/gcc/arm64-apple-darwin23/14.1.0/include-
fixed/stdio.h:384:119: error: macro "__API_AVAILABLE4" requires 5
arguments, but only 4 given
}}}
--
--
Ticket URL: <https://trac.macports.org/ticket/70331#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list