Skip to content
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

Fix link order issue with boost #2236

Merged
merged 1 commit into from
Mar 1, 2018
Merged

Fix link order issue with boost #2236

merged 1 commit into from
Mar 1, 2018

Conversation

pixelb
Copy link
Contributor

@pixelb pixelb commented Mar 1, 2018

This could happen with any boost that was compiled
with -DBOOST_SYSTEM_NO_DEPRECATED. As of boost-1.66.0
that's the effective default, so the issue is more apparent.
In this case one get an undefined reference to
boost::system::system_category() as the 'system' module
is first in the link order, which will cause that as yet unused
symbol to be discarded by the linker.

Instead move the 'system' module to be the last in the link order
so that all references are resolved.

This was tested with cmake 3.5.2

This could happen with any boost that was compiled
with -DBOOST_SYSTEM_NO_DEPRECATED.  As of boost-1.66.0
that's the effective default, so the issue is more apparent.
In this case one get an undefined reference to
boost::system::system_category() as the 'system' module
is first in the link order, which will cause that as yet unused
symbol to be discarded by the linker.

Instead move the 'system' module to be the last in the link order
so that all references are resolved.

This was tested with cmake 3.5.2
@taketwo taketwo merged commit 52da14d into PointCloudLibrary:master Mar 1, 2018
@pixelb pixelb deleted the boost-1.66 branch March 1, 2018 23:36
@SergioRAgostinho SergioRAgostinho changed the title fix link order issue with boost Fix link order issue with boost Aug 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants