pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkgconf fails
On Sun, Feb 05, 2023 at 04:23:30PM +0100, oskar%fessel.org@localhost wrote:
> this fixes the build problem with libX11 on NetBSD 9.x with X11_TYPE=modular too.
Thanks for the report - this is a regression in 1.8.4 that will be fixed in the next release.
I've added the CPPFLAGS.NetBSD workaround here too, for the meantime.
Thomas
> In file included from CvCols.c:42:
> CvCols.c: In function 'XcmsConvertColors':
> ../../src/reallocarray.h:41:38: error: implicit declaration of function 'reallocarray'; did you mean 'Xreallocarray'? [-Werror=implicit-function-declaration]
> 41 | # define Xreallocarray(ptr, n, size) reallocarray((ptr), (n), (size))
> | ^~~~~~~~~~~~
> ../../src/reallocarray.h:44:32: note: in expansion of macro 'Xreallocarray'
> 44 | #define Xmallocarray(n, size) Xreallocarray(NULL, (n), (size))
> | ^~~~~~~~~~~~~
> CvCols.c:800:16: note: in expansion of macro 'Xmallocarray'
> 800 | pColors_tmp = Xmallocarray(nColors, sizeof(XcmsColor));
> | ^~~~~~~~~~~~
> ../../src/reallocarray.h:41:38: warning: nested extern declaration of 'reallocarray' [-Wnested-externs]
> 41 | # define Xreallocarray(ptr, n, size) reallocarray((ptr), (n), (size))
> | ^~~~~~~~~~~~
> ../../src/reallocarray.h:44:32: note: in expansion of macro 'Xreallocarray'
> 44 | #define Xmallocarray(n, size) Xreallocarray(NULL, (n), (size))
> | ^~~~~~~~~~~~~
> CvCols.c:800:16: note: in expansion of macro 'Xmallocarray'
> 800 | pColors_tmp = Xmallocarray(nColors, sizeof(XcmsColor));
> | ^~~~~~~~~~~~
> CvCols.c:800:14: warning: assignment to 'XcmsColor *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> 800 | pColors_tmp = Xmallocarray(nColors, sizeof(XcmsColor));
> | ^
> cc1: some warnings being treated as errors
> gmake[3]: *** [Makefile:625: CvCols.lo] Error 1
> gmake[3]: Leaving directory '/usr/pbulk/x11/libX11/work/libX11-1.8.4/src/xcms'
>
>
> > Am 04.02.2023 um 15:08 schrieb Thomas Klausner <wiz%NetBSD.org@localhost>:
> >
> > On Sat, Feb 04, 2023 at 02:34:41PM +0100, Niclas Rosenvik wrote:
> >> On Sat, 4 Feb 2023 09:54:27 +0100
> >> Thomas Klausner <wiz%NetBSD.org@localhost> wrote:
> >> 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.
> >
> > Thanks, that fixes the issue I saw - I've updated the package to 1.9.4
> > again with that additional line.
> > Thomas
>
> # cvs diff Makefile
> Index: Makefile
> ===================================================================
> RCS file: /cvsroot/pkgsrc/x11/libX11/Makefile,v
> retrieving revision 1.70
> diff -r1.70 Makefile
> 24a25
> > CPPFLAGS.NetBSD+= -D_OPENBSD_SOURCE
>
> Could someone please update pkgsrc to fix this?
>
> Cheers
> Oskar
Home |
Main Index |
Thread Index |
Old Index