Opened 6 weeks ago
Last modified 6 weeks ago
#71035 new defect
onetbb needs a fallback for posix_memalign on 10.4–10.5
Reported by: | barracuda156 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.10.2 |
Keywords: | tiger, leopard | Cc: | mohd-akram (Mohamed Akram) |
Port: | onetbb |
Description
Someone helped me to test the build on 10.5.8, and it fails:
:info:build [ 4%] Building CXX object src/tbb/CMakeFiles/tbb.dir/allocator.cpp.o :info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/build/src/tbb && /opt/local/bin/g++-mp-14 -D__TBB_BUILD -D__TBB_USE_ITT_NOTIFY -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbb/../../include -pipe -Os -Wno-parentheses -Wno-unused-function -DNDEBUG -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -arch ppc -mmacosx-version-min=10.5 -fPIC -flifetime-dse=1 -Wall -Wextra -Werror -Wfatal-errors -D_XOPEN_SOURCE -fstack-clash-protection -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2 -MD -MT src/tbb/CMakeFiles/tbb.dir/allocator.cpp.o -MF CMakeFiles/tbb.dir/allocator.cpp.o.d -o CMakeFiles/tbb.dir/allocator.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbb/allocator.cpp :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbb/allocator.cpp: In function 'void* tbb::detail::r1::std_cache_aligned_allocate(std::size_t, std::size_t)': :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbb/allocator.cpp:210:15: error: 'posix_memalign' was not declared in this scope :info:build 210 | int res = posix_memalign(&p, alignment, bytes); :info:build | ^~~~~~~~~~~~~~ :info:build compilation terminated due to -Wfatal-errors. :info:build make[2]: *** [src/tbb/CMakeFiles/tbb.dir/allocator.cpp.o] Error 1
This is a known issue: macOS < 10.6 has no posix_memalign
and should fall back to malloc
instead.
Change History (3)
comment:1 follow-up: 2 Changed 6 weeks ago by kencu (Ken)
comment:2 Changed 6 weeks ago by barracuda156
Replying to kencu:
legacysupport
Thank you, Ken. That almost worked, but the build failed on this:
:info:build [ 91%] Building CXX object src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/function_replacement.cpp.o :info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/build/src/tbbmalloc_proxy && /opt/local/bin/g++-mp-14 -D__TBBMALLOCPROXY_BUILD -Dtbbmalloc_proxy_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbbmalloc_proxy/../../include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbbmalloc/../../include -pipe -Os -Wno-parentheses -Wno-unused-function -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -arch ppc -mmacosx-version-min=10.5 -fPIC -flifetime-dse=1 -Wall -Wextra -Werror -Wfatal-errors -D_XOPEN_SOURCE -fstack-clash-protection -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2 -MD -MT src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/function_replacement.cpp.o -MF CMakeFiles/tbbmalloc_proxy.dir/function_replacement.cpp.o.d -o CMakeFiles/tbbmalloc_proxy.dir/function_replacement.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbbmalloc_proxy/function_replacement.cpp :info:build [ 93%] Building CXX object src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/proxy.cpp.o :info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/build/src/tbbmalloc_proxy && /opt/local/bin/g++-mp-14 -D__TBBMALLOCPROXY_BUILD -Dtbbmalloc_proxy_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbbmalloc_proxy/../../include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbbmalloc/../../include -pipe -Os -Wno-parentheses -Wno-unused-function -DNDEBUG -isystem/opt/local/include/LegacySupport -I/opt/local/include -D_GLIBCXX_USE_CXX11_ABI=0 -std=c++11 -arch ppc -mmacosx-version-min=10.5 -fPIC -flifetime-dse=1 -Wall -Wextra -Werror -Wfatal-errors -D_XOPEN_SOURCE -fstack-clash-protection -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2 -MD -MT src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/proxy.cpp.o -MF CMakeFiles/tbbmalloc_proxy.dir/proxy.cpp.o.d -o CMakeFiles/tbbmalloc_proxy.dir/proxy.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbbmalloc_proxy/proxy.cpp :info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbbmalloc_proxy/proxy.cpp:142: :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbbmalloc_proxy/proxy_overload_osx.h: In constructor 'DoMallocReplacement::DoMallocReplacement()': :info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/oneTBB-2021.13.0/src/tbbmalloc_proxy/proxy_overload_osx.h:164:14: error: 'malloc_zone_t' {aka 'struct _malloc_zone_t'} has no member named 'memalign' :info:build 164 | zone.memalign = impl_memalign; :info:build | ^~~~~~~~ :info:build compilation terminated due to -Wfatal-errors. :info:build make[2]: *** [src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/proxy.cpp.o] Error 1 :info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/build' :info:build make[1]: *** [src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/all] Error 2 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_onetbb/onetbb/work/build' :info:build make: *** [all] Error 2
comment:3 Changed 6 weeks ago by kencu (Ken)
ah.
they are doing some custom fancy memory mgmt using the actual memory manager structures.
Well, this just got harder.
Note: See
TracTickets for help on using
tickets.
legacysupport