From 44b2ca38b4d1a02a5f3dcbd8bf055cd42fc9650a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Tue, 8 May 2018 02:50:36 +0200 Subject: [PATCH 01/20] Travis: Use `ALL` as default value for `BINDINGS` --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 46181e47e4a..f267ec5b4d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -186,7 +186,7 @@ before_script: -GNinja -DBUILD_STATIC=OFF -DPLUGINS="${plugins:-ALL;-jni}" - -DBINDINGS="${bindings}" + -DBINDINGS="${bindings:-ALL}" -DENABLE_DEBUG=ON -DTOOLS="${tools:-ALL;}" -DINSTALL_SYSTEM_FILES=OFF From 2b5bcb17918098350cdc99fd25188975bed4bcf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Tue, 8 May 2018 10:52:54 +0200 Subject: [PATCH 02/20] Ruby: Disable `register` storage warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compiling Ruby’s source code produces warnings about deprecated 'register' storage class specifiers. --- src/bindings/swig/ruby/CMakeLists.txt | 4 +++- src/plugins/ruby/CMakeLists.txt | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/bindings/swig/ruby/CMakeLists.txt b/src/bindings/swig/ruby/CMakeLists.txt index bbd02e24bed..f51f3f073d8 100644 --- a/src/bindings/swig/ruby/CMakeLists.txt +++ b/src/bindings/swig/ruby/CMakeLists.txt @@ -56,7 +56,9 @@ else () set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-dynamic-class-memaccess") if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-unused-but-set-variable") - endif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") + endif () # add 'kdb' module if (CMAKE_VERSION VERSION_LESS 3.8) diff --git a/src/plugins/ruby/CMakeLists.txt b/src/plugins/ruby/CMakeLists.txt index 8c660940a1e..075bdc1863e 100644 --- a/src/plugins/ruby/CMakeLists.txt +++ b/src/plugins/ruby/CMakeLists.txt @@ -21,9 +21,13 @@ if (DEPENDENCY_PHASE) # we call this SWIG_COMPILE_FLAGS because we have the same variable in our swig bindings set (SWIG_COMPILE_FLAGS "-Wno-shadow -Wno-old-style-cast -Wno-unused-variable -Wno-unused-parameter -Wno-reserved-user-defined-literal") - if (NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang") + + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") + else (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-literal-suffix") - endif () + endif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set_source_files_properties ("ruby.cpp" PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}") elseif (NOT RUBY_FOUND) remove_plugin (ruby "ruby not found") From 8f39135afc95e444c6c2a23ed4f01572628d3baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Tue, 8 May 2018 15:46:10 +0200 Subject: [PATCH 03/20] Python 2: Disable `register` storage warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Compiling Python 2’s source code produces warnings about deprecated `register` storage class specifiers. --- src/bindings/swig/python2/CMakeLists.txt | 5 +++++ src/plugins/python2/CMakeLists.txt | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bindings/swig/python2/CMakeLists.txt b/src/bindings/swig/python2/CMakeLists.txt index 35636dac16d..65276b4e6c7 100644 --- a/src/bindings/swig/python2/CMakeLists.txt +++ b/src/bindings/swig/python2/CMakeLists.txt @@ -38,6 +38,11 @@ else () swig_link_libraries (swig-python2 elektra-core elektra-kdb ${PYTHON2_LIBRARIES}) set_target_properties (_swig-python2 PROPERTIES OUTPUT_NAME _kdb) + # Unfortunately compiling Python 2’s source code produces warnings about deprecated `register` storage class specifiers. + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") + endif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set_source_files_properties (${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -DSWIG_TYPE_TABLE=kdb") set (PYTHON_GET_MODULES_DIR_COMMAND diff --git a/src/plugins/python2/CMakeLists.txt b/src/plugins/python2/CMakeLists.txt index b2e01b88412..fc9aa131966 100644 --- a/src/plugins/python2/CMakeLists.txt +++ b/src/plugins/python2/CMakeLists.txt @@ -13,7 +13,10 @@ if (DEPENDENCY_PHASE) add_custom_command (OUTPUT runtime.h COMMAND ${SWIG_EXECUTABLE} -c++ -python -external-runtime runtime.h) # we call this SWIG_COMPILE_FLAGS because we have the same variable in our swig bindings - set (SWIG_COMPILE_FLAGS "-Wno-shadow -Wno-old-style-cast -Wno-unused-variable -Wno-deprecated-register") + set (SWIG_COMPILE_FLAGS "-Wno-shadow -Wno-old-style-cast -Wno-unused-variable") + if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") + endif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set_source_files_properties ("python.cpp" PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}") elseif (NOT PYTHON2LIBS_FOUND) remove_plugin (python2 "python 2 libs (libpython-dev) not found") From 96ca34941291df7e22e71bdf47381743740c9bb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Tue, 8 May 2018 12:55:16 +0200 Subject: [PATCH 04/20] Jenkinsfile: Fix minor spelling mistakes --- scripts/jenkins/Jenkinsfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/jenkins/Jenkinsfile b/scripts/jenkins/Jenkinsfile index fba2fba9cb4..089d744f6f7 100644 --- a/scripts/jenkins/Jenkinsfile +++ b/scripts/jenkins/Jenkinsfile @@ -18,7 +18,7 @@ // FIXME sloc publish errors // XXX add missing jobs -// TODO have a per plugin/binding deps in Dockerfile for easier maintanence +// TODO have a per plugin/binding deps in Dockerfile for easier maintenance // TODO add warnings plugins to scan for compiler warnings // TODO maybe intend with 2 lines to not waste so much ws @@ -118,7 +118,7 @@ BUILD_TARGET = determineBuildTarget() /***************************************************************************** * Main Stages * - * Serial stages that contain parallized logic. Only proceeds to the next + * Serial stages that contain parallelized logic. Only proceeds to the next * if previous stage did not fail. *****************************************************************************/ lock('docker-images') { @@ -215,7 +215,7 @@ def generate_fast_build_stages() { return tasks } -/* Generate Test stages for full tets coverage +/* Generate Test stages for full test coverage */ def generate_full_build_stages() { def tasks = [:] @@ -568,7 +568,7 @@ def trackCoverage(do_track, cl) { /* Run the passed closure in a docker environment * - * Automatically takes care of docker registry authentification, + * Automatically takes care of docker registry authentication, * selecting a docker capable node, * checkout of scm and * setting of useful Environment variables @@ -631,7 +631,7 @@ def cnokdbtest() { ctest("Test -LE kdbtests") } -/* Uploads ctest restults +/* Uploads ctest results */ def xunitUpload() { step([$class: 'XUnitBuilder', @@ -701,7 +701,7 @@ def dateFormatter(date) { * started for a PR by commenting "jenkins build jenkinsfile[REGEX] please" * The optional REGEX determines if all stages should be build or only a * selection of them. - * To build only fast builds one would commenet "jenkins build + * To build only fast builds one would comment "jenkins build * jenkinsfile[.*-fast] please". * NOTE: none complete builds are automatically set to UNSTABLE which reports * as a test failure on github. From 25920b01242c320da23325df5c872dcdb6a50f35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Tue, 8 May 2018 12:59:16 +0200 Subject: [PATCH 05/20] Tests: Fix warning about catching polymorphic type --- src/bindings/cpp/tests/testcpp_key.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bindings/cpp/tests/testcpp_key.cpp b/src/bindings/cpp/tests/testcpp_key.cpp index 219960c8554..8dbab654182 100644 --- a/src/bindings/cpp/tests/testcpp_key.cpp +++ b/src/bindings/cpp/tests/testcpp_key.cpp @@ -362,7 +362,7 @@ TEST (key, exceptions) { test.setName ("no"); } - catch (kdb::KeyInvalidName) + catch (kdb::KeyInvalidName &) { succeed_if (test.getName () == "", "not set to noname"); } @@ -374,7 +374,7 @@ TEST (key, exceptions) { test.setName ("no"); } - catch (kdb::KeyInvalidName) + catch (kdb::KeyInvalidName &) { succeed_if (test.getName () == "", "not set to noname"); } From cc56b02d2abda96b9f681b6d29cd36d5db053662 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Tue, 8 May 2018 13:00:42 +0200 Subject: [PATCH 06/20] Tests: Use `const` qualifier in exception handler --- src/bindings/cpp/tests/testcpp_key.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bindings/cpp/tests/testcpp_key.cpp b/src/bindings/cpp/tests/testcpp_key.cpp index 8dbab654182..8f89d679c6c 100644 --- a/src/bindings/cpp/tests/testcpp_key.cpp +++ b/src/bindings/cpp/tests/testcpp_key.cpp @@ -362,7 +362,7 @@ TEST (key, exceptions) { test.setName ("no"); } - catch (kdb::KeyInvalidName &) + catch (kdb::KeyInvalidName const &) { succeed_if (test.getName () == "", "not set to noname"); } @@ -374,7 +374,7 @@ TEST (key, exceptions) { test.setName ("no"); } - catch (kdb::KeyInvalidName &) + catch (kdb::KeyInvalidName const &) { succeed_if (test.getName () == "", "not set to noname"); } From d1d7ca61cde54c04c062176b06f34d5b39771d9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Tue, 8 May 2018 14:16:19 +0200 Subject: [PATCH 07/20] Python: Disable warnings about incorrect casts --- src/bindings/swig/python/CMakeLists.txt | 4 ++++ src/bindings/swig/python2/CMakeLists.txt | 7 +++++-- src/plugins/python/CMakeLists.txt | 4 ++++ src/plugins/python2/CMakeLists.txt | 4 +++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/bindings/swig/python/CMakeLists.txt b/src/bindings/swig/python/CMakeLists.txt index d7d9b5c660d..6678f07b2da 100644 --- a/src/bindings/swig/python/CMakeLists.txt +++ b/src/bindings/swig/python/CMakeLists.txt @@ -38,6 +38,10 @@ else () swig_link_libraries (swig-python elektra-core elektra-kdb ${PYTHON_LIBRARIES}) set_target_properties (_swig-python PROPERTIES OUTPUT_NAME _kdb) + # Unfortunately compiling Python’s source code produces warnings about casts between incompatible function types. + if (CMAKE_COMPILER_IS_GNUCXX) + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type") + endif (CMAKE_COMPILER_IS_GNUCXX) set_source_files_properties (${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -DSWIG_TYPE_TABLE=kdb") set (PYTHON_GET_MODULES_DIR_COMMAND diff --git a/src/bindings/swig/python2/CMakeLists.txt b/src/bindings/swig/python2/CMakeLists.txt index 65276b4e6c7..d5491abedfe 100644 --- a/src/bindings/swig/python2/CMakeLists.txt +++ b/src/bindings/swig/python2/CMakeLists.txt @@ -38,10 +38,13 @@ else () swig_link_libraries (swig-python2 elektra-core elektra-kdb ${PYTHON2_LIBRARIES}) set_target_properties (_swig-python2 PROPERTIES OUTPUT_NAME _kdb) - # Unfortunately compiling Python 2’s source code produces warnings about deprecated `register` storage class specifiers. + # Unfortunately compiling Python 2’s source code produces warnings about deprecated `register` storage class specifiers and + # casts between incompatible function types. if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") - endif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + elseif (CMAKE_COMPILER_IS_GNUCXX) + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type") + endif () set_source_files_properties (${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -DSWIG_TYPE_TABLE=kdb") diff --git a/src/plugins/python/CMakeLists.txt b/src/plugins/python/CMakeLists.txt index b538de1fde4..c557bb8c0f5 100644 --- a/src/plugins/python/CMakeLists.txt +++ b/src/plugins/python/CMakeLists.txt @@ -12,6 +12,10 @@ if (DEPENDENCY_PHASE) # we call this SWIG_COMPILE_FLAGS because we have the same variable in our swig bindings set (SWIG_COMPILE_FLAGS "-Wno-shadow -Wno-old-style-cast -Wno-unused-variable -Wno-missing-field-initializers") + if (CMAKE_COMPILER_IS_GNUCXX) + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type") + endif () + set_source_files_properties ("python.cpp" PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}") elseif (NOT PYTHONLIBS_FOUND) remove_plugin (python "python 3 libs (libpython3-dev) not found") diff --git a/src/plugins/python2/CMakeLists.txt b/src/plugins/python2/CMakeLists.txt index fc9aa131966..17ecdc8af92 100644 --- a/src/plugins/python2/CMakeLists.txt +++ b/src/plugins/python2/CMakeLists.txt @@ -16,7 +16,9 @@ if (DEPENDENCY_PHASE) set (SWIG_COMPILE_FLAGS "-Wno-shadow -Wno-old-style-cast -Wno-unused-variable") if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") - endif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + elseif (CMAKE_COMPILER_IS_GNUCXX) + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type") + endif () set_source_files_properties ("python.cpp" PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}") elseif (NOT PYTHON2LIBS_FOUND) remove_plugin (python2 "python 2 libs (libpython-dev) not found") From 1ff53a506f993d0f6dafdbdb3c731896be161a4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Tue, 8 May 2018 16:51:55 +0200 Subject: [PATCH 08/20] Ruby: Ignore warnings in generated code --- src/bindings/swig/ruby/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bindings/swig/ruby/CMakeLists.txt b/src/bindings/swig/ruby/CMakeLists.txt index f51f3f073d8..63d619cbb52 100644 --- a/src/bindings/swig/ruby/CMakeLists.txt +++ b/src/bindings/swig/ruby/CMakeLists.txt @@ -53,10 +53,12 @@ else () # disable certain compiler warnings for SWIG generated files set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-unused-parameter") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-sign-compare") - set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-dynamic-class-memaccess") if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-unused-but-set-variable") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-catch-value") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-maybe-uninitialized") elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-dynamic-class-memaccess") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") endif () From bc890ec4aa0f00100a2ec8f3e06fabcd7f43994a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Tue, 8 May 2018 18:00:25 +0200 Subject: [PATCH 09/20] Python: Ignore warnings about string truncation --- src/bindings/swig/python/CMakeLists.txt | 1 + src/bindings/swig/python2/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/src/bindings/swig/python/CMakeLists.txt b/src/bindings/swig/python/CMakeLists.txt index 6678f07b2da..8ffeb7d6566 100644 --- a/src/bindings/swig/python/CMakeLists.txt +++ b/src/bindings/swig/python/CMakeLists.txt @@ -41,6 +41,7 @@ else () # Unfortunately compiling Python’s source code produces warnings about casts between incompatible function types. if (CMAKE_COMPILER_IS_GNUCXX) set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-stringop-truncation") endif (CMAKE_COMPILER_IS_GNUCXX) set_source_files_properties (${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -DSWIG_TYPE_TABLE=kdb") diff --git a/src/bindings/swig/python2/CMakeLists.txt b/src/bindings/swig/python2/CMakeLists.txt index d5491abedfe..d7532d56572 100644 --- a/src/bindings/swig/python2/CMakeLists.txt +++ b/src/bindings/swig/python2/CMakeLists.txt @@ -44,6 +44,7 @@ else () set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") elseif (CMAKE_COMPILER_IS_GNUCXX) set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-stringop-truncation") endif () set_source_files_properties (${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -DSWIG_TYPE_TABLE=kdb") From 102e2b6df9ef749c3712008bb5de59c414b078ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Tue, 8 May 2018 19:36:18 +0200 Subject: [PATCH 10/20] Ruby: Ignore warnings about clearing object Before this update GCC would report warnings about clearing objects that have no trivial copy-assignment. --- src/bindings/swig/ruby/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bindings/swig/ruby/CMakeLists.txt b/src/bindings/swig/ruby/CMakeLists.txt index 63d619cbb52..265cb57e3b5 100644 --- a/src/bindings/swig/ruby/CMakeLists.txt +++ b/src/bindings/swig/ruby/CMakeLists.txt @@ -56,6 +56,7 @@ else () if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-unused-but-set-variable") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-catch-value") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-class-memaccess") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-maybe-uninitialized") elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-dynamic-class-memaccess") From 21c74540250e42945c2ca0707b1d1df17fdb2385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Tue, 8 May 2018 20:51:15 +0200 Subject: [PATCH 11/20] Travis: Do not install GObject libraries Currently linking `libelektra-io-glib` fails on macOS. The build system reports the following error > ld: library not found for -lintl . --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f267ec5b4d8..60187f40186 100644 --- a/.travis.yml +++ b/.travis.yml @@ -106,7 +106,6 @@ before_install: brew install checkbashisms brew install dbus brew install discount - brew install gobject-introspection brew install libgcrypt brew install libgit2 brew install libuv From 5d7f8c05d1fb65274f18863d239fe7ea35abb391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Wed, 9 May 2018 10:26:26 +0200 Subject: [PATCH 12/20] Travis: Fix detection of OpenSSL on macOS --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 60187f40186..b0cc26cffc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -111,6 +111,8 @@ before_install: brew install libuv brew install lua brew install openssl + export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig + ln -s /usr/local/opt/openssl/include/openssl/ /usr/local/include/openssl brew install python@2; brew link --overwrite python@2 brew install python || brew upgrade python # Since Qt 5.10.1 GCC is unable to compile the Qt-GUI under macOS printing the following error message: @@ -178,7 +180,6 @@ before_script: python3_ver=$(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') && \ CMAKE_OPT+=("-DPYTHON_INCLUDE_DIR:PATH=$(python3-config --prefix)/include/python${python3_ver}m") && \ CMAKE_OPT+=("-DPYTHON_LIBRARY:FILEPATH=$(python3-config --prefix)/lib/libpython${python3_ver}.dylib") - ln -s /usr/local/opt/openssl/include/openssl/ /usr/local/include/openssl fi - > cmake From fcb749d3b2376a0a2cb713569d7dc9d51e48dcf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Wed, 9 May 2018 11:47:56 +0200 Subject: [PATCH 13/20] SWIG: Update code/comments about disabled warnings --- src/bindings/swig/python/CMakeLists.txt | 2 +- src/bindings/swig/python2/CMakeLists.txt | 3 +-- src/plugins/python/CMakeLists.txt | 1 + src/plugins/python2/CMakeLists.txt | 2 +- src/plugins/ruby/CMakeLists.txt | 5 +++-- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/bindings/swig/python/CMakeLists.txt b/src/bindings/swig/python/CMakeLists.txt index 8ffeb7d6566..a1f7032fd55 100644 --- a/src/bindings/swig/python/CMakeLists.txt +++ b/src/bindings/swig/python/CMakeLists.txt @@ -38,7 +38,7 @@ else () swig_link_libraries (swig-python elektra-core elektra-kdb ${PYTHON_LIBRARIES}) set_target_properties (_swig-python PROPERTIES OUTPUT_NAME _kdb) - # Unfortunately compiling Python’s source code produces warnings about casts between incompatible function types. + # Unfortunately the generated code produces warnings. if (CMAKE_COMPILER_IS_GNUCXX) set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-stringop-truncation") diff --git a/src/bindings/swig/python2/CMakeLists.txt b/src/bindings/swig/python2/CMakeLists.txt index d7532d56572..579a93eb1f8 100644 --- a/src/bindings/swig/python2/CMakeLists.txt +++ b/src/bindings/swig/python2/CMakeLists.txt @@ -38,8 +38,7 @@ else () swig_link_libraries (swig-python2 elektra-core elektra-kdb ${PYTHON2_LIBRARIES}) set_target_properties (_swig-python2 PROPERTIES OUTPUT_NAME _kdb) - # Unfortunately compiling Python 2’s source code produces warnings about deprecated `register` storage class specifiers and - # casts between incompatible function types. + # Unfortunately compiling the generated code produces warnings. if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") elseif (CMAKE_COMPILER_IS_GNUCXX) diff --git a/src/plugins/python/CMakeLists.txt b/src/plugins/python/CMakeLists.txt index c557bb8c0f5..4caa8d13e84 100644 --- a/src/plugins/python/CMakeLists.txt +++ b/src/plugins/python/CMakeLists.txt @@ -12,6 +12,7 @@ if (DEPENDENCY_PHASE) # we call this SWIG_COMPILE_FLAGS because we have the same variable in our swig bindings set (SWIG_COMPILE_FLAGS "-Wno-shadow -Wno-old-style-cast -Wno-unused-variable -Wno-missing-field-initializers") + # Unfortunately compiling the generated code produces warnings about casts between incompatible function types. if (CMAKE_COMPILER_IS_GNUCXX) set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type") endif () diff --git a/src/plugins/python2/CMakeLists.txt b/src/plugins/python2/CMakeLists.txt index 17ecdc8af92..08dbfb726bd 100644 --- a/src/plugins/python2/CMakeLists.txt +++ b/src/plugins/python2/CMakeLists.txt @@ -16,7 +16,7 @@ if (DEPENDENCY_PHASE) set (SWIG_COMPILE_FLAGS "-Wno-shadow -Wno-old-style-cast -Wno-unused-variable") if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") - elseif (CMAKE_COMPILER_IS_GNUCXX) + elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-cast-function-type") endif () set_source_files_properties ("python.cpp" PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}") diff --git a/src/plugins/ruby/CMakeLists.txt b/src/plugins/ruby/CMakeLists.txt index 075bdc1863e..04494d22928 100644 --- a/src/plugins/ruby/CMakeLists.txt +++ b/src/plugins/ruby/CMakeLists.txt @@ -22,11 +22,12 @@ if (DEPENDENCY_PHASE) set (SWIG_COMPILE_FLAGS "-Wno-shadow -Wno-old-style-cast -Wno-unused-variable -Wno-unused-parameter -Wno-reserved-user-defined-literal") + # Disable warnings produced by generated code if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") - else (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-literal-suffix") - endif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + endif () set_source_files_properties ("ruby.cpp" PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}") elseif (NOT RUBY_FOUND) From 89fc32cd855230c93ee9ad78a94d3c45c00104bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Wed, 9 May 2018 12:03:32 +0200 Subject: [PATCH 14/20] Travis: Disable Python setup on `FAST` macOS build --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b0cc26cffc9..6efe3eba8af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -173,7 +173,7 @@ before_script: tools="kdb" fi - | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + if [[ "$TRAVIS_OS_NAME" == "osx" && "$FAST" != "ON" ]]; then python2_ver=$(python2 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') && \ CMAKE_OPT+=("-DPYTHON2_INCLUDE_DIR:PATH=$(python2-config --prefix)/include/python${python2_ver}") && \ CMAKE_OPT+=("-DPYTHON2_LIBRARY:FILEPATH=$(python2-config --prefix)/lib/libpython${python2_ver}.dylib") && \ From 9fe8940eb2708e4ddd4d5cb7ea6be162553c541a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Wed, 9 May 2018 13:53:24 +0200 Subject: [PATCH 15/20] Travis: Disable Python setup on Haskell build job --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6efe3eba8af..7fb8350ccf2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -173,7 +173,7 @@ before_script: tools="kdb" fi - | - if [[ "$TRAVIS_OS_NAME" == "osx" && "$FAST" != "ON" ]]; then + if [[ "$TRAVIS_OS_NAME" == "osx" && "$FAST" != "ON" && "$HASKELL" != "ON" ]]; then python2_ver=$(python2 -c 'import sys; print(".".join(map(str, sys.version_info[:2])))') && \ CMAKE_OPT+=("-DPYTHON2_INCLUDE_DIR:PATH=$(python2-config --prefix)/include/python${python2_ver}") && \ CMAKE_OPT+=("-DPYTHON2_LIBRARY:FILEPATH=$(python2-config --prefix)/lib/libpython${python2_ver}.dylib") && \ From 1ae0ce23bdb0950b733fd7c4e57d4e117fbfd4e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Wed, 9 May 2018 14:38:58 +0200 Subject: [PATCH 16/20] Release: Add text about Travis update --- doc/news/_preparation_next_release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/news/_preparation_next_release.md b/doc/news/_preparation_next_release.md index f8a29d7c600..51e4b0b5564 100644 --- a/doc/news/_preparation_next_release.md +++ b/doc/news/_preparation_next_release.md @@ -124,7 +124,7 @@ These notes are of interest for people developing Elektra: - <> - <> - <> - +- Travis now builds all (applicable) bindings by default again. ## Fixes From a9d31b900dde6e01aeaf770fe51c19da1feb5e89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Thu, 10 May 2018 06:19:48 +0200 Subject: [PATCH 17/20] Travis: Remove useless code --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7fb8350ccf2..90160b03497 100644 --- a/.travis.yml +++ b/.travis.yml @@ -112,7 +112,6 @@ before_install: brew install lua brew install openssl export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig - ln -s /usr/local/opt/openssl/include/openssl/ /usr/local/include/openssl brew install python@2; brew link --overwrite python@2 brew install python || brew upgrade python # Since Qt 5.10.1 GCC is unable to compile the Qt-GUI under macOS printing the following error message: @@ -184,7 +183,6 @@ before_script: - > cmake -GNinja - -DBUILD_STATIC=OFF -DPLUGINS="${plugins:-ALL;-jni}" -DBINDINGS="${bindings:-ALL}" -DENABLE_DEBUG=ON From f641e08cda52f1bf0e7c6460d2b99b5d94c653af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Sat, 12 May 2018 18:50:48 +0200 Subject: [PATCH 18/20] Ruby: Disable warning about macro redefinition --- src/bindings/swig/ruby/CMakeLists.txt | 1 + src/plugins/ruby/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/src/bindings/swig/ruby/CMakeLists.txt b/src/bindings/swig/ruby/CMakeLists.txt index 265cb57e3b5..f88d9e29704 100644 --- a/src/bindings/swig/ruby/CMakeLists.txt +++ b/src/bindings/swig/ruby/CMakeLists.txt @@ -61,6 +61,7 @@ else () elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-dynamic-class-memaccess") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-macro-redefined") endif () # add 'kdb' module diff --git a/src/plugins/ruby/CMakeLists.txt b/src/plugins/ruby/CMakeLists.txt index 04494d22928..2ba41415108 100644 --- a/src/plugins/ruby/CMakeLists.txt +++ b/src/plugins/ruby/CMakeLists.txt @@ -25,6 +25,7 @@ if (DEPENDENCY_PHASE) # Disable warnings produced by generated code if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-macro-redefined") elseif (CMAKE_CXX_COMPILER_ID MATCHES "GNU") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-literal-suffix") endif () From 4fc5c82a2f6357eaa079a94ada8a110c83bed2e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Sat, 12 May 2018 18:51:21 +0200 Subject: [PATCH 19/20] Ruby: Disable warning about virtual destructor --- src/bindings/swig/ruby/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bindings/swig/ruby/CMakeLists.txt b/src/bindings/swig/ruby/CMakeLists.txt index f88d9e29704..21ab96d6acf 100644 --- a/src/bindings/swig/ruby/CMakeLists.txt +++ b/src/bindings/swig/ruby/CMakeLists.txt @@ -60,6 +60,13 @@ else () set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-maybe-uninitialized") elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-dynamic-class-memaccess") + + # TODO: Reenable the following warning after we add a virtual destructor to `PluginDatabase`, and its subclasses. + # See also: + # - https://github.com/ElektraInitiative/libelektra/pull/1841 + # - https://github.com/ElektraInitiative/libelektra/commit/15d67328 + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-delete-non-virtual-dtor") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-macro-redefined") endif () From 629aa519631c866e144809d29d3727f0d3732b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Sat, 12 May 2018 18:52:37 +0200 Subject: [PATCH 20/20] Ruby: Disable warning about invalid suffix --- src/bindings/swig/ruby/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bindings/swig/ruby/CMakeLists.txt b/src/bindings/swig/ruby/CMakeLists.txt index 21ab96d6acf..bc4cafc6914 100644 --- a/src/bindings/swig/ruby/CMakeLists.txt +++ b/src/bindings/swig/ruby/CMakeLists.txt @@ -68,6 +68,7 @@ else () set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-delete-non-virtual-dtor") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-deprecated-register") + set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-reserved-user-defined-literal") set (SWIG_COMPILE_FLAGS "${SWIG_COMPILE_FLAGS} -Wno-macro-redefined") endif ()