[英]Travis CI install boost from source log limitation error
It is for a while that I am working on a project and I want to build it on travis ci. 我正在从事一个项目一段时间,我想在travis ci上构建它。 My project has a dependency to boost-geometry
, so I tried the following travis.yml
我的项目对boost-geometry
有依赖性,所以我尝试了以下travis.yml
language: cpp
dist: Xenial
sudo: true
matrix:
include:
- os: linux
env:
- PYTHON=3.6
- CXX=g++-5
- CC=gcc-5
- CXXFLAGS = "$CXXFLAGS -std=c++14"
# - os: linux
# env: CONDA=3.6 CXX=g++ CC=gcc CXXFLAGS = "$CXXFLAGS -std=c++14"
# Boost
addons:
apt:
update: true
packages:
- libboost-all-dev
- g++-5
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- sudo apt-get install gcc-5 -y
- sudo apt-get install g++-5 -y
- sudo apt-get install libboost-all-dev -y
- sudo apt-get install python-pip python-dev build-essential
- sudo apt-get install python3-setuptools
- sudo apt-get install python3-pip
- sudo pip install --user --upgrade pip virtualenv
- sudo pip install --user setuptools
- sudo virtualenv -p python3 venv
- source venv/bin/activate
- sudo pip install pybind11
- sudo python3 -m pip install pybind11
- sudo python3 -m pip install --upgrade pip
- cd src
- ls
- cd ../
install:
- ls $TRAVIS_BUILD_DIR
- sudo python3 setup.py install
- sudo python3 setup.py sdist
- sudo pip install --verbose dist/*.tar.gz
script:
- python tests/test.py
In this file it gives me a error. 在这个文件中给我一个错误。 which indicates that this file is not installed as part of boost
geometry library. 表示此文件未作为boost
geometry库的一部分安装。
could not find boost/geometry/core/assert.hpp
So I decided to build boost from source. 因此,我决定从源头上建立动力。 I used the following file 我使用了以下文件
language: cpp
dist: Xenial
sudo: true
matrix:
include:
- os: linux
env:
- PYTHON=3.6
- CXX=g++-5
- CC=gcc-5
- CXXFLAGS = "$CXXFLAGS -std=c++14"
# - os: linux
# env: CONDA=3.6 CXX=g++ CC=gcc CXXFLAGS = "$CXXFLAGS -std=c++14"
# Boost
addons:
apt:
update: true
sources:
-boost-latest
packages:
- libboost-all-dev
- g++-5
before_install:
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- sudo apt-get install gcc-5 -y
- sudo apt-get install g++-5 -y
- sudo apt-get install libboost-all-dev -y
- sudo apt-get install python-pip python-dev build-essential
- sudo apt-get install python3-setuptools
- sudo apt-get install python3-pip
- wget https://sourceforge.net/projects/boost/files/boost/1.70.0/boost_1_70_0.tar.gz
- tar -xzvf boost_1_70_0.tar.gz
- cd boost_1_70_0
- sudo ./bootstrap.sh --prefix=/usr/local --with-libraries=all
- sudo ./b2 install
- sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/boost.conf'
- sudo ldconfig
- cd ../../
- sudo pip install --user --upgrade pip virtualenv
- sudo pip install --user setuptools
- sudo virtualenv -p python3 venv
- source venv/bin/activate
- sudo pip install pybind11
- sudo python3 -m pip install pybind11
- sudo python3 -m pip install --upgrade pip
- cd src
- ls
- cd ../
# Inform user that Boost 1.55 was successfully installed
# echo "Boost 1.55 was successfully installed."
install:
#- |
# if [ -n "$PYTHON" ]; then
# sudo apt-get install -qq g++-6
# sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 90
- ls $TRAVIS_BUILD_DIR
- sudo python3 setup.py install
- sudo python3 setup.py sdist
- sudo pip install --verbose dist/*.tar.gz
# elif [ -n "$CONDA" ]; then
# conda build conda.recipe
# conda install --use-local pydggrid
# fi
script:
- python tests/test.py
It starts to run but as boost writes logs travis raises the following error 它开始运行,但是当boost写入日志时,travis引发以下错误
The job exceeded the maximum log length, and has been terminated.
Well, what can I do to fix this issue? 好了,我该怎么做才能解决此问题? I looked for a flag to avoid boost generating that amount of logs but could not find any. 我在寻找一个标志,以避免boost生成大量日志,但是找不到任何日志。 I also tried to find a why to use apt-get
to install boost-geometry but did not get any chance to find proper package. 我还试图找到为什么使用apt-get
安装boost-geometry的原因,但是没有任何机会找到合适的软件包。 Can some one help me with this issue? 有人可以帮我解决这个问题吗? thanks 谢谢
well I ended up with this method 好吧,我最终使用了这种方法
- wget https://sourceforge.net/projects/boost/files/boost/1.70.0/boost_1_70_0.tar.gz -P $HOME
- cd $HOME
- tar -xzvf boost_1_70_0.tar.gz >/dev/null
and as boost is header only library I did not compile it, I just added its directory in include section of my make script 由于boost是仅标头的库,因此我没有对其进行编译,所以我在make脚本的include部分中添加了它的目录
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.