-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot compile helper tools with libc++ #10
Comments
@viniciusferrao Could you test if the |
The first tries were no good:
I've tried with AppleClang and Clang from Macports. None of them were able to compile. For AppleClang I've used: And for Macports Clang: Unfortunately "Clang_DIR" is only available on the Macports release of Clang. I've looked on my filesystem for the usual suspects but it's just missing:
None of those worked. I'm attaching both variants, since the output is different, so you can check it better. It's still a libc++ issue. I think when I use Macports Clang it goes for AppleClang.txt Thank you. EDIT: Checked
The question is: now, which one macOS uses by default? 11000 or 12000? At least Macports is with |
Sorry about that, I was stupid and missed that directly under the changed code there was another instance using the spaceship operator... |
Definitely there's some progress. With AppleClang the error is small during the linking, it seems that
However when using Macports Clang the error is way bigger, it seems to be using
For the Macports release I'm attaching the full log on a text file, since it's too big. |
That's a start...
I think I added that just because the default linker was incredibly slow, it's probably safe to remove it. That will just trigger the Macports issue though. The problem is that the plugin uses LLVM and clang but does not link against them. That's fine on Linux since it's a shared library and a shared library can have undefined symbols as long as these symbols are defined by the program loading the shared library. It seems like Mac wants all symbols to be defined directly. Now there are two possible situations: If the clang compiler on your system links to a dynamic libclang library (and probably a libLLVM library) than we could link the plugin against the same library and it should work. But if clang is linked statically than this is more complicated since the plugin can't link to libclang since otherwise we would end up with two independent copies of clang after loading the plugin. I pushed a change which just instructs the Mac linker to act more like Linux here and therefore hopefully fixes this, but I'm not sure that this will work. I also added a CMake option |
Hi @zauguin, sorry for the delayed answer, I got stuck with a huge work emergency, that seems to be "solved" now. I would like to dig a little further before answering you but since there's 3 days without answer I just ran again with the new patches and the result wasn't good again. For AppleClang it's fails on build now.
When using Macports clang the behavior is different, but still not working and with a lot of errors. For both tests I've disabled the Thanks again. |
Hi, the Apple Clang issue is caused by compiling against another clang version, so it expects symbols from another version. To fix this the plugin has to be build against the headers of Apple clang, but I don't know if they are installed by default. Let's focus on the other issue first. I'll deal with the warnings at the beginning later, if you don't want to extract strings from files using the classical |
Hi @zauguin we're almost there, with Macports Clang now there's only a linker error (ignoring the warnings).
I'll try to find the right headers for I really appreciate the effort. Thanks. |
@viniciusferrao Hopefully this is now fixed too. |
I also tried to do something about the warnings, but there's a fair chance that it broke more than it fixed... Sadly I can't easily test with a freestanding libintl for the moment, so I'll have to rely on you to test it again. |
I think the warning fix made a stepback. With Macports Clang that's happening now:
|
It's reverted now... Probably the only way to solve this currently is to compile with |
Alright it seems to be passing now:
Now I need to learn how to use the tool. Warnings still applies but effectively is that an issue? Thanks. |
It depends but probably not. The library is mostly written to mark strings using user defined literals (e.g. |
The basic usage is
but if your build system generates a
|
@zauguin I have some updates for you. Not on my side but... macOS 12.3 has been released.
So yeah,
Since everything went fine I ran
Anything that I should look for you? Thanks. |
Thanks for the update! You might notice that I made some changes, mostly in the CMake files. It should now be much easier to use the library from CMake based projects. (The Anyway about your issue: You system doesn't know the Another possibility is that the german locale is not installed on non german macOS installations. In that case the test can probably be ignored. (Since it tests that the translations work it is actually more a test of the underlying libIntl than of i18n++ anyway) To check for this, would you send me the output of
I recommend running tests by running |
As discussed on #9 it seems that
libc++
does not implement the spaceship operator, which breaks the library whenlibc++
is used instead oflibstdc++
:On macOS, it defaults to
libc++
, and it's impossible to compile the helper tools:The text was updated successfully, but these errors were encountered: