Created attachment 260202 [details] 14.2 build log Hello, On a 15-CURRENT host, building onetbb with poudriere, within any of the current releases, results the build failing: > =======================<phase: configure >============================ > [...] > -- HWLOC target HWLOC::hwloc_1_11 doesn't exist. The tbbbind target cannot be created > -- HWLOC target HWLOC::hwloc_2_5 doesn't exist. The tbbbind_2_5 target cannot be created > [...] > FAILED: src/tbbbind/CMakeFiles/tbbbind_2_0.dir/tbb_bind.cpp.o /ccache/libexec/ccache/c++ -D__TBBBIND_BUILD -I/wrkdirs/usr/ports/devel/onetbb/work/oneTBB-2022.1.0/src/tbbbind/../../include -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -DNDEBUG -std=c++11 -flto=thin -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -mrtm -mwaitpkg -Wformat -Wformat-security -Werror=format-security -fPIC -fstack-protector-strong -D_FORTIFY_SOURCE=2 -ffile-prefix-map=/wrkdirs/usr/ports/devel/onetbb/work/oneTBB-2022.1.0/= -ffile-prefix-map=../oneTBB-2022.1.0/= -MD -MT src/tbbbind/CMakeFiles/tbbbind_2_0.dir/tbb_bind.cpp.o -MF src/tbbbind/CMakeFiles/tbbbind_2_0.dir/tbb_bind.cpp.o.d -o src/tbbbind/CMakeFiles/tbbbind_2_0.dir/tbb_bind.cpp.o -c /wrkdirs/usr/ports/devel/onetbb/work/oneTBB-2022.1.0/src/tbbbind/tbb_bind.cpp /wrkdirs/usr/ports/devel/onetbb/work/oneTBB-2022.1.0/src/tbbbind/tbb_bind.cpp:31:10: fatal error: 'hwloc.h' file not found > 31 | #include <hwloc.h> > | ^~~~~~~~~ > 1 error generated.
This might be a problem with 15-CURRENT. I reverted the onetbb update (2022.1.0) to version 2022.0.0, and the build still fails.
OK, altho poudriere-testport is not passing on the current amd64/i386 releases, it passed when building for my custom 15-CURRENT host.
According to upstream[1], should the Port be using the 2_5 identifier for CMake? > The TBBbind library has three versions: `tbbbind`, `tbbbind_2_0`, and `tbbbind_2_5`. Each of these versions is linked with the corresponding HWLOC* library version: > - `tbbbind` links with `HWLOC 1.11.x` > - `tbbbind_2_0` links with `HWLOC 2.1–2.4` > - `tbbbind_2_5` links with `HWLOC 2.5` and later The Makefile would become: > CMAKE_ARGS+= -DTBB_STRICT:BOOL=FALSE \ > -DCMAKE_INSTALL_DOCDIR:PATH="${DOCSDIR}" \ > -DCMAKE_HWLOC_2_5_LIBRARY_PATH:PATH="${LOCALBASE}/lib/libhwloc.so" \ > -DCMAKE_HWLOC_2_5_INCLUDE_PATH:PATH="${LOCALBASE}/include" Or, if pkgconfig is added to ${USES}, and if the -DCMAKE_HWLOC* variables are removed from ${CMAKE_ARGS}, the following, > -- HWLOC target HWLOC::hwloc_1_11 doesn't exist. The tbbbind target cannot be created > -- HWLOC target HWLOC::hwloc_2_5 doesn't exist. The tbbbind_2_5 target cannot be created > -- Performing Test LINKER_HAS_NO_AS_NEEDED > -- Performing Test LINKER_HAS_NO_AS_NEEDED - Success > -- HWLOC 2 dependent tests were enabled. becomes, > -- Checking for one of the modules 'hwloc' > -- The tbbbind_2_5 target will be configured using the HWLOC 2.12.0 However, the build is still unable to find hwloc.h. 1: https://github.com/uxlfoundation/oneTBB/blob/v2022.1.0/cmake/README.md?plain=1#L57
I compared a default 15-CURRENT jail, to my custom 15-CURRENT jail, specifically, the contents of ${POUDRIERE_JAIL}/wrkdirs/usr/ports/devel/onetbb/work/.build. The .build directory was created from "make configure". Some files of interest, > build/CMakeFiles/3.31.7/CMakeCCompiler.cmake > build/CMakeFiles/3.31.7/CMakeCXXCompiler.cmake The custom jail contains: > set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/clang/19/include;/usr/include") > set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/v1;/usr/lib/clang/19/include;/usr/include") The default jails contains: > set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/local/include;/usr/lib/clang/19/include;/usr/include") > set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/local/include;/usr/include/c++/v1;/usr/lib/clang/19/include;/usr/include") I do not know how, that the custom jail can complete the build successfully, when the correct include director is not set, and the default jail, fails, even tho CMake is configured with the correct directories. I also noticed that, the default, does not have any pkg-config strings, like the custom jail does. In, > build/CMakeFiles/* Some interesting configuration is found. The default jail is full of > -isystem /usr/local/include > ignoring duplicate directory "/usr/local/include" > ignore line: [ignoring duplicate directory "/usr/local/include"] > ignore line: [ /usr/local/include] > #include <...> search starts here: > /usr/local/include > found start of implicit include info > add: [/usr/local/include] > collapse include dir [/usr/local/include] ==> [/usr/local/include] while the custom jail has none of that. The default jail will contain: > implicit include dirs: [/usr/local/include;/usr/include/c++/v1;/usr/lib/clang/19/include;/usr/include] while the custom jail will contain: > implicit include dirs: [/usr/include/c++/v1;/usr/lib/clang/19/include;/usr/include] build/build.ninja custom: > INCLUDES = -I/wrkdirs/usr/ports/devel/onetbb/work/oneTBB-2022.1.0/src/tbbbind/../../include -isystem /usr/local/include -isystem /usr/local/include/libxml2 -isystem /usr/local/libdata/pkgconfig/../../include build/build.ninja default: > INCLUDES = -I/wrkdirs/usr/ports/devel/onetbb/work/oneTBB-2022.1.0/src/tbbbind/../../include -isystem /usr/local/include/libxml2 I do not know why Ninja is producing this incorrect INCLUDES, it also does not contain the pkg-config strings.
Created attachment 260234 [details] Diff between two jails, after running make configure This is the diff between the two build directories, created from make configure. Each jail is of 15-CURRENT, one, is meant to be sanatised default, the other is a custom jail for a desktop.
I fixed the builds locally by adding localbase, and pkgconfig to ${USES}; removing the DCMAKE_HWLOC_2_LIBRARY_PATH* variables from ${CMAKE_ARGS}, and updating the pkg-plist to reflect the use of hwloc > 2.5. Seeing as how this is problem is not appearing on pkg fallout, I wonder if it is genuine problem?
Hello Alastair, Thanks for your report. Maybe not a genuine problem... I've tried to reproduce it on a fresh -CURRENT poudriere jail but could not (it builds fine). I'll investigate more, stay tuned.
(In reply to Ganael LAPLANCHE from comment #7) After updating the Ports tree today (roughly 24 hours between updates, I think), there are other Ports that use Ninja, that are also failing. Every once in a while, this happens with Ninja, often someone else commits a fix.
Created attachment 260306 [details] devel/onetbb: Switch to pkgconfig So I made a patch anyways, in case there is interest in moving to pkg-config, and updating the generate OneTTB bindings to hwloc-2.5+. I also did some Makefile housekeeping. * Configure the Port to use pkg-config over tuning CMake, add localbase, and pkgconfig to ${USES}, drop CMAKE_HWLOC_2_LIBRARY_PATH* from ${CMAKE_ARGS}; this allows the build to correctly generate bindings for hwloc > 2.5 * port{clippy|fmt|lint} maintenance * Update ${LIB_DEPENDS} to current practices; remove shared library version poudriere-testport devel/onetbb: main-amd64-default: Pass main-i386-default: Pass 13_4-amd64-release: Pass 13_4-i386-release: Pass 13_5-amd64-release: Pass 13_5-i386-release: Pass 14_2-amd64-release: Pass 14_2-i386-release: Pass
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=835fa02eb9ccfb7db8648150c2b5002025686e34 commit 835fa02eb9ccfb7db8648150c2b5002025686e34 Author: Alastair Hogge <agh@riseup.net> AuthorDate: 2025-05-12 15:00:54 +0000 Commit: Ganael LAPLANCHE <martymac@FreeBSD.org> CommitDate: 2025-05-12 15:02:18 +0000 devel/onetbb: Switch to pkgconfig - Configure the Port to use pkg-config over tuning CMake, add localbase, and pkgconfig to ${USES}, drop CMAKE_HWLOC_2_LIBRARY_PATH* from ${CMAKE_ARGS}; this allows the build to correctly generate bindings for hwloc > 2.5 - port{clippy|fmt|lint} maintenance - Update ${LIB_DEPENDS} to current practices; remove shared library version PR: 286625 Reported by: Alastair Hogge <agh@riseup.net> devel/onetbb/Makefile | 28 +++++++++++++--------------- devel/onetbb/pkg-plist | 6 +++--- 2 files changed, 16 insertions(+), 18 deletions(-)
Hello Alastair, I've just committed your patch. Thanks a lot for your contribution! Best regards, Ganael.
(In reply to Ganael LAPLANCHE from comment #11) Thanks very much