-
Notifications
You must be signed in to change notification settings - Fork 96
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
Building with support for lCU breaks other Boost libs (e.g. Boost.FileSystem) #89
Comments
I can reproduce this, reduced command line is:
However, I suspect Boost.Regex is a bystander here, if I add
In any case we will need a Boost.Build expert to solve this one! |
I'm not an expert in Boost.Build but it seems that Boost.Log triggers the problem because it depends (by default) both on Boost.Regex and a few other Boost libraries, like Filesystem, DateTime, Thread, etc. It is those other dependent libraries are randomly mentioned in the error message, sometimes different from one run to another, depending on which ones are specified in the command line. It seems like Boost.Build doesn't propagate |
Since it looks like Boost.Regex will add |
The problem is the opposite; that it does propagate it. Log inherits the |
I'm assuming every target should have the same linkflags, regardless whether it uses ICU or not. Indeed, some linker flags need to be applied to every linking target. From Steven's response on the ML it sounds like Regarding using linkflags instead of variables, the latter are documented as the interface for customizing ICU location. The docs will need to be updated. |
I can confirm that building boost succeeds when omitting the If this is the desired solution, the documentation should indeed be changed as @Lastique already suggested. |
Creating a single root has at least two disadvantages I can think of; first, each library's usage requirements will propagate to every other, regardless of whether that other is a dependency. That is, at the moment Boost.Regex affects Filesystem through Log, with a single root it will affect all. Second, It seems to me that Regex shouldn't be setting |
For static libraries one has to propagate |
This should happen automatically when using |
Clearly I will fix this in whatever way will work. If all you need is to set custom include and library search paths then using Suggested changes and improvements welcome. Otherwise I don't really know what to do to fix this. |
I don't really know how this should be handled in an idiomatic Boost.Build manner; maybe @swatanabe knows and hasn't switched off his notifications. What I would do here is try to use the built-in For the libpath, either a common Not sure about the dll-path. |
I suppose the "right" way to do it is to add |
AMDG
On 10/15/19 12:01 PM, Peter Dimov wrote:
I suppose the "right" way to do it is to add `icu.jam` to the Boost.Build tools, along the lines of the existing https://github.com/boostorg/build/blob/develop/src/tools/zstd.jam or https://github.com/boostorg/build/blob/develop/src/tools/openssl.jam.
A bit more digging, shows that the problem is *not*
copying the file. Otherwise there are lots of other
properties that would cause problems. The actual cause
is that stage relinks executables and libraries when
their dll-path properties change. That's why only
the options that affect the linker show up in the error.
I don't think that making `icu.jam` will actually
help with this problem. If you need to set rpath
on boost_regex.so, there's currently no good way to
achieve it without using dll-path in the usage-requirements
which is what triggers this error in the first place.
The problem could be avoided if boost-install.jam didn't
use <install-dependencies>on and instead only directly
added libraries that have no corresponding stage target,
but that'll be quite a pain to implement.
In Christ,
Steven Watanabe
|
Thanks Steven. So the problem is that we need to pass This problem is actually not introduced by the commit adding Am I right in thinking that the correct fix here is to add a "requirements" parameter to
instead of putting the |
Update: what I suggested above doesn't work. When I implement it, the result is
That's presumably because libboost_regex.so installed by Regex has the I don't have any better ideas at this point. For reference, the changes I tried are boostorg/boost_install@3ebce82, boostorg/boost@f5fecfc, 1dc5c26. |
I've confirmed I can fix this by removing the dll-path property when ICI_LINK is set. Or I can fix by using macros to define possible custom names for the ICU libraries. The latter looks cleaner to me, but in the process of documenting this, I ran into another issue: What is the correct way to tell b2 where to look for external libraries? If I use
Then almost nothing gets built (only log and locale as far as I can see), should this not work? And should "search" be a documented feature? Alternatively
Add the options to the end of the command line (after all the object files) which I assume means that the library path will not be used when resolving symbols from those files? Or am I misunderstanding the -L option? I confess I can never remember which options are order specific :( |
I think that the right feature for setting the global library path is |
Either |
When building the latest Boost releases (starting with Boost 1.70.0) and enabling support for ICU Boost.Build first warns about an incompatible setting and later fails while compiling Boost.FileSystem because of different settings regarding support for ICU:
The warning points to line 97 in
libs/regex/build/Jamfile.v2
which seems problematic.And indeed, if I patch that file to never enable support for ICU in Boost.Regex building all of Boost succeeds.
Of course, this is not a solution, because I wanted ICU support compiled in. But it seems to have proven that the Jamfile of Boost.Regex somehow seems to be broken or at least incompatible.
For the sake of completeness, I used the following command when trying to build Boost:
The ICU libs that should be used are in the denoted location under
/opt/some/path/lib/x86_64-linux-gnu
.The text was updated successfully, but these errors were encountered: