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

Move from Hunter to VCPKG #1170

Merged
merged 137 commits into from
Nov 29, 2024
Merged

Move from Hunter to VCPKG #1170

merged 137 commits into from
Nov 29, 2024

Conversation

Serafadam
Copy link
Contributor

@Serafadam Serafadam commented Nov 13, 2024

This PR introduces following changes:

  • All dependencies from Hunter have been moved to VCPKG
  • System dependencies (OpenCV, PCL) have also been moved to VCPKG
  • VCPKG caching in GH Actions
  • Manylinux image has been bumped to manylinux_2_28

Copy link
Collaborator

@moratom moratom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

Looking forward to get this in and say goodbye to Hunter :)

I left mostly nitpicks and questions, let's discuss on case by case basis what makes sense to address before merge and what we can split for later (for example moving as many packages as possible to stock)

@@ -44,7 +52,7 @@ jobs:
run: |
sudo apt update
python -m pip install --upgrade pip
sudo apt install libusb-1.0-0-dev libopencv-dev libpcl-dev
sudo apt install libusb-1.0-0-dev pkg-config bison autoconf libtool libxi-dev libxtst-dev libxrandr-dev libx11-dev libxft-dev libxext-dev nasm flex libudev-dev
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What VCPKG package needs these?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of these are needed for various dependencies of gtk which is required by opencv to use imshow etc. Nasm is required by ffmpeg. libudev is required by libusb

@@ -194,7 +204,10 @@ jobs:
python-architecture: [x64] # TODO(Morato) - re-enable x86 - it complains that OpenCV even though it's 32 bit is not compatible
fail-fast: false
env:
DEPTHAI_BUILD_BASALT: ON
# DEPTHAI_BUILD_BASALT: ON
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does not build anymore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must've commented out to speed up build, will reenable

@@ -388,30 +400,34 @@ jobs:
needs: build-docstrings
runs-on: ubuntu-latest
container:
image: mmorato/depthai-manylinux2014:0.4 # TODO(mmorato) temporary location, push to luxonis namespace
image: quay.io/pypa/manylinux_2_28_x86_64 # TODO(mmorato) temporary location, push to luxonis namespace
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
image: quay.io/pypa/manylinux_2_28_x86_64 # TODO(mmorato) temporary location, push to luxonis namespace
image: quay.io/pypa/manylinux_2_28_x86_64

Comment on lines 445 to 446

- name: Build and install depthai-core
run: |
cmake -S . -B build_core -D CMAKE_BUILD_TYPE=Release -D CMAKE_TOOLCHAIN_FILE=$PWD/cmake/toolchain/pic.cmake
cmake --build build_core --target install --parallel 4
echo "DEPTHAI_INSTALLATION_DIR=$PWD/build_core/install/" >> $GITHUB_ENV

- name: Append build hash if not a tagged commit
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed for a reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it was needed? Cache is now separate for each job

.github/workflows/test.workflow.yml Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current stock version has some issues, might get updated in the future

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This specific version is required by basalt so until that codebase is update unfortunately not

endif()

if(PORT MATCHES "opencv")
set(VCPKG_LIBRARY_LINKAGE dynamic)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How come we go with dynamic linking here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should likely also link libusb dynamically here

@moratom moratom merged commit 8e1ba73 into v3_develop Nov 29, 2024
35 checks passed
@moratom moratom deleted the v3_deps_cleanup branch November 29, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants