tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Incorrect Boost::headers.INTERFACE_INCLUDE_DIRECTORIES
On Sun, Feb 08, 2026 at 02:00:11PM +0100, Anthony Mallet wrote:
> Hi,
>
> I'm facing the issue reported in https://github.com/NetBSD/pkgsrc/issues/167
> Any external (not pkgsrc) project using the boost/cmake config file
> will get the boost header path wrong.
>
> The installed cmake file in
> /usr/pkg/lib/cmake/boost_headers-1.89.0/boost_headers-config.cmake
> from boost-headers-1.89.0nb1 (pkgsrc-2025Q4) is incorrect.
>
> More precisely, the following bits of code in the above file do resolve to
> "/usr" for INTERFACE_INCLUDE_DIRECTORIES, which is wrong:
>
> get_filename_component(_BOOST_CMAKEDIR "${CMAKE_CURRENT_LIST_DIR}/../" REALPATH)
> get_filename_component(_BOOST_INCLUDEDIR "${_BOOST_CMAKEDIR}/../../../" ABSOLUTE)
> set_target_properties(Boost::headers PROPERTIES
> INTERFACE_INCLUDE_DIRECTORIES "${_BOOST_INCLUDEDIR}"
> )
>
> Replacing the definition of _BOOST_INCLUDEDIR with
> "${_BOOST_CMAKEDIR}/../../include/" gives the correct behaviour.
>
> Maybe this could simply be patched locally by pkgsrc until someone
> figures out what's wrong with this file?
>
> (I tried to look at boost-build sources but it's a bit too much
> obfuscated to really figure out what's going on ...)
I don't know the codebase either. Reading a bit, I found that
the scripts are generated by probably generated by boost-jam, see
work/boost_1_90_0/tools/boost_install/boost-install.jam
but they embed the working directory, so they need fixing either way.
I suggest either fixing boost-jam (or the file above), or fixing it
post-build with a SUBST* clause.
Patches welcome :-)
Thomas
Home |
Main Index |
Thread Index |
Old Index