Closed wyatt-sfu closed 2 years ago
@wyatt-sfu possibly you are missing VCPKG_DIR
environment variable. From the windows-msvc.yml
GitHub workflow (which builds and works fine):
- name: Configure
env:
VCPKG_DIR: '${{ matrix.vcpkg_dir }}'
shell: bash
run: |
set -eux
mkdir build
cmake -B ./build -G "Visual Studio 16 2019" -A ${{ matrix.arch }} -DCMAKE_TOOLCHAIN_FILE=${{ matrix.vcpkg_dir }}\\scripts\\buildsystems\\vcpkg.cmake .
- name: Compile
shell: bash
run: cmake --build ./build --config "Release" -j 2
@ni4 I think I have figured out the issue. I did not need a VCPKG_DIR environment variable because the build tutorial uses VCPKG_ROOT.
However, the trick was to specify the x64-windows triplet when installing the VCPKG packages. So rather than
vcpkg install bzip2 zlib botan json-c getopt dirent python3[core]
,
I instead ran,
vcpkg install bzip2:x64-windows zlib:x64-windows botan:x64-windows json-c:x64-windows getopt:x64-windows dirent:x64-windows python3[core]:x64-windows
After this change, then running cmake and building rnp seems to have worked fine. I can run rnp.exe and rnpkeys.exe.
Thanks for writing back! Definitely, workflow has this line as well: vcpkg install --triplet ${{ matrix.triplet }} $(cat vcpkg.txt)
.
PR #1928 should update the documentations.
Thanks for the quick responses!
Description
While following the Windows build instructions in https://github.com/rnpgp/rnp/blob/master/docs/installation.adoc I am getting CMake failures with a couple of different error messages.
Steps to Reproduce
git clone https://github.com/Microsoft/vcpkg.git
vcpkg install bzip2 zlib botan json-c getopt dirent python3[core]
cmake -B . -G "Visual Studio 16 2019" -A x64 -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -DCMAKE_BUILD_TYPE=Release ../rnp
Versions
Results
CMake output: rnp_cmake_error.txt I have attached the CMake log as well: CMakeOutput.log vcpkg list: vcpkg_list.txt
A snippet from the output is: