Open mdesantis opened 1 month ago
Sorry I missed that one. Let me take a look
g++ -MD -MP -I/opt/homebrew/opt/llvm/include -I/opt/homebrew/opt/llvm/include -gstrict-dwarf -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -I/opt/homebrew/opt/llvm/include -gstrict-dwarf -O2 -fPIC -Wall -Wsign-compare -Wfloat-equal -Wpointer-arith -Wcast-align -Wno-non-virtual-dtor -c RdKafka.cpp -o RdKafka.o RdKafka.cpp:29:10: fatal error: 'string' file not found
It seems to be using preinstalled librdkafka cpp instead of librdkafka.c shipped with karafka-rdkafka :thinking:
@mdesantis what gcc version is that?
@mensfeld here you are:
> gcc --version
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
@nijikon your version pretty plz? :pray:
It's a macos update issue that is not including correct stuff for CPP.
You mind trying with this flag set?
CPPFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/"
It's a macos update issue that is not including correct stuff for CPP.
You mind trying with this flag set?
CPPFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX14.5.sdk/usr/include/c++/v1/"
Putting this into .zshrc helps:
export CPPFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX15.0.sdk/usr/include/c++/v1/"
It worked, many thanks!
Glad to help!
It worked, many thanks!
FYI, I just updated to latest OSX, Sequoia 15.1 and updated the command line tools.
I needed to add this to my ~/.zshrc
export CPPFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/ $CPPFLAGS"
~ % gcc --version
Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: arm64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
In /Library/Developer/CommandLineTools/SDKs/
, there's a MacOSX15.sdk symlink to the MacOSX15.1.sdk directory. I used the symlink as I imagine this will point to a 15.2.sdk at some point.
EDIT:
exporting the CPPFLAGS globally caused prism to fail to compile. Ultimately, I removed it from my ~/.zshrc
and instead installed rdkafka and passed the CPPFLAGS just for that installation:
CPPFLAGS="-I/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk/usr/include/c++/v1/ $CPPFLAGS" gem install rdkafka -v0.19.0
A better long term solution would be nice. I'm not sure if it's specifically where libraries are installed on arm apple silicon and that conflicting with a change that occurred in the CommandLineTools from apple or something else that's causing a problem here.
Do you guys have an idea how I can automatically detect this so I could just automate this instead of relying on you remembering to alter that?
I updated my comment above as setting the CPPFLAGS globally to workaround this issue introduced another problem with prism. See above.
@jrafanie yeah that's why I wonder if we can detect this somehow and inject this on demand :thinking:
@mensfeld What can I run to provide more debugging? It's easy for me to install it with and without the CPPFLAGS to get it succeed or fail.
It would be nice to have other bug reports to see if it's truly unique to sonoma/sequoia and M1. Maybe non-homebrew macs on M1 on sonoma/sequoia.
There's some discussion of other issues with GCC on newer mac sdks: https://github.com/Homebrew/homebrew-core/issues/194778#issuecomment-2421731888
Let me know what I can do to help. Thanks!
For more info on this, it seems to only fail when you're using CommandLineTools gcc vs XCode gcc. You can check which you're using with
❯ xcode-select -p
/Applications/Xcode.app/Contents/Developer
❯ xcode-select -p
/Library/Developer/CommandLineTools
If you've got XCode installed and up-to-date, you can probably switch to it and not need to override CPPFLAGS:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
@fusion2004 any chance you could PR a fix for this? :)
No, I'm not sure what a proper fix to support both would be, unfortunately lol. We've updated our application's setup scripts to ensure folks are using Xcode instead of CommandLineTools instead.
Hi,
I'm having troubles trying to install
karafka-rdkafka
on Mac OS X. It's complaining about a missing C++ header, I guess. I googled the error but no luck. Am I the only one experiencing it? Here is the output: