On Nov 7, 2021, at 12:14 PM, Kurt Miller <li...@intricatesoftware.com> wrote: > > On Nov 7, 2021, at 11:05 AM, Antoine Jacoutot <ajacou...@bsdfrog.org> wrote: >> >> On Sun, Nov 07, 2021 at 10:51:53AM -0500, Kurt Miller wrote: >>> On Nov 5, 2021, at 3:34 PM, Antoine Jacoutot <ajacou...@bsdfrog.org> wrote: >>>> >>>> On Fri, Nov 05, 2021 at 03:19:12PM -0400, Kurt Mosiejczuk wrote: >>>>> On Fri, Nov 05, 2021 at 07:59:35PM +0100, Antoine Jacoutot wrote: >>>>>> On Fri, Nov 05, 2021 at 01:43:50PM -0400, Kurt Mosiejczuk wrote: >>>>>>> The switch to building with meson for the update to 1.17.4 did not get >>>>>>> along with sparc64 at all. Which knocks out a large portion of the tree. >>>>> >>>>>>> Switching back to using autotools (and updating the PLIST) fixes the >>>>>>> build >>>>>>> on sparc64 (and doesn't break it on amd64). >>>>> >>>>>>> ok? >>>>> >>>>>> What's the failure? >>>>> >>>>> http://build-failures.rhaalovely.net/sparc64/2021-11-02/graphics/cairo.log >>>>> >>>>> In file included from ../cairo-1.17.4/src/cairo-xlib-private.h:40, >>>>> from ../cairo-1.17.4/src/cairo-xlib-display.c:40: >>>>> ../cairo-1.17.4/src/cairo-xlib-xrender-private.h:106: error: redefinition >>>>> of 'struct _XLinearGradient' >>>>> ../cairo-1.17.4/src/cairo-xlib-xrender-private.h:115: error: redefinition >>>>> of 'struct _XCircle' >>>>> ../cairo-1.17.4/src/cairo-xlib-xrender-private.h:120: error: redefinition >>>>> of 'struct _XRadialGradient' >>>>> ../cairo-1.17.4/src/cairo-xlib-xrender-private.h:129: error: redefinition >>>>> of 'struct _XConicalGradient' >>>>> >>>>> --Kurt >>>> >>>> Can you find out why libExt failed? >>>> >>>> Checking if "shmctl IPC_RMID allowes subsequent attaches" with >>>> dependencies x11, xext runs: DID NOT COMPILE >>>> >>>> Also please try with llvm. >>> >>> I took a look at this a bit. Here’s what I found. The meson configure stage >>> is >>> failing many checks that lead to an improper configuration and then results >>> in the the build failure above. >>> >>> It looks to me like the root cause is a binutils-2.17 ld bug. Meson builds >>> its >>> test programs with full paths to certain libraries and ld fails to link. >>> >>> For example, here is the alarm test program: >>> >>> #define alarm meson_disable_define_of_alarm >>> >>> #include <limits.h> >>> #undef alarm >>> >>> #ifdef __cplusplus >>> extern "C" >>> #endif >>> char alarm (void); >>> >>> #if defined __stub_alarm || defined __stub___alarm >>> fail fail fail this function is not going to work >>> #endif >>> >>> int main(void) { >>> return alarm (); >>> } >>> >>> Its compiled and linked with the following command: >>> >>> cc -I/usr/local/include -I/usr/X11R6/include/pixman-1 -I/usr/X11R6/include >>> -I/usr/X11R6/include/freetype2 -I/usr/local/include/libpng16 >>> -I/usr/local/include/lzo testfile.c -o output.exe -O2 -pipe -g >>> -D_FILE_OFFSET_BITS=64 -O0 -Wl,--start-group -lm >>> /usr/local/lib/liblzo2.so.1.0 -lz /usr/local/lib/libpng.so.18.0 >>> /usr/lib/libz.so.6.0 /usr/X11R6/lib/libfontconfig.so.13.0 >>> /usr/X11R6/lib/libfreetype.so.30.0 /usr/X11R6/lib/libX11.so.17.1 >>> /usr/X11R6/lib/libXext.so.13.0 /usr/X11R6/lib/libXrender.so.6.0 >>> /usr/X11R6/lib/libxcb.so.4.1 /usr/X11R6/lib/libxcb-render.so.1.1 >>> /usr/X11R6/lib/libxcb-shm.so.1.1 /usr/X11R6/lib/libpixman-1.so.40.0 >>> -Wl,--end-group >>> >>> And results in these linking errors: >>> >>> /usr/X11R6/lib/libfontconfig.so.13.0: warning: sprintf() is often misused, >>> please use snprintf() >>> /usr/X11R6/lib/libfontconfig.so.13.0: warning: strcpy() is almost always >>> misused, please use strlcpy() >>> /usr/X11R6/lib/libfontconfig.so.13.0: warning: strcat() is almost always >>> misused, please use strlcat() >>> /usr/bin/ld: warning: libX11.so.17.1, needed by >>> /usr/X11R6/lib/libXext.so.13.0, not found (try using -rpath or -rpath-link) >>> /usr/bin/ld: warning: libXau.so.10.0, needed by >>> /usr/X11R6/lib/libxcb.so.4.1, not found (try using -rpath or -rpath-link) >>> /usr/bin/ld: warning: libXdmcp.so.11.0, needed by >>> /usr/X11R6/lib/libxcb.so.4.1, not found (try using -rpath or -rpath-link) >>> /usr/X11R6/lib/libxcb.so.4.1: undefined reference to `XdmcpWrap' >>> /usr/X11R6/lib/libxcb.so.4.1: undefined reference to `XauGetBestAuthByAddr' >>> /usr/X11R6/lib/libxcb.so.4.1: undefined reference to `XauDisposeAuth’ >>> >>> Note the warning lines about not finding libs that are clearly in the list >>> of >>> libs to link but using full paths instead of -llibX11 for example. >>> All of the failing configure tests are failing in the same way. >> >> Missing LDFLAGS -L/usr/X11R6/lib ? > > Yes adding -L/usr/X11R6/lib allows them to link, but the question is > why is it necessary when the libs ld claims it can’t find are explicitly > listed in the list of libs with full paths to find them?
Meanwhile this works to fix the build on sparc64: Index: Makefile =================================================================== RCS file: /cvs/ports/graphics/cairo/Makefile,v retrieving revision 1.72 diff -u -p -u -r1.72 Makefile --- Makefile 25 Oct 2021 07:21:40 -0000 1.72 +++ Makefile 7 Nov 2021 17:31:04 -0000 @@ -3,6 +3,7 @@ COMMENT= vector graphics library DISTNAME= cairo-1.17.4 +REVISION= 0 CATEGORIES= graphics DPB_PROPERTIES= parallel @@ -36,6 +37,7 @@ LIB_DEPENDS= archivers/lzo2 \ CONFIGURE_ARGS= -Dspectre=disabled \ -Dtests=disabled +CONFIGURE_ENV= LDFLAGS="-L/usr/X11R6/lib" # needed for firefox CONFIGURE_ARGS += -Dtee=enabled