Download raw body.
meson vs boost
Ok
—
Antoine
> On 22 Mar 2024, at 20:12, Otto Moerbeek <otto@drijf.net> wrote:
>
> On Fri, Mar 22, 2024 at 05:55:22PM +0100, Antoine Jacoutot wrote:
>
>>> On Fri, Mar 22, 2024 at 01:54:13PM +0100, Otto Moerbeek wrote:
>>> Hi,
>>>
>>> at PowerDNS we are starting to use meson builds and I hit upon a snag
>>> wrt boost.
>>>
>>> When searching for libs, only .a's are found, all boost .so's are
>>> skipped. I tracked it down to line 608 in
>>>
>>> ./mesonbuild/dependencies/boost.py:filter_libraries:
>>>
>>> libs = [x for x in libs if x.version_matches(lib_vers)]
>>>
>>> Here lib_vers is set to the boost version 1_84, but presumably the .so
>>> version is used to compare against. On other systems that is the
>>> convention, but on OpenBSD that does not match.
>>>
>>> Disabling this line makes things work.
>>>
>>> So there seem to be two possible solutions: make the so version match
>>> the boost version, or just skip the test.
>>>
>>> I think the latter is preferred. If that's ok, I'll prep a diff.
>>
>> Agreed.
>> Otherwise we defeat the purpose of SHARED_LIBS.
>> It would be nice to have this discussed / pushed upstream if you could.
>> https://github.com/mesonbuild/meson
>>
>> Thanks.
>>
>> --
>> Antoine
>
> How about this? If you think it's ok, I'll try to see what upstream thinks
>
> -Otto
>
> Index: Makefile
> ===================================================================
> RCS file: /home/cvs/ports/devel/meson/Makefile,v
> diff -u -p -r1.132 Makefile
> --- Makefile 14 Feb 2024 11:11:04 -0000 1.132
> +++ Makefile 22 Mar 2024 19:10:08 -0000
> @@ -5,6 +5,7 @@ GH_ACCOUNT= mesonbuild
> GH_PROJECT= meson
> GH_TAGNAME= 1.3.2
> EPOCH= 0
> +REVISION= 0
>
> CATEGORIES= devel
>
> Index: patches/patch-mesonbuild_dependencies_boost_py
> ===================================================================
> RCS file: patches/patch-mesonbuild_dependencies_boost_py
> diff -N patches/patch-mesonbuild_dependencies_boost_py
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-mesonbuild_dependencies_boost_py 22 Mar 2024 19:10:08 -0000
> @@ -0,0 +1,13 @@
> +Index: mesonbuild/dependencies/boost.py
> +--- mesonbuild/dependencies/boost.py.orig
> ++++ mesonbuild/dependencies/boost.py
> +@@ -609,7 +609,8 @@ class BoostDependency(SystemDependency):
> + mlog.debug(f'Static {len(libs)}')
> + libs = [x for x in libs if x.mt == self.multithreading]
> + mlog.debug(f'MT {len(libs)}')
> +- libs = [x for x in libs if x.version_matches(lib_vers)]
> ++ if not mesonlib.is_openbsd():
> ++ libs = [x for x in libs if x.version_matches(lib_vers)]
> + mlog.debug(f'Vers {len(libs)} {lib_vers}')
> + libs = [x for x in libs if x.arch_matches(self.arch)]
> + mlog.debug(f'Arch {len(libs)}')
meson vs boost