From 0397da2a8fdb4449178238e64e7d6e58ff2f5f2a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 23 Apr 2020 00:02:10 +0200 Subject: [PATCH] Use ld --no-as-needed in Travis Ubuntu 18.04 wxGTK build This works around a problem in our build system which doesn't set rpath correctly when linking our own libraries, which means that "qa" library, for example, doesn't record the path to its "xml" library dependency. We already worked around this by linking any program using "qa" with "xml" too, however this doesn't do anything if "--as-needed" flag is in effect, as is the case by default under Ubuntu 18.04, so make our workaround work by forcefully disabling this flag. Real solution would be to use -Wl,-rpath correctly and then stop linking with "xml" library unnecessarily in e.g. test_gui bakefile. --- .travis.yml | 2 +- build/tools/travis-ci.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a849f64d20..4dbb33274a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ matrix: name: wxGTK 2 UTF-8 Ubuntu 18.04 - dist: bionic compiler: gcc - env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl --disable-webview" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11" wxUSE_XVFB=1 + env: wxGTK_VERSION=3 wxCONFIGURE_FLAGS="--enable-cxx11 --enable-stl --disable-webview" wxMAKEFILE_FLAGS="CXXFLAGS=-std=c++11 LDFLAGS=-Wl,--no-as-needed" wxUSE_XVFB=1 name: wxGTK 3 STL Ubuntu 18.04 - dist: bionic compiler: clang diff --git a/build/tools/travis-ci.sh b/build/tools/travis-ci.sh index 84d973f806..6f57b046ec 100755 --- a/build/tools/travis-ci.sh +++ b/build/tools/travis-ci.sh @@ -70,7 +70,7 @@ case $wxTOOLSET in echo 'Building tests...' && echo -en 'travis_fold:start:script.tests\\r' [ "$wxSKIP_GUI" = 1 ] || make -C tests $wxJOBS failtest - make -C tests $wxJOBS + make -C tests $wxJOBS $wxMAKEFILE_FLAGS echo -en 'travis_fold:end:script.tests\\r' echo 'Testing...' && echo -en 'travis_fold:start:script.testing\\r'