Skip to content

Move from Hunter to VCPKG#1170

Merged
moratom merged 137 commits into
v3_developfrom
v3_deps_cleanup
Nov 29, 2024
Merged

Move from Hunter to VCPKG#1170
moratom merged 137 commits into
v3_developfrom
v3_deps_cleanup

Conversation

@Serafadam
Copy link
Copy Markdown
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
Copy Markdown
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)

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
Copy Markdown
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
Copy Markdown
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

Comment thread .github/workflows/python-main.yml Outdated
fail-fast: false
env:
DEPTHAI_BUILD_BASALT: ON
# DEPTHAI_BUILD_BASALT: ON
Copy link
Copy Markdown
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
Copy Markdown
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

Comment thread .github/workflows/python-main.yml Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Comment thread .github/workflows/test.workflow.yml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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

Comment thread cmake/ports/spdlog/portfile.cmake Outdated
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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

Comment thread cmake/triplets/x64-linux.cmake Outdated
endif()

if(PORT MATCHES "opencv")
set(VCPKG_LIBRARY_LINKAGE dynamic)
Copy link
Copy Markdown
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
Copy Markdown
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
@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