-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ubuntu 16.04 build for glibc >= 2.23. Or 2.14(!?)
objdump says we only need 2.14, and the cimbar binary runs on centos7... I see this as an absolute win
- Loading branch information
Showing
3 changed files
with
23 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,31 @@ | ||
#!/bin/sh | ||
# docker run --mount type=bind,source="$(pwd)",target="/usr/src/app" -it ubuntu:18.04 | ||
## targeting old glibc | ||
# docker run --mount type=bind,source="$(pwd)",target="/usr/src/app" -it ubuntu:16.04 | ||
|
||
cd /usr/src/app | ||
|
||
# https://gist.github.com/jlblancoc/99521194aba975286c80f93e47966dc5 | ||
apt update | ||
apt install -y software-properties-common | ||
add-apt-repository -y ppa:ubuntu-toolchain-r/test | ||
|
||
apt update | ||
apt install -y pkgconf g++ cmake | ||
apt install -y pkgconf g++-7 python-pip | ||
apt install -y libgles2-mesa-dev libglfw3-dev | ||
|
||
# cmake (via pip) | ||
python -m pip install cmake | ||
|
||
# use gcc7 | ||
update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-7 100 | ||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-7 100 | ||
|
||
cd opencv4/ | ||
mkdir build-portable/ && cd build-portable/ | ||
cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SHARED_LIBS=OFF -DOPENCV_GENERATE_PKGCONFIG=YES -DOPENCV_FORCE_3RDPARTY_BUILD=YES | ||
/usr/local/bin/cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_SHARED_LIBS=OFF -DOPENCV_GENERATE_PKGCONFIG=YES -DOPENCV_FORCE_3RDPARTY_BUILD=YES | ||
make -j5 install | ||
|
||
cd /usr/src/app | ||
mkdir build-portable/ && cd build-portable/ | ||
cmake .. -DBUILD_PORTABLE_LINUX=1 | ||
/usr/local/bin/cmake .. -DBUILD_PORTABLE_LINUX=1 | ||
make -j5 install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters