Opened 2 years ago
Closed 2 years ago
#66458 closed defect (duplicate)
libgcc12 @12.2.0 fails to configure - include mpc.h broken
Reported by: | vallon (Justin) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | Cc: | ||
Port: | libgcc12 libmpc |
Description
One of the configure checks for libgcc12 is failing. It is checking MPC version is >= 0.8.0, but instead has trouble compiling the check driver.
The build seems to be choking on a simple include of <mpc.h>.
$ port build libgcc12 /usr/bin/clang -arch x86_64 -c -pipe -Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk conftest.c In file included from conftest.c:10: /opt/local/include/mpc.h:287:35: error: unknown type name 'FILE' __MPC_DECLSPEC void mpcr_out_str (FILE *f, mpcr_srcptr r); ^ 1 error generated. configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define LT_OBJDIR ".libs/" | /* end confdefs.h. */ | #include <mpc.h> | int | main () | { | | #if MPC_VERSION < MPC_VERSION_NUM(0,8,0) | choke me | #endif | | ; | return 0; | }
Can be reproduced with just an include:
$ cat x.c #include <mpc.h> $ /usr/bin/clang -arch x86_64 -c -pipe -Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk -I/opt/local/include x.c In file included from x.c:1: /opt/local/include/mpc.h:287:35: error: unknown type name 'FILE' __MPC_DECLSPEC void mpcr_out_str (FILE *f, mpcr_srcptr r); ^
System: OS 13, xcodebuild -version "Xcode 14.1, Build version 14B47b"
Change History (2)
comment:1 Changed 2 years ago by thaumkid (Jacob Hobbs)
comment:2 Changed 2 years ago by jmroot (Joshua Root)
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
I had the same issue - to fix it, I had to modify /opt/local/include/mpc.h and after line 24, insert the line, "#include <stdio.h>".
Afterwards, port install libgcc12 was successful