pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgconf fails



On Sat, 4 Feb 2023 09:54:27 +0100
Thomas Klausner <wiz%NetBSD.org@localhost> wrote:

> On Sat, Feb 04, 2023 at 12:16:35AM +0100, Thomas Klausner wrote:
> > On Fri, Feb 03, 2023 at 07:14:44PM +0100, Marc Baudoin wrote:
> > > Marc Baudoin <babafou%babafou.eu.org@localhost> écrit :
> > > > Hi,
> > > 
> > > Sorry, message sent too fast...
> > > 
> > > I was just trying to say that, since pkgconf has been updated to
> > > version 1.9.4 yesterday, it regularly crashes (when used in
> > > comfigure when compiling other software):
> > > 
> > > checking for installed fontconfig headers and library... [2]
> > > Segmentation fault      ${PKG_CONFIG} fontconfig
> > > 
> > > I have this problem on two of my machines so it probably is a
> > > general issue.
> > > 
> > > I reverted to version 1.8.0 and it (still) works fine.
> > > 
> > > So there must be a proble with version 1.9.4.
> > > 
> > > Am I the only one having this problem?
> > 
> > I haven't seen this. What's the backtrace? Have you filed an
> > upstream bug report?
> > 
> > I just installed pkgconf and fontconfig in a chroot and tried
> > 'pkgconf --cflags fontconfig' and 'pkgconf --libs fontconfig'
> > successfully.
> 
> So on -current there is no problem, but on NetBSD 9 there is.
> 
> I downgraded the package and filed
> https://github.com/pkgconf/pkgconf/issues/285
>  Thomas

I, tried to build pkgconf 1.9.4 and it crashes for me as well.
While checking the build output I found it outputs
an compiler warning message:
--- libpkgconf/bsdstubs.lo ---
libpkgconf/bsdstubs.c: In function 'pkgconf_reallocarray':
libpkgconf/bsdstubs.c:159:9: warning: implicit declaration of function
'reallocarray'; did you mean 'reallocarr'?
[-Wimplicit-function-declaration] return reallocarray(ptr, m, n);
^~~~~~~~~~~~ reallocarr
libpkgconf/bsdstubs.c:159:9: warning: return makes pointer from integer
without a cast [-Wint-conversion] return reallocarray(ptr, m, n);
         ^~~~~~~~~~~~~~~~~~~~~~~

On NetBSD 9 the reallocarray declaration is hidden under _OPENBSD_SOURCE
so I tried to add 'CPPFLAGS.NetBSD+= -D_OPENBSD_SOURCE' and running
'bmake update' and then it doesn't crash for me at least.
I hope this works for you to. I can commit it if this does fix it
for everyone.

Regards,
Niclas


Home | Main Index | Thread Index | Old Index