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

PCL vcpkg integrate install didn't work #2323

Closed
danieltak opened this issue Dec 7, 2017 · 11 comments
Closed

PCL vcpkg integrate install didn't work #2323

danieltak opened this issue Dec 7, 2017 · 11 comments
Labels
requires:repro The issue is not currently repro-able

Comments

@danieltak
Copy link

Problem

I was learning PCL on Ubuntu, however, since the program must be created for Windows, i am trying to learn how to use on Visual Studio 2015. So vcpkg was used to install as a package manager.

After the installation, vcpkg integrate install command was written. I tried to test PCL with a sample code. However, this error code was displayed:

Error C1083 Cannot open include file: 'pcl/io/pcd_io.h': No such file or directory pcl-teste

The Environment Variable Path ;C:/PCL/vcpkg was added.

TL;DR

I installed PCL with this Tutorial , going to explain how.

How was installed

Using vcpkg install pcl:x64-windows-static

Had an issue:

CMake Error at ports/msmpi/portfile.cmake:56 (message):
Could not find:
C:\Program Files/Microsoft MPI/Bin/mpiexec.exe
Please install the MSMPI redistributable package before trying to install this port.
The appropriate installer has been downloaded to:
C:/vcpkg/downloads/MSMpiSetup-8.1.exe

Call Stack (most recent call first):
scripts/ports.cmake:72 (include)

Error: Building package msmpi:x64-windows-static failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with `.\vcpkg update`, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: msmpi:x64-windows-static
Vcpkg version: 0.0.100-2017-12-06-29163e1566403c371a5af48c8dbf3d96da32b8d1

Additionally, attach any relevant sections from the log files above.

So refering to this issue #1375 , it was solved by opening the directory below:

-> .\src\vcpkg\downloads

Then the msmpi is installed manually, opening this two files:

  • msmpisdk.msi
  • MSMpiSetup.exe

And with this fix, the PCL was installed.

Testing the installation

With the command vcpkg integrate install

This is the output:

Applied user-wide integration for this vcpkg root.

All MSBuild C++ projects can now #include any installed libraries.
Linking will be handled automatically.
Installing new libraries will make them instantly available.

And with vcpkg lists:

boost[core]:x64-windows-static 1.65.1-3         Peer-reviewed portable C++ source libraries
bzip2[core]:x64-windows-static 1.0.6-2          High-quality data compressor.
eigen3[core]:x64-windows-st... 3.3.4-2          C++ template library for linear algebra: matrices, vectors, numerica...
expat[core]:x64-windows-static 2.2.5            XML parser library written in C
flann[core]:x64-windows-static 1.9.1-7          Fast Library for Approximate Nearest Neighbors
freetype[core]:x64-windows-... 2.8.1-1          A library to render fonts.
glew[core]:x64-windows-static  2.1.0-1          The OpenGL Extension Wrangler Library (GLEW) is a cross-platform ope...
hdf5[core]:x64-windows-static  1.10.0-patch1-2  HDF5 is a data model, library, and file format for storing and manag...
jsoncpp[core]:x64-windows-s... 1.8.1-1          jsoncpp is an implementation of a JSON reader and writer in C++. JSO...
libiconv[core]:x64-windows-... 1.15             GNU Unicode text conversion
libjpeg-turbo[core]:x64-win... 1.5.2-2          libjpeg-turbo is a JPEG image codec that uses SIMD instructions (MMX...
liblzma[core]:x64-windows-s... 5.2.3-2          Compression library with an API similar to that of zlib.
libogg[core]:x64-windows-st... 1.3.2-cab46b1-3  Ogg is a multimedia container format, and the native file and stream...
libpng[core]:x64-windows-st... 1.6.34-2         libpng is a library implementing an interface for reading and writin...
libtheora[core]:x64-windows... 1.2.0alpha1-2... Theora is a free and open video compression format from the Xiph.org...
libxml2[core]:x64-windows-s... 2.9.4-2          Libxml2 is the XML C parser and toolkit developed for the Gnome proj...
lz4[core]:x64-windows-static   1.8.0-1          Lossless compression algorithm, providing compression speed at 400 M...
msmpi[core]:x64-windows-static 8.1              Microsoft MPI
msmpi[core]:x86-windows        8.1              Microsoft MPI
pcl[core]:x64-windows-static   1.8.1-8          Point Cloud Library (PCL) is open source library for 2D/3D image and...
proj4[core]:x64-windows-static 4.9.3-1          PROJ.4 library for cartographic projections
qhull[core]:x64-windows-static 2015.2-2         computes the convex hull, Delaunay triangulation, Voronoi diagram
szip[core]:x64-windows-static  2.1-2            Szip compression software, providing lossless compression of scienti...
tiff[core]:x64-windows-static  4.0.8-1          A library that supports the manipulation of TIFF image files
vtk[core]:x64-windows-static   8.0.1-5          Software system for 3D computer graphics, image processing, and visu...
zlib[core]:x64-windows-static  1.2.11-3         A compression library

So when i used Visual Studio 2015, on

"Project Properties > Linker > Input"

there is $(VcpkgRoot)lib\*.lib on Inherited Values of Additional Dependencies.

So i tried to build this sample PCL program:

#include <iostream>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>

int main(int argc, char** argv)
{
	pcl::PointCloud<pcl::PointXYZ> cloud;

	// Fill in the cloud data
	cloud.width = 5;
	cloud.height = 1;
	cloud.is_dense = false;
	cloud.points.resize(cloud.width * cloud.height);

	for (size_t i = 0; i < cloud.points.size(); ++i)
	{
		cloud.points[i].x = 1024 * rand() / (RAND_MAX + 1.0f);
		cloud.points[i].y = 1024 * rand() / (RAND_MAX + 1.0f);
		cloud.points[i].z = 1024 * rand() / (RAND_MAX + 1.0f);
	}

	pcl::io::savePCDFileASCII("test_pcd.pcd", cloud);
	std::cerr << "Saved " << cloud.points.size() << " data points to test_pcd.pcd." << std::endl;

	for (size_t i = 0; i < cloud.points.size(); ++i)
		std::cerr << "    " << cloud.points[i].x << " " << cloud.points[i].y << " " << cloud.points[i].z << std::endl;

	return (0);
}

With no success and an error message was displayed:

Error C1083 Cannot open include file: 'pcl/io/pcd_io.h': No such file or directory pcl-teste

@UnaNancyOwen
Copy link
Contributor

UnaNancyOwen commented Dec 8, 2017

I confirmed this problem.

@ras0219-msft @alexkaratarakis Can you give me some advice?
The reproduction procedure and this problems are as follows.

  1. Run vcpkg install pcl:x64-windows-static

  2. Run vcpkg integrate install

  3. Create a project using new project wizard of Visual C++.

  4. I was installed using x64-windows-static triplet, but these macros are set to x64-windows.
    In this case, I think these macros should be set to x64-windows-static.

    Macro Value Correct Value
    $(VcpkgRoot) C:\vcpkg\installed\x64-windows C:\vcpkg\installed\x64-windows-static
    $(VcpkgTriplet) x64-windows x64-windows-static

    2017-12-08_23h59_45

@UnaNancyOwen
Copy link
Contributor

@danieltak
Please install MSMPI as instructed by Vcpkg. It is a specification.
It is not problem. But, I think we need to consider other problem (about vcpkg integrate install) that you reported. Please wait for vcpkg team's comment.

@UnaNancyOwen
Copy link
Contributor

UnaNancyOwen commented Dec 8, 2017

scripts/buildsystems/msbuild/vcpkg.targets does not seem to support x64/x86-windows-static triplets.
That is the cause of this problem. I think it should be implement the settings for static triplets in this file.

@dimarusyy
Copy link

dimarusyy commented Dec 10, 2017

I have the same issue with VS2017 (v15.4.5) and x86-windows-static/x64-windows-static triplet.

PS D:\dev\vcpkg> .\vcpkg.exe list
boost[core]:x64-windows-static 1.65.1-3 Peer-reviewed portable C++ source libraries
boost[core]:x86-windows-static 1.65.1-3 Peer-reviewed portable C++ source libraries
bzip2[core]:x64-windows-static 1.0.6-2 High-quality data compressor.
bzip2[core]:x86-windows-static 1.0.6-2 High-quality data compressor.
c-ares[core]:x64-windows-st... 1.13.0-1 A C library for asynchronous DNS requests
c-ares[core]:x86-windows-st... 1.13.0-1 A C library for asynchronous DNS requests
cpprestsdk[core]:x64-window... 2.10.0 C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft ...
cpprestsdk[core]:x86-window... 2.10.0 C++11 JSON, REST, and OAuth library The C++ REST SDK is a Microsoft ...
grpc[core]:x64-windows-static 1.7.2 An RPC library and framework
grpc[core]:x86-windows-static 1.7.2 An RPC library and framework
openssl[core]:x64-windows-s... 1.0.2n OpenSSL is an open source project that provides a robust, commercial...
openssl[core]:x86-windows-s... 1.0.2n OpenSSL is an open source project that provides a robust, commercial...
protobuf[core]:x64-windows-... 3.5.0-1 Protocol Buffers - Google's data interchange format
protobuf[core]:x86-windows-... 3.5.0-1 Protocol Buffers - Google's data interchange format
websocketpp[core]:x64-windo... 0.7.0-1 Library that implements RFC6455 The WebSocket Protocol
websocketpp[core]:x86-windo... 0.7.0-1 Library that implements RFC6455 The WebSocket Protocol
zlib[core]:x64-windows-static 1.2.11-3 A compression library
zlib[core]:x86-windows-static 1.2.11-3 A compression library
PS D:\dev\vcpkg> .\vcpkg.exe integrate install
Applied user-wide integration for this vcpkg root.

All MSBuild C++ projects can now #include any installed libraries.
Linking will be handled automatically.
Installing new libraries will make them instantly available.

CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=D:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake"
PS D:\dev\vcpkg>

However, while trying a simple application in VS2017 including boost, I get compilation error :

1>------ Rebuild All started: Project: test_vcpkg_1, Configuration: Debug Win32 ------
1>stdafx.cpp
1>test_vcpkg_1.cpp
1>d:\temp\test_vcpkg_1\test_vcpkg_1\test_vcpkg_1.cpp(5): fatal error C1083: Cannot open include file: 'boost/filesystem.hpp': No such file or directory
1>Done building project "test_vcpkg_1.vcxproj" -- FAILED.
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

@danieltak
Copy link
Author

danieltak commented Dec 13, 2017

The same issue happened using:

# x64 dynamic link library
vcpkg install pcl:x64-windows

@dimarusyy
Copy link

dimarusyy commented Dec 13, 2017

I was able to make vcpkg to work after manually updating vcpkg.targets file (scripts\buildsystems\msbuild\vcpkg.targets) by changing "x86-windows" to "x86-windows-static" and "x64-windows" to "x64-windows-static".

@UnaNancyOwen
Copy link
Contributor

UnaNancyOwen commented Dec 13, 2017

@danieltak I think that x64-windows triplet doesn't reproduce this problem.
It is only occurs in triplet files that named other than x64-windows/x86-windows(/x64-uwp/x86-uwp/arm-uwp), because other triplet names are not defined in the targets file. Please see targets file.

I recommend editing and using triplet files that named x64-windows/x86-windows as @dimarusyy are saying. Probably, It will be integrated successfully.
Or, Please generate the project using CMake. I recommend this.

@Tai7sy
Copy link

Tai7sy commented Sep 18, 2018

same problem.

https://blogs.msdn.microsoft.com/vcblog/2016/11/01/vcpkg-updates-static-linking-is-now-available/
works for me

@JackBoosY JackBoosY added the requires:repro The issue is not currently repro-able label Feb 27, 2019
@JackBoosY
Copy link
Contributor

Hi everyone, thanks for reporting this issue!
Please open a new issue if this is still a problem for you.
Thx.

@petrasvestartas
Copy link

petrasvestartas commented Dec 16, 2019

Hi,

Could someone tell how can I install MSMPI?
Where to find the installation or how to correctly type install triplet?

@UnaNancyOwen some weeks ago I tried to install PCL using windows installer, but as you might remember the post, I could not do it.

I am currently trying to install PCL using .\vcpkg install pcl:x64-windows-static.
I would like to know how to do all the steps correctly in order to PCL on my Windows PC.

After installation I get error:

Error: Building package pcl:x64-windows-static failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: pcl:x64-windows-static
Vcpkg version: 2019.09.12-nohash

@JackBoosY
Copy link
Contributor

@petrasvestartas You can simply install msmpi using ./vcpkg install msmpi, and we have a PR to update it. See #8570.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires:repro The issue is not currently repro-able
Projects
None yet
Development

No branches or pull requests

6 participants