Travis uses Ubuntu Trusty and the default libc++ version there is svn199600.
However I would like to test with different (newer) versions as I already do with different clang versions.
My current .travis.yml looks as follows:
language: generic
dist: trusty
sudo: required
matrix:
include:
- env: CXX=g++-7 CC=gcc-7
addons:
apt:
packages:
- g++-7
sources: &sources
- ubuntu-toolchain-r-test
- llvm-toolchain-precise
- llvm-toolchain-precise-3.9
- llvm-toolchain-precise-3.8
- llvm-toolchain-precise-3.7
- llvm-toolchain-precise-3.6
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main'
key_url: 'http://apt.llvm.org/llvm-snapshot.gpg.key'
- env: CXX=g++-6 CC=gcc-6
addons:
apt:
packages:
- g++-6
sources: *sources
- env: CXX=g++-5 CC=gcc-5
addons:
apt:
packages:
- g++-5
sources: *sources
- env: CXX=g++-4.9 CC=gcc-4.9
addons:
apt:
packages:
- g++-4.9
sources: *sources
- env: CXX=clang++-4.0 CC=clang-4.0
addons:
apt:
packages:
- clang-4.0
- libc++-dev
sources: *sources
- env: CXX=clang++-3.9 CC=clang-3.9
addons:
apt:
packages:
- clang-3.9
- libc++-dev
sources: *sources
- env: CXX=clang++-3.8 CC=clang-3.8
addons:
apt:
packages:
- clang-3.8
- libc++-dev
sources: *sources
- env: CXX=clang++-3.7 CC=clang-3.7
addons:
apt:
packages:
- clang-3.7
- libc++-dev
sources: *sources
- env: CXX=clang++-3.6 CC=clang-3.6
addons:
apt:
packages:
- clang-3.6
- libc++-dev
sources: *sources
script:
- ./build_and_test.sh
before_install:
- ./before_install.sh
Replacing libc++-dev with libc++-dev-3.9 for example does not help (still uses old library version), even when adding the following line:
- sourceline: 'deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main'
I also attempted to add the following to my before_install.sh without success (also still old library):
sudo apt-add-repository "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.9 main"
sudo apt-get update
sudo apt-get install -y libc++-dev libc++-helpers libc++1 libc++abi-dev lldb-3.9
How is it done correctly without building from source?
libc++-devfirst?LDFLAGS="-L /path/to/libary" LDLIBS="-l :libc++-dev-3.9.so"for example to find that lib in the path given to LDFLAGS (presuming it's a .so file, in any case because I use a colon preceding the name in LDLIBS, it must be the exact filename, so it may be .a if statically linked). I personally don't use travis, but the env lines looked like makefile stuff, and the above vars are used with Makefiles, so hope that works.