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

use vcpkg for all platforms #1648

Open
Tracked by #76
CAMOBAP opened this issue Oct 13, 2021 · 13 comments
Open
Tracked by #76

use vcpkg for all platforms #1648

CAMOBAP opened this issue Oct 13, 2021 · 13 comments
Assignees

Comments

@CAMOBAP
Copy link
Contributor

CAMOBAP commented Oct 13, 2021

Description

It will be nice to use vcpkg for all our platforms to reduce the amount of shell script

Expected Behavior

This will simplify and unify the build process

Actual Behavior

For now, we have a huge amount of shell scripts related to the compilation

@ronaldtse
Copy link
Contributor

Agree with @CAMOBAP on vcpkg, will streamline our dependency management. Let’s get this done.

@CAMOBAP
Copy link
Contributor Author

CAMOBAP commented Nov 12, 2021

@ronaldtse yep I already have some progress in this direction and will push first PR in next 1-2 days

@ronaldtse
Copy link
Contributor

ronaldtse commented Nov 12, 2021

Thank you @CAMOBAP! Sorry didn't know you were working on it already...

@CAMOBAP
Copy link
Contributor Author

CAMOBAP commented Nov 12, 2021

@ronaldtse for the next time I will add a comment that it's in progress, to not confuse others

In Progress

@CAMOBAP
Copy link
Contributor Author

CAMOBAP commented Nov 14, 2021

I am still in the middle, here are some findings which I have so far:

  • local I tested building dependencies as static libraries and shared libraries

For static deps:

  • vcpkg install --triplet x64-linux $(cat vcpkg.txt)
  • cmake -B ./build -DCMAKE_BUILD_TYPE=Release -DVCPKG_TARGET_TRIPLET=x64-linux -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake .

For shared deps:
Create proper triplet file ${VCPKG_ROOT}/triplets/x64-linux-dynamic.cmake with content:

set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)

set(VCPKG_CMAKE_SYSTEM_NAME Linux)
  • vcpkg install --triplet x64-linux-dynamic $(cat vcpkg.txt)
  • cmake -B ./build -DCMAKE_BUILD_TYPE=Release -DVCPKG_TARGET_TRIPLET=x64-linux-dynamic -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake .

All this above is just for information, I will automate this in CI anyway

@CAMOBAP
Copy link
Contributor Author

CAMOBAP commented Nov 16, 2021

microsoft/vcpkg#21461 - reported

@CAMOBAP CAMOBAP moved this from High priority to In Progress in Metanorma Nov 18, 2021
@CAMOBAP
Copy link
Contributor Author

CAMOBAP commented Nov 19, 2021

Quick status update:

I will wait for vcpkg's PR to approve before moving to other platforms

@CAMOBAP CAMOBAP moved this from In Progress to On hold in Metanorma Nov 19, 2021
@ronaldtse
Copy link
Contributor

Thanks @CAMOBAP !

@CAMOBAP
Copy link
Contributor Author

CAMOBAP commented Nov 21, 2021

The issue with centos7 openssl/openssl#16449 - which are probably not released yet. I will check if possible to not use openssl from vcpkg but use a system one

@ronaldtse
Copy link
Contributor

@CAMOBAP agree to use system OpenSSL on CentOS 7.

@CAMOBAP
Copy link
Contributor Author

CAMOBAP commented Nov 22, 2021

Just found that vcpkg has VCPKG_SYSTEM_LIBRARIES looks like exactly what we need

@CAMOBAP
Copy link
Contributor Author

CAMOBAP commented Nov 25, 2021

Just found that vcpkg has VCPKG_SYSTEM_LIBRARIES looks like exactly what we need

It's internal and doesn't allow to use system library instead portlet, thingking about other approach

@ronaldtse ronaldtse moved this to High priority in RNP Dec 17, 2021
@ronaldtse ronaldtse added this to RNP Dec 17, 2021
@ronaldtse
Copy link
Contributor

@CAMOBAP openssl/openssl#16449 has been merged, can we carry on with this task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: High priority
Development

No branches or pull requests

3 participants