Hi, I tried to fix geo/osrm-backend build failure on macppc, and the first thing i did was upgrading ttb, so here it is.
The changelog can be found here [0], upstream changed their github account. Port-wise: - bump SHARED_LIBS majors because check_sym reports that symbols have been removed - change HOMEPAGE as the old one is a redirection to the one i'm proposing - drop upstreamed patches, remove a patch in which we're patching ourselves and transfer that patch to files/OpenBSD.inc - i think that with a bit more of work, it could be built on gcc archs with ports-gcc, but i have no more of them Testing: - on macppc, it builds and tests run fine, osrm-backend can't be run on ppc32, i'll explain that in the osrm-backend update i'll send just after that one - on amd64, it builds and runs fine; i've been able to get proper routing in Berlin with the updated osrm-backend Comments/feedback are welcome, Charlène. [0] https://github.com/oneapi-src/oneTBB/blob/v2020.2/CHANGES Index: Makefile =================================================================== RCS file: /cvs/ports/devel/tbb/Makefile,v retrieving revision 1.3 diff -u -p -u -p -r1.3 Makefile --- Makefile 12 Jul 2019 20:46:02 -0000 1.3 +++ Makefile 8 May 2020 14:09:20 -0000 @@ -4,26 +4,26 @@ ONLY_FOR_ARCHS = ${CLANG_ARCHS} COMMENT = threading building blocks -PKGNAME = tbb-${GH_TAGNAME:S/_U/./} -REVISION = 0 +V = 2020.2 +GH_ACCOUNT = oneapi-src +GH_PROJECT = oneTBB +GH_TAGNAME = v${V} +PKGNAME = tbb-${V} -GH_ACCOUNT = 01org -GH_PROJECT = tbb -GH_TAGNAME = 2018_U5 - -SHARED_LIBS += tbb 0.0 -SHARED_LIBS += tbbmalloc 0.0 +SHARED_LIBS += tbb 1.0 #2020.2 +SHARED_LIBS += tbbmalloc 1.0 #2020.2 CATEGORIES = devel -HOMEPAGE = https://www.threadingbuildingblocks.org/ +HOMEPAGE = https://github.com/oneapi-src/oneTBB # Apache 2.0 PERMIT_PACKAGE = Yes WANTLIB += ${COMPILER_LIBCXX} m -COMPILER = base-clang ports-gcc base-gcc +# We only provide configuration for base-clang (see files/) +COMPILER = base-clang ports-clang MAKE_FLAGS = CONLY="${CC}" \ CPLUS="${CXX}" \ Index: distinfo =================================================================== RCS file: /cvs/ports/devel/tbb/distinfo,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 distinfo --- distinfo 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ distinfo 8 May 2020 14:09:20 -0000 @@ -1,2 +1,2 @@ -SHA256 (tbb-2018_U5.tar.gz) = xMKJavUnOSSWxeAe+FeQWKcbbuu9aVkkzROIQcE/B74= -SIZE (tbb-2018_U5.tar.gz) = 2922517 +SHA256 (oneTBB-2020.2.tar.gz) = SAQyDh5svjpUIZl7UhmePBo4KbLstkiWQdpLjjL69QA= +SIZE (oneTBB-2020.2.tar.gz) = 2637066 Index: files/OpenBSD.inc =================================================================== RCS file: /cvs/ports/devel/tbb/files/OpenBSD.inc,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 OpenBSD.inc --- files/OpenBSD.inc 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ files/OpenBSD.inc 8 May 2020 14:09:20 -0000 @@ -24,6 +24,18 @@ ifndef arch ifeq ($(shell uname -m),amd64) export arch:=intel64 endif + ifeq ($(shell uname -m),macppc) + export arch:=ppc32 + endif + ifeq ($(uname_p),sparc64) + export arch:=sparc + endif + ifeq ($(uname_p),arm) + export arch:=armv7 + endif + ifndef arch + export arch:=$(uname_p) + endif endif ifndef runtime Index: patches/patch-Makefile =================================================================== RCS file: /cvs/ports/devel/tbb/patches/patch-Makefile,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-Makefile --- patches/patch-Makefile 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ patches/patch-Makefile 8 May 2020 14:09:20 -0000 @@ -3,20 +3,16 @@ $OpenBSD: patch-Makefile,v 1.1.1.1 2018/ Index: Makefile --- Makefile.orig +++ Makefile -@@ -29,12 +29,12 @@ default: tbb tbbmalloc $(if $(use_proxy),tbbproxy) +@@ -26,10 +26,10 @@ default: tbb tbbmalloc $(if $(use_proxy),tbbproxy) all: tbb tbbmalloc tbbproxy test examples tbb: mkdir -- $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbb cfg=debug - $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbb cfg=release -+ $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbb cfg=debug TBB.DLL="$(TBB.DLL)" + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbb cfg=release TBB.DLL="$(TBB.DLL)" tbbmalloc: mkdir -- $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc - $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc -+ $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=debug malloc MALLOC.DLL="$(MALLOC.DLL)" + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbmalloc cfg=release malloc MALLOC.DLL="$(MALLOC.DLL)" tbbproxy: mkdir - $(MAKE) -C "$(work_dir)_debug" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=debug tbbproxy + $(MAKE) -C "$(work_dir)_release" -r -f $(tbb_root)/build/Makefile.tbbproxy cfg=release tbbproxy Index: patches/patch-build_OpenBSD_inc =================================================================== RCS file: patches/patch-build_OpenBSD_inc diff -N patches/patch-build_OpenBSD_inc --- patches/patch-build_OpenBSD_inc 31 Dec 2018 00:03:22 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,29 +0,0 @@ -$OpenBSD: patch-build_OpenBSD_inc,v 1.1 2018/12/31 00:03:22 jsg Exp $ - -Index: build/OpenBSD.inc ---- build/OpenBSD.inc.orig -+++ build/OpenBSD.inc -@@ -18,11 +18,21 @@ - # - - ifndef arch -- ifeq ($(shell uname -m),i386) -+ uname_p:=$(shell uname -p) -+ ifeq ($(uname_p),i386) - export arch:=ia32 - endif -- ifeq ($(shell uname -m),amd64) -+ ifeq ($(uname_p),amd64) - export arch:=intel64 -+ endif -+ ifeq ($(uname_p),sparc64) -+ export arch:=sparc -+ endif -+ ifeq ($(uname_p),arm) -+ export arch:=armv7 -+ endif -+ ifndef arch -+ export arch:=$(uname_p) - endif - endif - Index: patches/patch-examples_parallel_for_tachyon_src_types_h =================================================================== RCS file: patches/patch-examples_parallel_for_tachyon_src_types_h diff -N patches/patch-examples_parallel_for_tachyon_src_types_h --- patches/patch-examples_parallel_for_tachyon_src_types_h 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-examples_parallel_for_tachyon_src_types_h,v 1.1.1.1 2018/07/05 09:14:55 bentley Exp $ - -Index: examples/parallel_for/tachyon/src/types.h ---- examples/parallel_for/tachyon/src/types.h.orig -+++ examples/parallel_for/tachyon/src/types.h -@@ -52,7 +52,7 @@ - #elif _WIN32 - #include <malloc.h> - #define alloca _alloca --#elif __FreeBSD__||__NetBSD__ -+#elif __FreeBSD__||__NetBSD__||__OpenBSD__ - #include <stdlib.h> - #else - #include <alloca.h> Index: patches/patch-include_tbb_tbb_machine_h =================================================================== RCS file: patches/patch-include_tbb_tbb_machine_h diff -N patches/patch-include_tbb_tbb_machine_h --- patches/patch-include_tbb_tbb_machine_h 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-include_tbb_tbb_machine_h,v 1.1.1.1 2018/07/05 09:14:55 bentley Exp $ - -Index: include/tbb/tbb_machine.h ---- include/tbb/tbb_machine.h.orig -+++ include/tbb/tbb_machine.h -@@ -227,7 +227,7 @@ template<> struct atomic_selector<8> { - #include "machine/linux_intel64.h" - #endif - --#elif __linux__ || __FreeBSD__ || __NetBSD__ -+#elif __linux__ || __FreeBSD__ || __NetBSD__ || __OpenBSD__ - - #if (TBB_USE_GCC_BUILTINS && __TBB_GCC_BUILTIN_ATOMICS_PRESENT) - #include "machine/gcc_generic.h" Index: patches/patch-src_rml_client_rml_factory_h =================================================================== RCS file: patches/patch-src_rml_client_rml_factory_h diff -N patches/patch-src_rml_client_rml_factory_h --- patches/patch-src_rml_client_rml_factory_h 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-src_rml_client_rml_factory_h,v 1.1.1.1 2018/07/05 09:14:55 bentley Exp $ - -Index: src/rml/client/rml_factory.h ---- src/rml/client/rml_factory.h.orig -+++ src/rml/client/rml_factory.h -@@ -33,7 +33,7 @@ - #define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".dylib" - #elif __linux__ - #define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".so.1" --#elif __FreeBSD__ || __NetBSD__ || __sun || _AIX -+#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX - #define RML_SERVER_NAME "libirml" DEBUG_SUFFIX ".so" - #else - #error Unknown OS Index: patches/patch-src_tbb_cache_aligned_allocator_cpp =================================================================== RCS file: patches/patch-src_tbb_cache_aligned_allocator_cpp diff -N patches/patch-src_tbb_cache_aligned_allocator_cpp --- patches/patch-src_tbb_cache_aligned_allocator_cpp 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-src_tbb_cache_aligned_allocator_cpp,v 1.1.1.1 2018/07/05 09:14:55 bentley Exp $ - -Index: src/tbb/cache_aligned_allocator.cpp ---- src/tbb/cache_aligned_allocator.cpp.orig -+++ src/tbb/cache_aligned_allocator.cpp -@@ -104,7 +104,7 @@ static const dynamic_link_descriptor MallocLinkTable[] - #define MALLOCLIB_NAME "tbbmalloc" DEBUG_SUFFIX ".dll" - #elif __APPLE__ - #define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".dylib" --#elif __FreeBSD__ || __NetBSD__ || __sun || _AIX || __ANDROID__ -+#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__ - #define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so" - #elif __linux__ // Note that order of these #elif's is important! - #define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX __TBB_STRING(.so.TBB_COMPATIBLE_INTERFACE_VERSION) Index: patches/patch-src_tbbmalloc_frontend_cpp =================================================================== RCS file: patches/patch-src_tbbmalloc_frontend_cpp diff -N patches/patch-src_tbbmalloc_frontend_cpp --- patches/patch-src_tbbmalloc_frontend_cpp 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-src_tbbmalloc_frontend_cpp,v 1.1.1.1 2018/07/05 09:14:55 bentley Exp $ - -Index: src/tbbmalloc/frontend.cpp ---- src/tbbmalloc/frontend.cpp.orig -+++ src/tbbmalloc/frontend.cpp -@@ -748,7 +748,7 @@ static inline unsigned int highestBitPos(unsigned int - unsigned int pos; - #if __ARCH_x86_32||__ARCH_x86_64 - --# if __linux__||__APPLE__||__FreeBSD__||__NetBSD__||__sun||__MINGW32__ -+# if __linux__||__APPLE__||__FreeBSD__||__NetBSD__||__OpenBSD__||__sun||__MINGW32__ - __asm__ ("bsr %1,%0" : "=r"(pos) : "r"(n)); - # elif (_WIN32 && (!_WIN64 || __INTEL_COMPILER)) - __asm Index: patches/patch-src_tbbmalloc_tbbmalloc_cpp =================================================================== RCS file: patches/patch-src_tbbmalloc_tbbmalloc_cpp diff -N patches/patch-src_tbbmalloc_tbbmalloc_cpp --- patches/patch-src_tbbmalloc_tbbmalloc_cpp 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-src_tbbmalloc_tbbmalloc_cpp,v 1.1.1.1 2018/07/05 09:14:55 bentley Exp $ - -Index: src/tbbmalloc/tbbmalloc.cpp ---- src/tbbmalloc/tbbmalloc.cpp.orig -+++ src/tbbmalloc/tbbmalloc.cpp -@@ -45,7 +45,7 @@ namespace internal { - #define MALLOCLIB_NAME "tbbmalloc" DEBUG_SUFFIX ".dll" - #elif __APPLE__ - #define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".dylib" --#elif __FreeBSD__ || __NetBSD__ || __sun || _AIX || __ANDROID__ -+#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__ - #define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX ".so" - #elif __linux__ - #define MALLOCLIB_NAME "libtbbmalloc" DEBUG_SUFFIX __TBB_STRING(.so.TBB_COMPATIBLE_INTERFACE_VERSION) Index: patches/patch-src_test_harness_dynamic_libs_h =================================================================== RCS file: patches/patch-src_test_harness_dynamic_libs_h diff -N patches/patch-src_test_harness_dynamic_libs_h --- patches/patch-src_test_harness_dynamic_libs_h 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,14 +0,0 @@ -$OpenBSD: patch-src_test_harness_dynamic_libs_h,v 1.1.1.1 2018/07/05 09:14:55 bentley Exp $ - -Index: src/test/harness_dynamic_libs.h ---- src/test/harness_dynamic_libs.h.orig -+++ src/test/harness_dynamic_libs.h -@@ -50,7 +50,7 @@ namespace Harness { - #if __APPLE__ - #define EXT ".dylib" - // Android SDK build system does not support .so file name versioning --#elif __FreeBSD__ || __NetBSD__ || __sun || _AIX || __ANDROID__ -+#elif __FreeBSD__ || __NetBSD__ || __OpenBSD__ || __sun || _AIX || __ANDROID__ - #define EXT ".so" - #elif __linux__ // Order of these elif's matters! - #define EXT __TBB_STRING(.so.TBB_COMPATIBLE_INTERFACE_VERSION) Index: patches/patch-src_test_test_malloc_compliance_cpp =================================================================== RCS file: /cvs/ports/devel/tbb/patches/patch-src_test_test_malloc_compliance_cpp,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 patch-src_test_test_malloc_compliance_cpp --- patches/patch-src_test_test_malloc_compliance_cpp 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ patches/patch-src_test_test_malloc_compliance_cpp 8 May 2020 14:09:20 -0000 @@ -3,7 +3,7 @@ OpenBSD doesn't support RLIMIT_AS. Index: src/test/test_malloc_compliance.cpp --- src/test/test_malloc_compliance.cpp.orig +++ src/test/test_malloc_compliance.cpp -@@ -87,7 +87,7 @@ void limitMem( size_t limit ) +@@ -83,7 +83,7 @@ void limitMem( size_t limit ) void limitMem( size_t limit ) { rlimit rlim; @@ -12,7 +12,7 @@ Index: src/test/test_malloc_compliance.c if (0 != ret) { REPORT("getrlimit() returned an error: errno %d\n", errno); exit(1); -@@ -95,7 +95,7 @@ void limitMem( size_t limit ) +@@ -91,7 +91,7 @@ void limitMem( size_t limit ) if (rlim.rlim_max==(rlim_t)RLIM_INFINITY) rlim.rlim_cur = (limit > 0) ? limit*MByte : rlim.rlim_max; else rlim.rlim_cur = (limit > 0 && limit<rlim.rlim_max) ? limit*MByte : rlim.rlim_max; Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/devel/tbb/pkg/PLIST,v retrieving revision 1.1.1.1 diff -u -p -u -p -r1.1.1.1 PLIST --- pkg/PLIST 5 Jul 2018 09:14:55 -0000 1.1.1.1 +++ pkg/PLIST 8 May 2020 14:09:20 -0000 @@ -16,8 +16,10 @@ include/tbb/compat/thread include/tbb/compat/tuple include/tbb/concurrent_hash_map.h include/tbb/concurrent_lru_cache.h +include/tbb/concurrent_map.h include/tbb/concurrent_priority_queue.h include/tbb/concurrent_queue.h +include/tbb/concurrent_set.h include/tbb/concurrent_unordered_map.h include/tbb/concurrent_unordered_set.h include/tbb/concurrent_vector.h @@ -26,13 +28,16 @@ include/tbb/enumerable_thread_specific.h include/tbb/flow_graph.h include/tbb/flow_graph_abstractions.h include/tbb/flow_graph_opencl_node.h -include/tbb/gfx_factory.h include/tbb/global_control.h include/tbb/index.html +include/tbb/info.h include/tbb/internal/ include/tbb/internal/_aggregator_impl.h +include/tbb/internal/_allocator_traits.h include/tbb/internal/_concurrent_queue_impl.h +include/tbb/internal/_concurrent_skip_list_impl.h include/tbb/internal/_concurrent_unordered_impl.h +include/tbb/internal/_deprecated_header_message_guard.h include/tbb/internal/_flow_graph_async_msg_impl.h include/tbb/internal/_flow_graph_body_impl.h include/tbb/internal/_flow_graph_cache_impl.h @@ -41,19 +46,25 @@ include/tbb/internal/_flow_graph_indexer include/tbb/internal/_flow_graph_item_buffer_impl.h include/tbb/internal/_flow_graph_join_impl.h include/tbb/internal/_flow_graph_node_impl.h +include/tbb/internal/_flow_graph_node_set_impl.h +include/tbb/internal/_flow_graph_nodes_deduction.h include/tbb/internal/_flow_graph_streaming_node.h include/tbb/internal/_flow_graph_tagged_buffer_impl.h include/tbb/internal/_flow_graph_trace_impl.h include/tbb/internal/_flow_graph_types_impl.h include/tbb/internal/_mutex_padding.h +include/tbb/internal/_node_handle_impl.h include/tbb/internal/_range_iterator.h include/tbb/internal/_tbb_hash_compare_impl.h include/tbb/internal/_tbb_strings.h include/tbb/internal/_tbb_trace_impl.h include/tbb/internal/_tbb_windef.h include/tbb/internal/_template_helpers.h +include/tbb/internal/_warning_suppress_disable_notice.h +include/tbb/internal/_warning_suppress_enable_notice.h include/tbb/internal/_x86_eliding_mutex_impl.h include/tbb/internal/_x86_rtm_rw_mutex_impl.h +include/tbb/iterators.h include/tbb/machine/ include/tbb/machine/gcc_arm.h include/tbb/machine/gcc_generic.h