Hi,
> http://build-failures.rhaalovely.net/powerpc/2019-10-11/net/toxcore.log
> http://build-failures.rhaalovely.net/sparc64/2019-10-11/net/toxcore.log
Humph, it used to build when naddy proposed to remove an unsupported
gcc option and use base-gcc [0].
Well, it appears that while toxcore has NO_TEST set, we're still
building tests, and errors only occurs when building them.
As such, with the below diff, all tests are not built. While recent
versions of toxcore have cmake options to disable tests, this one
hasn't. REVISION bump seems unneeded as it changes nothing to the
final package.
This fixes the build on macppc, and amd64 is still fine (build logs
with consumers [1]), the runtime has been tested without issues as well.
Comments/feedback are welcome,
Charlène.
[0] https://marc.info/?l=openbsd-ports&m=155683237311764&w=2
[1] https://bin.charlenew.xyz/toxcore_logs.tgz
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/toxcore/Makefile,v
retrieving revision 1.6
diff -u -p -u -p -r1.6 Makefile
--- Makefile 12 Jul 2019 20:48:50 -0000 1.6
+++ Makefile 1 Nov 2019 07:48:23 -0000
@@ -3,7 +3,7 @@
COMMENT = Tox client library
V = 0.2.3
-REVISION = 2
+REVISION = 3
DISTNAME = toxcore-$V
GH_ACCOUNT = TokTok
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/net/toxcore/patches/patch-CMakeLists_txt,v
retrieving revision 1.3
diff -u -p -u -p -r1.3 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt 3 May 2019 15:08:03
-0000 1.3 +++ patches/patch-CMakeLists_txt 1 Nov 2019
07:48:23 -0000 @@ -1,6 +1,7 @@
$OpenBSD: patch-CMakeLists_txt,v 1.3 2019/05/03 15:08:03 cwen Exp $
-Allow building with base-gcc that doesn't recognise this option
+* remove unknown option for base-gcc
+* NO_TEST is set but tests are built, and they break the build with
base-gcc
Index: CMakeLists.txt
--- CMakeLists.txt.orig
@@ -14,3 +15,45 @@ Index: CMakeLists.txt
# We're C-compatible, so use C style casts.
add_cxxflag("-Wno-old-style-cast")
+@@ -463,24 +463,11 @@ if(ANDROID_CPU_FEATURES)
+ endif()
+
+ function(auto_test target)
+- if(NOT (MSVC AND ARGV1 STREQUAL "MSVC_DONT_BUILD"))
+- add_executable(auto_${target}_test ${CPUFEATURES}
+- auto_tests/${target}_test.c)
+- target_link_modules(auto_${target}_test toxcore)
+- if(NOT ARGV1 STREQUAL "DONT_RUN")
+- add_test(NAME ${target} COMMAND ${CROSSCOMPILING_EMULATOR}
auto_${target}_test) +- set_tests_properties(${target} PROPERTIES
TIMEOUT "${TEST_TIMEOUT_SECONDS}") +- set_property(TEST ${target}
PROPERTY ENVIRONMENT "LLVM_PROFILE_FILE=${target}.profraw") +-
endif() +- endif()
++ message (WARNING "Test ${target} not built because it breaks
the build with base-gcc and NO_TEST is set")
+ endfunction()
+
+ if(BUILD_TOXAV)
+ add_definitions(-D__STDC_LIMIT_MACROS=1)
+- add_executable(auto_monolith_test ${CPUFEATURES}
+- auto_tests/monolith_test.cc)
+- target_link_libraries(auto_monolith_test ${toxcore_LINK_MODULES})
+- add_test(NAME monolith COMMAND ${CROSSCOMPILING_EMULATOR}
auto_monolith_test)
+ endif()
+
+ auto_test(TCP)
+@@ -593,15 +580,3 @@ if(NOT WIN32
+ set_source_files_properties(testing/av_test.c PROPERTIES LANGUAGE
CXX)
+ endif()
+ endif()
+-
+-add_executable(DHT_test ${CPUFEATURES}
+- testing/DHT_test.c)
+-target_link_modules(DHT_test toxcore)
+-
+-add_executable(Messenger_test ${CPUFEATURES}
+- testing/Messenger_test.c)
+-target_link_modules(Messenger_test toxcore)
+-
+-add_executable(random_testing ${CPUFEATURES}
+- testing/random_testing.cc)
+-target_link_modules(random_testing toxcore)
No comments:
Post a Comment