Using MacPorts gcc14 (stdio.h trouble error: unknown type name 'FILE)
Gerben Wierda
gerben.wierda at rna.nl
Wed Feb 12 21:46:16 UTC 2025
I am trying to compile a library (GKlib) with MacPorts gcc14 on Sonoma 14.7,3. MacPorts is up to date
I have set thing sup with
git clone https://github.com/KarypisLab/GKlib.git
cd GKlib
make config cc=gcc-mp-14 prefix=../GKlibInstall
make
/opt/local/bin/gcc-mp-14 -I/Users/gerben/RenskeDev/Leon/fromsource/GKlib/. -I/Users/gerben/RenskeDev/Leon/fromsource/GKlib/test -DLINUX -D_FILE_OFFSET_BITS=64 -std=c99 -fno-strict-aliasing -march=native -fPIC -Werror -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label -DNDEBUG -DNDEBUG2 -DHAVE_EXECINFO_H -DHAVE_GETLINE -O3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk -mmacosx-version-min=14.7 -MD -MT CMakeFiles/GKlib.dir/b64.c.o -MF CMakeFiles/GKlib.dir/b64.c.o.d -o CMakeFiles/GKlib.dir/b64.c.o -c /Users/gerben/RenskeDev/Leon/fromsource/GKlib/b64.c
In file included from /Users/gerben/RenskeDev/Leon/fromsource/GKlib/GKlib.h:32,
from /Users/gerben/RenskeDev/Leon/fromsource/GKlib/b64.c:20:
/opt/local/lib/gcc14/gcc/x86_64-apple-darwin23/14.2.0/include-fixed/stdio.h:83:8: error: unknown type name 'FILE'
83 | extern FILE *__stdinp;
| ^~~~
A test file in the directory above compiles fine. I’ve seen messages with this kind of trouble but I don’t understand exactly where this is going wrong.
/opt/local/lib/gcc14/gcc/x86_64-apple-darwin23/14.2.0/include-fixed/stdio.h starts with:
#ifndef _STDIO_H_
#define _STDIO_H_
#include <_stdio.h>
#include <sys/_types/_seek_set.h>
__BEGIN_DECLS
extern FILE *__stdinp;
When testing with the test file, the culprit seems to be
-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.2.sdk
It’s been far too long I have been doing stuff like this, so I could use tips.
Thanks,
G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20250212/f501c39e/attachment.htm>
More information about the macports-users
mailing list