-
Notifications
You must be signed in to change notification settings - Fork 737
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
ppc cross compile #471
Merged
Merged
ppc cross compile #471
Changes from all commits
Commits
Show all changes
63 commits
Select commit
Hold shift + click to select a range
5ab5573
add powerpc crosscompile for hdf5
7a1371e
remove specific gcc version
9eb462f
fix build
f332350
should fix it..
e1fa17a
full opencv chain
b742aaf
try to fix deps
5f0b2cb
try to fix deps
1e420f7
add ffmpeg
df609ae
attempted fixes
567c135
attempted fixes
eeb040c
try fix ffmpeg
9ace4e0
add back gcc
682ad61
attempted fix
08593bd
attempted fix
2927164
try ffmpeg with ppc specific freetype
91fc906
more fix
cd175f7
more fix
485bf6b
more fix
04ab50e
switch ppc build to docker
e24152d
switch ppc build to docker
f1f700d
switch ppc build to docker
d3c25b0
update ppc
c23db75
update ppc
2844d9e
update ppc
c6184c8
fix jdk dep
175abb3
add general deps
e480aa4
add cmake
792204b
add more projects
9d6e266
specify ppc compiler
69e8825
improve compiler flag pass
b9c9e86
more fix
e318179
add all ppc cross
c85e3e8
more fixes
36705af
more fix
8c7335e
more fix
a16c087
more fix
fff44ac
fix ffmpeg
468b40b
merge upstream
12de081
quick tidy
vb216 2cf4565
test cache stage
vb216 9d1f8c4
test cache stage
vb216 5cfb44e
Merge remote-tracking branch 'upstream/master'
vb216 7cc48b8
merge upstream
vb216 954eaee
add pkg-config
vb216 31f94b2
add ppc64 cuda
vb216 59e0d64
add ppc64 cuda
vb216 87de5e4
work on cuda
vb216 2f22ec7
more cuda
vb216 2c7c0ac
find maven
vb216 3efd62a
add apt-utils
vb216 21065d9
switch ppc to openjdk due to license
vb216 ba5e29f
hopefully final fix for cuda build
vb216 2a4d2df
Merge remote-tracking branch 'upstream/master'
vb216 0247b55
pull upstream
vb216 f822764
symlink cuda.so stub
ffd41cc
merge
vb216 06d4afb
properly merge opencv this time
vb216 fb27bbe
add cpp11 definition for tesseract
vb216 0e6627b
final tidy up
vb216 37f5608
Improve Leptonica and Tesseract builds
saudet 95bf3c5
Clean up builds
saudet 565553b
Fix builds for Leptonica and Tesseract
saudet fd27d50
Clean up install-ppc.sh
saudet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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 |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#!/bin/bash | ||
set -vx | ||
#export | ||
|
||
mkdir ./buildlogs | ||
mkdir $TRAVIS_BUILD_DIR/downloads | ||
ls -ltr $HOME/downloads | ||
ls -ltr $HOME/.m2 | ||
pip install requests | ||
export PYTHON_BIN_PATH=$(which python) # For tensorflow | ||
touch $HOME/vars.list | ||
|
||
export BUILD_COMPILER=-Djavacpp.platform.compiler=powerpc64le-linux-gnu-g++ | ||
|
||
echo "Starting docker for ppc cross compile" | ||
docker run -d -ti -e CI_DEPLOY_USERNAME -e CI_DEPLOY_PASSWORD -e "container=docker" -v $HOME:$HOME -v $TRAVIS_BUILD_DIR/../:$HOME/build -v /sys/fs/cgroup:/sys/fs/cgroup ubuntu:xenial /sbin/init | ||
DOCKER_CONTAINER_ID=$(docker ps | grep xenial | awk '{print $1}') | ||
echo "Container id is $DOCKER_CONTAINER_ID please wait while updates applied" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "apt-get update" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "apt-get -y install apt-utils software-properties-common pkg-config openjdk-8-jdk maven python python-dev python-numpy gfortran-powerpc64le-linux-gnu gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu gfortran-powerpc64le-linux-gnu linux-libc-dev-ppc64el-cross binutils-multiarch swig git file wget unzip tar bzip2 patch automake make libtool perl nasm yasm curl cmake" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "dpkg --add-architecture ppc64el" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec 'add-apt-repository "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports xenial main restricted universe multiverse"' | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec 'add-apt-repository "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports xenial-updates main restricted universe multiverse"' | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec 'add-apt-repository "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports xenial-backports main restricted universe multiverse"' | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec 'add-apt-repository "deb [arch=ppc64el] http://ports.ubuntu.com/ubuntu-ports xenial-security main restricted universe multiverse"' | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "apt-get update" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "apt-get -y install libasound2-dev:ppc64el libusb-dev:ppc64el libusb-1.0-0-dev:ppc64el zlib1g-dev:ppc64el libxcb1-dev:ppc64el" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "apt-get -y install libcairo2-dev:ppc64el libpango1.0-dev:ppc64el libglib2.0-dev:ppc64el libatk1.0-dev:ppc64el libperl-dev:ppc64el libqt4-dev:ppc64el libgtk2.0-dev:ppc64el gir1.2-atk-1.0:ppc64el gir1.2-gtk-2.0:ppc64el gir1.2-pango-1.0:ppc64el libgdk-pixbuf2.0-dev:ppc64el gir1.2-gdkpixbuf-2.0:ppc64el gir1.2-freedesktop:ppc64el gir1.2-glib-2.0:ppc64el libgirepository-1.0-1:ppc64el" | ||
|
||
if [[ "$PROJ" =~ cuda ]]; then | ||
echo "Setting up for cuda build" | ||
#cp /usr/include/cudnn.h /usr/local/cuda/include/ | ||
python $TRAVIS_BUILD_DIR/ci/gDownload.py 0B2xpvMUzviShdFlrT3FtNXFSRW8 $HOME/downloads/cudappc64.tar | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "tar xvf $HOME/downloads/cudappc64.tar -C /usr/local/" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "ln -s /usr/local/cuda-9.0 /usr/local/cuda" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/libcuda.so" | ||
python $TRAVIS_BUILD_DIR/ci/gDownload.py 0B2xpvMUzviShdFJveFVxWlF3UnM $HOME/downloads/cudnnppc64.tar | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "tar xvf $HOME/downloads/cudnnppc64.tar -C /usr/local/" | ||
fi | ||
|
||
echo "Running install for $PROJ" | ||
echo "container id is $DOCKER_CONTAINER_ID" | ||
if [[ "$PROJ" =~ tensorflow ]] || [[ "$PROJ" =~ openblas ]]; then | ||
echo "redirecting log output, tailing log every 5 mins to prevent timeout.." | ||
while true; do echo .; docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "tail -10 $HOME/build/javacpp-presets/buildlogs/$PROJ.log"; sleep 300; done & | ||
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then | ||
echo "Not a pull request so attempting to deploy using docker" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets;mvn deploy -U -Djavacpp.copyResources --settings ./ci/settings.xml -Dmaven.test.skip=true -Dmaven.javadoc.skip=true $BUILD_COMPILER $BUILD_ROOT -Djavacpp.platform=$OS -l $HOME/build/javacpp-presets/buildlogs/$PROJ.log -pl .,$PROJ"; export BUILD_STATUS=$? | ||
else | ||
echo "Pull request so install using docker" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets;mvn install -U --settings ./ci/settings.xml -Djavacpp.copyResources -Dmaven.test.skip=true $BUILD_COMPILER $BUILD_ROOT -Dmaven.javadoc.skip=true -Djavacpp.platform=$OS -l $HOME/build/javacpp-presets/buildlogs/$PROJ.log -pl .,$PROJ"; export BUILD_STATUS=$? | ||
fi | ||
else | ||
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then | ||
echo "Not a pull request so attempting to deploy using docker" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets;mvn deploy -U -Djavacpp.copyResources --settings ./ci/settings.xml -Dmaven.test.skip=true -Dmaven.javadoc.skip=true $BUILD_COMPILER $BUILD_ROOT -Djavacpp.platform=$OS -pl .,$PROJ"; export BUILD_STATUS=$? | ||
if [ $BUILD_STATUS -eq 0 ]; then | ||
echo "Deploying platform" | ||
for i in ${PROJ//,/ } | ||
do | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec "cd $HOME/build/javacpp-presets/$i; mvn -U -f platform/pom.xml -Djavacpp.platform=$OS --settings ../ci/settings.xml deploy"; export BUILD_STATUS=$? | ||
if [ $BUILD_STATUS -ne 0 ]; then | ||
echo "Build Failed" | ||
exit $BUILD_STATUS | ||
fi | ||
done | ||
fi | ||
|
||
else | ||
echo "Pull request so install using docker" | ||
docker exec -ti $DOCKER_CONTAINER_ID /bin/bash -xec ". $HOME/vars.list; cd $HOME/build/javacpp-presets;mvn install -U --settings ./ci/settings.xml -Djavacpp.copyResources -Dmaven.test.skip=true -Dmaven.javadoc.skip=true $BUILD_COMPILER $BUILD_ROOT -Djavacpp.platform=$OS -pl .,$PROJ"; export BUILD_STATUS=$? | ||
fi | ||
fi | ||
echo "Build status $BUILD_STATUS" | ||
if [ $BUILD_STATUS -ne 0 ]; then | ||
echo "Build Failed" | ||
echo "Dump of config.log output files found follows:" | ||
find . -name config.log | xargs cat | ||
exit $BUILD_STATUS | ||
fi | ||
|
||
|
||
docker stop $DOCKER_CONTAINER_ID | ||
docker rm -v $DOCKER_CONTAINER_ID | ||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you create that
cudappc64.tar
? Maybe we can just put the few commands for this here...