pcl
pcl copied to clipboard
When compiling with CMake and VS2019, the operation fails with "Error in configuration process", missing files mm_malloc.h and other errors
Describe the bug
I am trying to get PCL installed and running fully for the first time. The only full-featured way seems to be to install via compiling it myself, and manually installing all the dependencies. In the last step, of compiling PCL with CMake, I get multiple errors that prevent compilation.
Context
I am trying to install PCL on my computer so I can use it in my own projects.
Expected behavior
I expected the source to compile correctly with CMake
Current Behavior
CMake returns the error "Error in configuration process, project files may be invalid".
To Reproduce 1: Follow the guides at https://pcl-tutorials.readthedocs.io/en/master/compiling_pcl_windows.html and https://gist.github.com/UnaNancyOwen/59319050d53c137ca8f3#file-pcl1-10-1-md (they are mutually supporting) to install the dependencies. Download PCL 1.10.1 last. 2: Extract the PCL .zip to the C:/ drive. By default, the folder directory will be C:/pcl-pcl-1.10.1 3: add a "build" folder within that C:/pcl-pcl-1.10.1 folder 4: open CMake. 5: set "Where is the source code" to C:/pcl-pcl-1.10.1 6: set "where to build the binaries" to C:/pcl-pcl-1.10.1/build 7: press Configure. 8: select Visual Studio 16 2019 as the generator 9: click Finish. 10: wait. After a short while, the compiler will present an error window. The CMakeError.log and CMakeOutput.log are attached
The same error behavior occurs with PCL version 1.11.1.
Screenshots/Code snippets
In order to help explain your problem, please consider adding
- screenshots of the GUI issues
CMakeError.log CMakeOutput.log
Your Environment (please complete the following information):
CMake version: 3.20.0-rc4. Operating System: Windows 10 Home, Build 19041. PCL versions (tested with several): 1.11.1, 1.10.1 Visual Studio: Visual Studio Community 2019, 16.5.0. CPU: Intel i7-8750H
Additional context
I would love to get PCL working on my machine so I can use it with my projects, and contribute to its own source, but I have not had much luck. After first installing with vcpkg (on a different computer; I started fresh with this one), I learned that I had to compile it myself in order to use the visualization libraries - so this is the last way I know of to install it. Any help is greatly appreciated, because I have a lot that I intend to contribute.
The screenshot hints that Eigen is not installed. Are you sure that you installed it correctly?
The screenshot hints that Eigen is not installed. Are you sure that you installed it correctly?
Thanks for the advice. The official guide says to "just download" the package, so I downloaded it from the Eigen website and unzipped it to my C: drive. But, the version of the package on the PCL Downloads Page (https://pointclouds.org/downloads/windows.html) is inaccessible, because that entire Downloads page ceased to exist. Eigen's own website said that it should be a "just download" as well. When I tried to use CMake on Eigen, as instructed in the UnaNancyOwen guide (https://gist.github.com/UnaNancyOwen/59319050d53c137ca8f3#file-pcl1-10-1-md), I get a number of errors just in that, but none of them prevent CMake from generating. If there's something specific I need to do with Eigen, I can't find any instructions on what to do with it, other than the ones from that UnaNancyOwen guide.
I was able to get the download for the PCL-provided version of Eigen from the WebArchive version of the Downloads page, and I installed that. But, I encounter the exact same error of missing mm_malloc.h, and that final error of Eigen from the screenshot still appears.
Can you please advise me on what I should be doing different with that package? Or the other issues from the cmake error log?
Yes, Eigen does not have to be compiled or anything, it is just necessary that the include files are in the correct directory.
PCL's FindEigen.cmake shows under which paths cmake will search for Eigen. I think you have to unzip the package under C:\Program Files
, so that C:\Program Files\Eigen\Core
exists. If that does not work, you might have to test some other combinations.
BTW the exact version of Eigen should not really matter: Eigen 3.3.7 will definitely work, but the newest Eigen 3.3.9 will very likely work too.
The thing about the missing mm_alloc.h is not really an error I think, that is just a test whether mm_alloc.h exists, but that should not stop PCL's build process.
Disclaimer: I am trying to help you as good as I can, but I haven't installed PCL on Windows so far, so my knowledge is somewhat limited.
Thanks, you are definitely helping and that got me to the next step, now it just has a problem finding Flann. I did a new, fresh build of Flann, and double-checked the environment variables, and I have it installed under both C:/ and C:/Program Files just to ensure it should be findable (because the environment variables point to the Program Files location), but CMake isn't finding Flann. I'm attaching a screenshot of the PCL build attempt which I think should manage to include everything onscreen. If you can offer any insight into this one, it will be hugely appreciated.
I tried rebooting my computer after all of this and doing the build again, just in case the environment variables required it, but the result is the same.
If you don't mind me asking, what version of PCL do you have installed, and what OS are you using? If this is easier to install on Linux, then I can start using Linux and try with that - it will at least let me get started, even if I need to re-climb the Linux learning curve.
Hey Chris
If you are using All-In-One installer, you can try follow this: https://github.com/PointCloudLibrary/pcl/issues/4462
I personally have installed all dependencies using VCPKG (only dependencies, not PCL). Remember to add the right triplet ie x64-windows.
Then I would clone PCL using git and use Cmake to generate VS projects. Here you need to supply path to the VCPKG cmake cross compile file - see VCPKG guides.
If you have trouble with VCPKG I can probably help you out.
Thanks larshg! That guide, https://github.com/PointCloudLibrary/pcl/issues/4462, is basically perfect and allowed me to install PCL and get it working.
But I want to keep this issue open because the existence of a user-made guide in an error report is very, very different from having an actual fix. The official documentation on both the website and readme really needs to be updated - especially considering that it depends on broken links. Meanwhile, the "getting started" guide gives no guidance for getting started whatsoever (it just tells you how to specify the dimensions of a pointcloud), and the walkthrough - the first item on the Tutorials page - is actually a comprehensive guide to the entire library. The walkthrough is great for a guide, but horrible as a way to get newbies started.
It would be helpful if the documentation or project stated its suggested environment - whatever is most common among the main contributors.
i have same question , so i want to get your idea to deal with this question
@MaskKevin The suggestion from larshg at https://github.com/PointCloudLibrary/pcl/issues/4659#issuecomment-801452079 essentially solved my installation issues, so I recommend following his comment and the link he provides. Those are better instructions than I could write.