-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
After upgrade to Boost 1.75, compilation fails with ld: library not found for -licudata #67427
Comments
I can simply fix the issue by creating manually the links to libicudata and others in What intrigues me is the fact that boost::regex, which seems to be the culprit, hasn't changed any dependency between 1.74 and 1.75, as you can see here:
So I can't understand why now I need libicudata.dylib in |
I've noticed the same thing and opened an upstream issue about it: boostorg/boost_install#47 |
@alvaropalmaaste, do you have a MWE? I don't think it's sufficient to just recompile something that uses Boost's regex library. A lot of the initial CI failures from the Boost update came from formulae that used Boost's regex library, but I found that recompiling them against Boost 1.75 seemed to have fixed it, so it seems there's something more needed in order to reproduce this. That said, it looks like a fix has been pushed to the develop branch: boostorg/boost_install@7b3fc73 If someone could test this, I'd appreciate it, so I can look into incorporating the fix into the Boost formula. |
@carlocab I discovered this when I tried to build a library depending on Boost Regex in a GithubActions VM. So on a "fresh" system, where only [email protected] is installed and everything is compiled from scratch this also fails unless I add |
Thanks @Time0o. I still need a MWE though. |
@carlocab I will try to create one by stripping down my project, give me a minute. EDIT: might take a while, GitHub Actions macOS builds are currently experiencing issues (I think they announced this) and in my case brew times out repeatedly. |
This is excellent, @Time0o. Thank you for this. Update: I don't quite have the time to take a close look at this at the moment, but it's on my list. |
I've tested the patch, and it works for me, so I've submitted it in #67615. |
In boost 1.75.0, the cmake INTERFACE_LINK_LIBRARIESS now include non-boost dependencies like libicudata from the keg-only formula icu4c. This introduces linking errors for software that previously linked successfully in brew against boost 1.74.0 shared libraries (see Homebrew#67427 and boostorg/boost_install#47). This adds a patch to the boost formula that has been merged upstream to limit the expansion of INTERFACE_LINK_LIBRARIES to boost's static libraries, so that the linking errors with shared libraries are resolved.
In boost 1.75.0, the cmake INTERFACE_LINK_LIBRARIESS now include non-boost dependencies like libicudata from the keg-only formula icu4c. This introduces linking errors for software that previously linked successfully in brew against boost 1.74.0 shared libraries (see #67427 and boostorg/boost_install#47). This adds a patch to the boost formula that has been merged upstream to limit the expansion of INTERFACE_LINK_LIBRARIES to boost's static libraries, so that the linking errors with shared libraries are resolved.
#67615 has been merged, so this should be fixed now. |
Indeed, the issue still exists. |
Are you sure? Have you done Because I just re-ran @Time0o's example, and it now works: https://github.com/carlocab/macos-boost1.75-regex-bug/runs/1644170782?check_suite_focus=true I also tested it locally, and it works for me too. If it's still not working for you, then you need to provide a minimum working example that can reproduce the error. |
Weirdly enough, I'm also still having this problem in the project where I originally discovered it and I don't know why since the minimal example now seems to be working. Does brew update update brew to the head of the current master branch? |
It should unless you've broken your local core repo somehow. What does |
Indeed, I have the same issue. The MWE works fine, but my larger project fails. |
As requested:
I'm still on Catalina, haven't upgraded to BigSur yet. May that be the issue?:
|
I don't think there's anything actionable here until:
|
I don't think so, as the GitHub runners for the MWE were running Catalina. |
Maybe this is related to another boost library? I'm using |
EDIT: the repo is this one, I'm probably overlooking something simple. @carlocab: I still haven't gotten my hands on a mac so this is in a fresh GitHub Actions vm, after
|
Ok, no obvious explanations there, unfortunately. Looks like we're back to needing a simple way to reproduce the bug. |
I think I found it, it seems CMake is the culprit. I'm using it to build my environment, and
I checked manually removing the forced So, I guess we need to fill a bug for the CMake package now :-) |
BTW, it seems to happen only in the static libraries (which are the ones I'm using to avoid having to distribute the dynamic ones). |
I can confirm that this happens when |
Hmm, I see. Can you update the original issue filed with boost? boostorg/boost_install#47 Or, perhaps, open a new one. Feel free to ping me if they create another patch to fix it. |
I don't quite understand what the root of the issue is, Boost linking against these dependencies when linking statically is intentional, it's just that they're not found on MacOS. Is this now a problem with Boost's |
I think you're having trouble finding them on macOS because
|
The problem is that, for an unknown reason, that changed in CMake 3.19.2, making that something that used to work stopped doing it. I guess there's no reason to change the LIBRARY_PATH setting if nothing has changed in your side. |
Yea, CMake usually does a good (sometimes too good) job of finding Homebrew dependencies. I don't see why |
I don't think it was a change in cmake 3.19.2; I believe it was a change in boost that was included in the 1.75.0 release (boostorg/boost_install@0e39586); see also the comments in boostorg/boost_install#47 (comment) |
I checked that setting Also tested successfully locally. |
Bug report
Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.
brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew gist-logs <formula>
(where<formula>
is the name of the formula that failed) and included the output link?brew gist-logs
didn't work: ranbrew config
andbrew doctor
and included their output with your issue?What you were trying to do (and why)
I simply upgraded boost to 1.75.0 using
brew upgrade
What happened (include command output)
An application depending on boost no longer compiles successfully, now it returns:
ld: library not found for -licudata
Command output
What you expected to happen
To keep the behavior when boost 1.74.0 was installed.
Step-by-step reproduction instructions (by running
brew install
commands)brew upgrade
Recompile any application using Boost::regex library
The text was updated successfully, but these errors were encountered: