-
-
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
vcpkg vtkMapper::ImmediateModeRenderingOff declared deprecated #2545
Comments
@UnaNancyOwen @jasjuang does vcpkg provide 1.8.1 version, or current master? The problem should have been solved with #2112 and will be a part of 1.9.0 release soon. |
Using .\vcpkg list I found that pcl:x64-windows and pcl:x64-windows-static are version 1.8.1-11 as I thought. Ok, if the problem is solved. But is there a way to make it works since then? I just tried to comment the 2 lines in which the function appeared, but it seems to be a little wobbly :/ |
@KirbX You can install the current master in vcpkg by |
@jasjuang just to clarify, without |
@taketwo Yes without |
I had an error while installing pcl : Here's the screenshot about the error. I tried to download it again without the "--head" command and it worked like a charm just as yesterday (installation worked, of course, I still have the error about that vtk function) |
@KirbX I think @UnaNancyOwen would be the best person to help you here, but I will still try my best to help. Can you post the relevant error message in the log file? |
There is a recent PR about flann #2563 that got merged. Does this help? I think @claudiofantacci can also help you on the Windows side. |
PCL cannot find static FLANN under pcl/cmake/Modules/FindFLANN.cmake Lines 12 to 14 in 50ca79c
vcpkg installs static libraries in a different installation folder, instead of (say) installed/x64-windows in installed/x64-windows-static . From this folder the name of the libraries is the same of dynamic one, i.e. without the trailing _s .As a result the PCL FindFLANN needs to be adapted.
|
@jasjuang Thanks. I have no time for this issue because I'm busy for a while. I really appreciate your help. |
Yes, but @KirbX you need to update the patch file yourself, I guess. Anyway, because of this we have the following tradeoff:
IMHO it would be nice to address 1. |
I confirmed this problem. @claudiofantacci find_flann.patch#L16-L24 has already been included in the upstream head. Therefor, This patch doesn't apply when vcpkg install pcl with I propose an idea to separate this patch into the first half (remove _s from library name) and the second half (add search directory debug/lib). So, The first half part of patch that necessary for vcpkg will be applied when all case.
- set(FLANN_RELEASE_NAME flann_cpp_s)
- set(FLANN_DEBUG_NAME flann_cpp_s-gd)
+ set(FLANN_RELEASE_NAME flann_cpp)
+ set(FLANN_DEBUG_NAME flann_cpp-gd)
- PATH_SUFFIXES lib)
+ PATH_SUFFIXES lib debug/lib) What do you think? |
Any reason not to merge the second one directly into PCL? |
@taketwo The second one has already merged in master/head (FindFLANN.cmake#L43). However, It is necessary patch in PCL 1.8.1. |
Oh, I see, sorry. And vcpkg does not support different patch lists for the release and I hope we can release 1.9.0 very soon, at least I see no obstacles to doing so (@SergioRAgostinho do I miss anything?). Then vcpkg port can be immediately updated and this problem won't be relevant anymore. |
I was still trying to fix some last minute failures with Windows unit tests alongside @claudiofantacci . I was originally hoping they were quick fixes, but some of them are getting somewhat involved. I'm ok in abandoning that idea and simply release what we currently have. |
@KirbX @claudiofantacci I confirmed that it can be installed with following command by apply this pull request (microsoft/vcpkg#4528). Please try again. |
Hi! I'll be out of office pour something like 1 week. I'll try again when I'll come back! Thanks for your efforts! It is really pleasant to see that you works that hard on problems!! :) Thanks a lot! |
@UnaNancyOwen yes, but the first part of the patch should still be applied and it is not because the file on head changed and the second part was already integrated.
@taketwo unfortunately you can't. However I feel we can integrate a correction here in PCL by doing something like this: when an user uses
@SergioRAgostinho I agree as well, I can make some PR for the fixes I have at this time and you then choose which one you prefer to merge or postpone. Not a problem for me 😄 |
This could be accomplished via something like if(VCPKG_USE_HEAD_VERSION)
vcpkg_apply_patches(...)
endif() However, I'd be really suspicious of such a thing.
The variable is Generally, in vcpkg, we erase all link-time decisions that libraries need to make. This ensures that libraries are built in the configuration desired by the end user and don't end up with nasties like ODR violations. One of the common transforms to enable this is to rename libraries such that they always have a single name, completely removing the entire need for an Therefore, I'd recommend letting us always specify something like Alternatively, you could take the setting find_library(FLANN_LIBRARY_DEBUG
NAMES flann_cpp_s-gd flann_cpp-gd flann_cpp_s flann_cpp |
@ras0219-msft thanks for the information. I don't think I understand your recommendation against checking the BTW this reminded me of our long-standing plans to update the way linking requirements are specified/handled in CMake: #2089 (comment). |
We also try to not be special (though the irony is not lost on me ;p). The idea here is that while we're special in that static flann has the same name as shared flann, presumably shared flann is something you wanted to support in general (probably the result of that other issue you linked!). In this way, we hope to not be "special" and instead mesh seamlessly into functionality that you wanted to have anyway. Sorry if I'm not being clear about it; more concretely the objective is that you don't see vcpkg support as a burden. We want to minimize the upstream trouble of supporting vcpkg by meshing well into some reasonable configuration on your side that you would want to support anyway. In this example, it would be an option like However, if you find it easier/preferable to treat vcpkg specially then yes, using |
Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs. |
@PointCloudLibrary/testers-windows Could you try to go through this thread to see if this is still actionable? We have a |
I think the most correct action would be to rejoin the battle in this one microsoft/vcpkg#9810. And create PR that enables VCPKG to build flann both as static and dynamic, with originally named files. If not venturing into the VCPKG battle, then I guess we could search for I normally go for dynamic, but since looking into this, it seems that VCPKG only build static version and PCL doesn't complain for atm. |
Sorry for missing the obvious point, but since a lot of people are using PCL via vcpkg, what enhancement do the 2 options (either a bodge in PCL or upstream fix) provide over current status quo? |
It seems that this was for a previous version of PCL. VCPKG currently has PCL 1.9.1 and its removing the cmake FindFLANN file all together: https://github.com/microsoft/vcpkg/blob/69e86fd2013e0c495cc4e61500e794548b62ae03/ports/pcl/portfile.cmake#L16. In addition it adds a patch for FLANN https://github.com/microsoft/vcpkg/blob/69e86fd2013e0c495cc4e61500e794548b62ae03/ports/pcl/use_flann_targets.patch. So I think this one can just be closed. Edit: also the OP was not about flann, but a fix to VTK which was already underway :) |
Hi all!
I just installed PCL using vcpkg (windows 10, VS2017, x64-static). (And PCL version seems to be 1.8.1-11)
Everything went fine but when I tried to compile the "Using a matrix to transform a point cloud" Example, I get an error as mentionned in the Title :
"vtkMapper::ImmediateModeRenderingOff declared deprecated" from file pcl/visualization/pcl_vizualizer.h.
I only did a copy paste of the project and had this error (in fact, just by including the file pcl_visualizer.h).
Is there a way to correct this compilation error? Maybe replace ImmediateModeRenderingOff by something else?
The text was updated successfully, but these errors were encountered: