On Sun, Jan 06, 2019 at 09:49:00PM +0000, Stuart Henderson wrote:
> On 2019/01/06 22:27, Antoine Jacoutot wrote:
> > On Sun, Jan 06, 2019 at 08:45:00PM +0000, Stuart Henderson wrote:
> > > On 2019/01/06 21:28, Antoine Jacoutot wrote:
> > > > On Sun, Jan 06, 2019 at 01:15:51PM -0700, Landry Breuil wrote:
> > > > > CVSROOT:      /cvs
> > > > > Module name:  ports
> > > > > Changes by:   lan...@cvs.openbsd.org  2019/01/06 13:15:51
> > > > > 
> > > > > Modified files:
> > > > >       audio/ncmpc    : Makefile 
> > > > > 
> > > > > Log message:
> > > > > Pass -Db_asneeded=false to meson so that it doesn't add 
> > > > > -Wl,--as-needed.
> > > > > 
> > > > > Fixes the build on i386/ld.bfd archs which was failing with missing 
> > > > > refs
> > > > > to pthread functions, as reported by sthen@
> > > > 
> > > > Why not contain this to ld.bfd archs then?
> > > 
> > > Makes sense, but also why constrain it to ncmpc? meson itself seems
> > > the obvious place, here's one way to do it (using patch+sed to avoid
> > > a conditional patch file because I know what fun port updates are
> > > when you use them :)
> > > 
> > > As a bonus this fixes gvfs.
> > 
> > I like this better.
> > *But*, can't it have an effect on WANTLIB?
> 
> Ugh, yes.
> 
> gvfs-1.38.1(x11/gnome/gvfs,-main):
> Missing: gck-1.2 from gcr-3.28.0p3 (/usr/local/lib/gvfs/libgvfsdaemon.so)
> Missing: gpg-error.3 from libgpg-error-1.33 
> (/usr/local/libexec/gvfsd-afp-browse)
> Missing: p11-kit.2 from p11-kit-0.23.2p1 
> (/usr/local/lib/gvfs/libgvfsdaemon.so)
> Missing: pthread.25 (/usr/local/libexec/gvfsd-dnssd) (system lib)
> WANTLIB += gck-1 gpg-error p11-kit pthread
> Scanning: ok
> 
> I don't see what we can really do about it though. At least they would
> have a path via LIB_DEPENDS already so it shouldn't result in completely
> missing dependencies, and if I understand as-needed correctly then e.g.
> in the case of say gvfs and p11-kit, it shouldn't be gvfs directly
> depending on p11-kit's ABI but rather gvfs depends on $some_other_port's
> ABI, and it's only $some_other_port that needs updating if p11-kit changes..
> So I don't think this would cause a real problem. But it is messy,
> especially if someone does a WANTLIB sweep across the tree on i386 :/

Indeed, not a real problem, but messy :-/
 
> > Also, I'd use CONFIGURE_ARGS in meson.port.mk instead (like -Db_lundef=false
> > is done).
> 
> That is indeed better. i386/amd64 tests show this doing the right thing:
> 
> Index: meson.port.mk
> ===================================================================
> RCS file: /cvs/ports/devel/meson/meson.port.mk,v
> retrieving revision 1.30
> diff -u -p -r1.30 meson.port.mk
> --- meson.port.mk     11 Dec 2018 08:05:15 -0000      1.30
> +++ meson.port.mk     6 Jan 2019 21:40:04 -0000
> @@ -25,6 +25,12 @@ CONFIGURE_ARGS +=  --strip
>  # specific libc majors, so those options have always suffered false positives
>  CONFIGURE_ARGS +=    -Db_lundef=false
>  
> +# disable meson's default of using "-Wl,--as-needed" on ld.bfd arches;
> +# build failures due to undefined references are often seen.
> +.if !${PROPERTIES:Mlld}
> +CONFIGURE_ARGS +=    -Db_asneeded=false
> +.endif
> +
>  # from ${LOCALBASE}/bin/meson:
>  # Warn if the locale is not UTF-8. This can cause various unfixable issues
>  # such as os.stat not being able to decode filenames with unicode in them.

If we want to go in that direction, this patch is the way (with a bump :-)).


-- 
Antoine

Reply via email to