-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[cmake] Allow PCL to have non-static dependencies for static builds and vice-versa #4390
Conversation
I would rather remove the enforcing, after #1601 is fixed. |
I agree. Perhaps, we could even remove the enforcement right now, without waiting. Those who really need this enforcement could set |
Has there been progress on that? I saw that both that and another related issue have no new development |
I kinda gave up on it. So probably no... And soon we are on VTK9. @guban Are you on windows? |
I have both a Windows and a Linux machine, and I compile PCL from sources on both. |
What's the status here? Can we consider this for 1.12? |
I was able to compile a mixed static PCL with this on Linux using GCC 11.2 for Linux and also in a cross compiling setup with GCC 11.2 and MinGW-w64 9 from Linux to Windows. Works perfectly for me! The failed pipeline log is not available anymore. |
Could you do another push (something trivial or even just an empty commit)? I couldn't restart the CI |
I retriggered the pipelines with pull request #4980. All of them have run successfully. If no further changes are requested for the patch, it can be merged. On my systems, the patch has been working fine for two weeks in various configurations now. It doesn't matter if this pull request or #4980 are merged. Both contain the commit from @guban. The only difference is that in #4980 the current master was merged. |
Closing and reopening to rerun CI ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me.
The two failing CI checks can be ignored because they are old, the new checks passed.
I would rather merge this "original" pull request than the copy
Edit: part of this PR for PCL 1.12: microsoft/vcpkg#18855 VCPKG apparently don't like us changing the suffix to search for. |
This is a problem with the default behavior of PCL. Compiling with the here introduced The question is, should be change the current default behavior of PCL to make VCPKG happy? In this case we just would need to set the new option to Personally, I would completely remove the current default behavior. I am not aware of any other library that enforces |
So if I understood correctly, we have three options:
Option 1 preserves the current behaviour (which is nice), while options 2 and 3 do not. So to me options 2 sounds best. What do you think @larshg @kunaltyagi ? |
Set the default based on PCL version? My vote would be option 1 till 1.13 since it is possible to preserve behavior without significant effort This ensures any breaking behavior is delayed till a bigger milestone (and vcpkg can switch it on). Thoughts? |
So merge this PR now as it is, then create another PR after PCL 1.12.1 is released to make |
I also think this is the best solution. Merge now as is; new PR for 1.13 with option 2 or 3. |
I'm fine with removing the enforcement now. Since if we eventually allow usage of Shared/static on as default, we might as well allow it now. If people want to ensure to use either only static or shared libraries, they can supply CMAKE_FIND_LIBRARY_SUFFIXES themselves when calling Cmake. Since All-In-One installer now ships with shared VTK libraries, the chances that people will have shared PCL libraries, linked with Static VTK will probably be quite rare. VCPKG installs all libraries (if possible) as either static or shared, so users here will probably not mix them. And if there are some, who does it and experience the error running the tutorial, we already have an issue tracking it and a "solution". |
A side point is that this PR was created by guban, who has not been actively participating in the discussion lately. If we want to make more changes, we can switch to my copy #4980 or merge here as is and create a new PR. I think the second option is more convenient. Then we can discuss in the new PR whether to implement 2 or 3 of the above options and whether to target 1.12.1 or 1.13.0. |
IMO it is nicer to make such rather big changes in the "main" releases (1.13.0), even if it is not a change directly in PCL's API or ABI. With this PR in its current state, we would simply provide an option to turn the enforcing off.
Sure, but having one single switch/option to return to the old behaviour is still nice.
What about people who don't use the All-In-One installer or VCPKG? Could they experience problems? I don't know, probably not, but I would rather not risk it for PCL 1.12.1, for which we try to maximise the compatibility to 1.12.0. |
It's a go for merge? |
This is a conservative solution to #4377 that preserves the existing PCL behavior by default, but provides an option to allow finding static/shared dependencies while building PCL as a shared/static library.