https://github.com/piotrpdev/opencv-compile
OpenCV Building Experiments
https://github.com/piotrpdev/opencv-compile
Last synced: 4 months ago
JSON representation
OpenCV Building Experiments
- Host: GitHub
- URL: https://github.com/piotrpdev/opencv-compile
- Owner: piotrpdev
- Created: 2024-12-26T23:36:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-12T15:40:47.000Z (about 1 year ago)
- Last Synced: 2026-02-07T18:59:29.349Z (4 months ago)
- Language: Dockerfile
- Homepage:
- Size: 1.23 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OpenCV Building Experiments
> [!NOTE]
> If targeting `musl`, need to compile `ffmpeg` using `musl` which is a pain.
```bash
docker build -f ubuntu-22.04-opencv-full-build.Dockerfile --progress=plain . &> logs/build_ffmpeg8.log
docker build -f ubuntu-22.04-opencv-full-build.Dockerfile --no-cache-filter frontend .
docker run --rm -it 7e1ce6336850 /bin/bash -c "cd /root/oko/backend/ && cargo build --quiet --release && /usr/bin/ldd /root/oko/backend/target/release/oko" >> latest.txt
# https://github.com/rust-lang/rust/issues/78210#issuecomment-1502275713
RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target x86_64-unknown-linux-gnu
# https://stackoverflow.com/questions/73610525/how-to-find-out-which-rust-dependency-added-a-dynamically-linked-library
cargo clean && cargo build -vv 2>/dev/null | grep 'rustc-link-lib'
docker build -f different-musl.Dockerfile --progress=plain . &> "diff_musl/different-musl_$(date +"%Y-%m-%d_%H-%M-%S").log"
```
Tried adding `-D CMAKE_SHARED_LINKER_FLAGS="-static -static-libgcc -static-libstdc++"` to CMake command but `libstdc++` was still there.