Skip to content

Move libp11 dependency to tests only #2381

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

Merged

Conversation

MiguelBarro
Copy link
Contributor

@MiguelBarro MiguelBarro commented Dec 24, 2021

CMake always makes static libraries transitive targets even if they are marked as PRIVATE, that is, CMake will never bundle Fast-DDS static library with OpenSSL, tinyxml or pkcs11.

People have found ways to work around it through custom CMake commands see here.

We took an easier workaround on the third parties by including the actual sources into the Fast-DDS project.

The Bugfix plainly removes the Fast-DDS dependency because it's only useful on the tests. Note the OpenSSL engine loads the pkcs11 module dynamically thus no linking is required.

…he library dynamically through the OpenSSL engine.

Signed-off-by: Miguel Barro <[email protected]>
@MiguelBarro MiguelBarro force-pushed the backport/master/bugfix/windows_installer/static_linking branch from 26a88f0 to d978d30 Compare December 24, 2021 12:42
jsan-rt
jsan-rt previously approved these changes Dec 27, 2021
Copy link
Contributor

@jsan-rt jsan-rt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@MiguelCompany MiguelCompany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems target_link_libraries also adds the include directory of the linked target, so removing it is making the build fail with Cannot open include file: 'libp11.h': No such file or directory (compiling source file C:\workspace\fastdds-manual-windows\b64998d6\src\fastrtps\src\cpp\rtps\security\SecurityPluginFactory.cpp)

I wonder why it is building correctly on other platforms, though.

@MiguelBarro
Copy link
Contributor Author

The problem is in the jenkins windows image. I will relaunch the windows testing once it is fixed.

@MiguelBarro
Copy link
Contributor Author

@richiprosima Please darling be so gentle to test Windows for me 😎

Signed-off-by: Miguel Barro <[email protected]>
Copy link
Member

@MiguelCompany MiguelCompany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes seem ok now, but the build failed on Mac, as we don't have LibP11 installed on the CI.

@MiguelCompany
Copy link
Member

@richiprosima Please test Mac to check if I installed libp11 correctly

@MiguelBarro
Copy link
Contributor Author

@richiprosima Please test Mac again because we have modified CI's setup since the last push 🛠

@MiguelCompany
Copy link
Member

@richiprosima Please test Mac and test Windows

@MiguelCompany
Copy link
Member

@richiprosima Please test Mac

@MiguelCompany MiguelCompany added this to the v2.5.1 milestone Jan 21, 2022
Copy link
Member

@MiguelCompany MiguelCompany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is safe to merge this. CI has been correct for all the related tests.

@MiguelCompany MiguelCompany changed the title [13340] Bugfix/windows installer/static linking Move libp11 dependency to tests only Jan 21, 2022
@MiguelCompany MiguelCompany merged commit 9838a31 into master Jan 21, 2022
@MiguelCompany MiguelCompany deleted the backport/master/bugfix/windows_installer/static_linking branch January 21, 2022 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants