vcpkg setup errors on command line - c++

I am trying to compile dlib 19.4 using the vcpkg tool
since I am having trouble compiling CMAKE and working with Boost.Python
to fix compiler issues for dlib.
Though I am having problems even running the basic steps
to get the vcpkg package to work:
(I also downloaded Visual Studio 2017 for this tool)

Looking at executed command (git init), you initialized empty git repository for vcpkg - that is likely wrong. This bootstrap.ps1 script fails internally when trying to fetch existing revisions. vcpkg doesn't want to reside in just any git repository, it wants "its" git repository. vcpkg uses git as a distribution platform and later to perform updates.
So instead, you should clone vcpkg repository to some directory, e.g.:
C:\test>git clone https://github.com/Microsoft/vcpkg.git vcpkg_test
Cloning into 'vcpkg_test'...
...
Checking out files: 100% (876/876), done.
C:\test>cd vcpkg_test
C:\test\vcpkg_test>powershell -exec bypass scripts\bootstrap.ps1
https://github.com/Microsoft/vcpkg/
Additionally I see errors regarding VS2017 C++ support. VS2017 is an IDE with multiple optionally supported languages (i.e. you could have only C# support installed). Please make sure you have "Desktop development with C++" workload installed - as vcpkg is for C++. You can update the installation at any time by running installer again (Modify).
https://learn.microsoft.com/en-us/visualstudio/install/install-visual-studio

Related

libgit2 dependency pcre not present in build

I'm building a C++ app which uses the libgit2 library to interact with a git repo. I've installed libgit2 through vcpkg, which also installed the pcre library which libgit2 needs. So far, so good. When I build my project there is no issue, only when I launch the app it throws an error that pcre.dll is not present. This is correct, pcre.dll isn't in my output folder as none of my code has any interaction with it. Libgit2 needs it.
How can I get the dependency of the dependency to be included in my final build?
Pcre is present and accounted for, but none of my code uses it so it doesn't get included in the build of my app. The git2.dll does get included with the build. The paths that need to be added to Visual Studio are there, managed by vcpkg. Everything is setup so that pcre could be included in a build if need be.
I use libgit2 v 1.1.0, Visual Studio 2019 and the latest stable version of vcpkg.
I'm running into the same issue and have opened a PR: https://github.com/microsoft/vcpkg/pull/18289
Based on Neumann-A's feedback in the PR, it looks like there may be a bug preventing the pcre DLL from getting copied to the release/deployment files. For now, you're welcome to use my vcpkg fork which exposes the "builtin" REGEX_BACKEND CMake option, which works around this problem. https://github.com/motevets/vcpkg/tree/fix-libgit2

How to remove vcpkg and all libraries installed with vcpkg

How does one completely remove vcpkg and all installations/system changes made by it?
I recall seeing some FAQ about vcpkg where it said that you could just delete the vcpkg folder. However, I've been trying to find that same FAQ for over an hour now, to no avail. Also "just delete the folder" being the solution seems implausible to me, since I would assume vcpkg changes some environment variables or other settings, as well as the integration with Visual Studio that I was trying to use. Online search on this topic only yielded people discussing how to remove multiple installed libraries at once, with no clear solution even to that problem (I would be interested in this as well). The vcpkg website itself seems to offer no answers to this question.
edit: I found the page saying "just delete the folder" at docs.microsoft.
The documentation page https://learn.microsoft.com/en-us/cpp/build/vcpkg offers the instruction how to uninstall:
Uninstall vcpkg
Just delete the directory.
It could also mention that removing the vcpkg directory completely actually uninstalls all the installed libraries (all ports), because the vcpkg directory is the sole place where vcpkg.exe deploys any files.
Additionally, if you did run vcpkg integrate install, then you may also run vcpkg integrate remove to remove the user-wide (global) integration.
vcpkg integrate remove Remove user-wide integration

Adding binaries to other peoples conan recipes

I'm using given conan packages
gtest/1.8.0#bincrafters/stable
boost/1.66.0#conan/stable
log4cplus/2.0.2#bincrafters/stable`
and clang (version at least 6.0).
While first two packages has binaries for clang 6.0, log4cplus doesn't (last is clang 3.9). I don't like the idea that on each workstation I would need to build this package by hand.
How can I upload localy build binary with clang 6.0?
conan upload looks promising, however it suggest that it will be NEW package. Second question - wouldn't I interfere with package author in any way?
I do recommend open an issue for Bincrafters, requesting clang 3.9 support: https://github.com/bincrafters/community/issues/
Include a new package configuration is just one line in the Travis recipe.
How can I upload localy build binary with clang 6.0?
You could use JFrog Artifactory, there is a Community Edition with Conan support. Also, you could create a "mirror" for your packages locally with Artifactory, instead to download from Bintray:
https://docs.conan.io/en/latest/uploading_packages/artifactory_ce.html
However, Conan respects your remote list by it order, if your Conan client finds log4cplus first in Bincrafters' remote but the correct binary is only available in your local repository, Conan will ignore your local remote and will show a message error about missed binary package for log4cplus. Thus, in your case, you will need to copy ALL binaries to your local repository.
Regards!
You will find the conan packages installed on your Linux system at .conan/data/package_name/version/repo_name/tag. There will be a package folder inside it. If you want to manually add binaries to existing packages then you can add the binary in /bin folder in packages.
Or else you can look into the conan recipe in exports folder and look for the package, that from where it is getting its binaries from and add that binary in that path.

GL/glfw.h does not exist

I'm using Fedora 17 and compiling cocos2d-x. I've got an error at the compilation when I'm launching ./make-all-linux-project.sh.
G++ tells me that GL/glfw.h does not exist and then I yum install glew but it wasn't solved. So how can I solve this?
The package glew is actually the OpenGL Extension Wrangler. In this case your error is referring to a different package - GLFW. The problem with the build script you are trying to run is that it was made for deb-based systems, not rpm-based systems like Fedora. What's going to make this more difficult is that if you use YUM to download glfw and glfw-devel, they are not the version Cocos2d-x needs, so the build will fail. What you will need to do is first download a legacy version of glfw from Git Hub and build it from source.
git clone https://github.com/glfw/glfw-legacy.git
Once you build this package, you will need to modify the Cocos2d-x make file: $COCOS_ROOT/cocos2dx/proj.linux/cocos2dx.mk to include the legacy headers and also link to the legacy lib. The build should go smoothly after this, assuming all of your other dependencies are installed. You can refer to a blog post I put together for the detailed instructions: http://voidfuture.wordpress.com/2013/10/08/building-cocos2d-x-on-rhel-fedora-centos-linux/

How to build google google-breakpad for windows?

I am trying to build google breakpad for windows. I don't get it. I tried installed autoconf and m4 for Windows which seems to work. But running
m4 CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ./configure
results in
func_dirname ()
{
# Extract subdirectory from the argument.
func_dirname_result=NONE:0: m4: ERROR: EOF in string
after some seconds of executing scripts.
I searched form visual studio solution files, but they have been removed since revision 581.
So i found the related post
How to build google breakpad.
But how do i install gyp? What prerequisites does it require?
Or does anybody have a working (VC2005) sln file for all parts of google-breakpad ?
Can anybody give me a step by step description on how to build it?
This is really poorly explained in the documentation, but actually gyp is already present if you've done an ordinary checkout of breakpad. Open a command prompt and place yourself in the root ( google-breakpad-read-only if you're going by the instructions ). Then just do:
src\tools\gyp\gyp.bat src\client\windows\breakpad_client.gyp
This will generate visual studio sln files for you.
The latest master of breakpad (March 15th 2016) does not include gyp, which is used to generate the solution files. The best thing to do would be to simply check it out and install it; gyp does, however, require Python 2.7 so make sure Python is accessible in the path.
git clone https://chromium.googlesource.com/external/gyp
cd gyp
python setup.py install
Now your gyp installation will work; simply invoke gyp.bat on src\client\windows\breakpad_client.gyp. (gyp is checked out one directory below breakpad in my case; change it accordingly to your setup)
..\gyp\gyp.bat src\client\windows\breakpad_client.gyp --no-circular-check
The solution files should now be present.