MacOS Ventura, Monterey Intel compiler error using /usr/bin/cc

Chris Johns chrisj at rtems.org
Mon Dec 4 00:31:47 CET 2023


On 2/12/2023 12:49 am, Marc Glisse wrote:
> On Fri, 1 Dec 2023, Chris Johns wrote:
> 
>> Version 6.3.0, built from source, no patches
>>
>> We build GMP from source when building the RTEMS GNU compiler tools using our
>> source builder tool. I am seeing an error only on Intel MacOS Ventura and
>> Monterey with the latest Xcode. There is no error on M2 Sonoma. The error is:
>>
>> libtool: compile:  /usr/bin/cc -O2 -pipe -fbracket-depth=1024
>> -I/opt/work/chris/rtems/rsb/rtems-source-builder.git/rtems/build/tmp/sb-501/tools/rtems-default-tools/opt/work/rtems/6/include
>> -DHAVE_CONFIG_H -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_fib_table -O2
>> -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8 -c fib_table.c -o
>> fib_table.o
>> In file included from fib_table.c:4:
>> ../gmp-impl.h:1356:43: error: unexpected type name 'mpz_srcptr': expected
>> identifier
>>  void (*randseed_fn) (gmp_randstate_ptr, mpz_srcptr);
>>                                          ^
> 
> The only reason I can think of is that you may have an old gmp.h in
> .../rtems/6/include that gets included before the new one (from -I. or -I..).

Thanks for the hint. It seems a manual clean of the build directory the RSB uses
helped. I am not sure how that effected the build but it did and I think how you
said. This points to a bug in our RSB tool, it should make the build tree clean.

Sorry for the noise.

Thanks
Chris


More information about the gmp-bugs mailing list