On 2018/10/08 12:12, Stuart Henderson wrote:
> On 2018/10/08 09:37, Stuart Henderson wrote:
> > On 2018/10/07 16:05, lan...@openbsd.org wrote:
> > > http://build-failures.rhaalovely.net//sparc64/2018-09-30/print/texlive/base.log
> > 
> > Not new (same failure was present in 2018-07-31, but not in the previous
> > 2018-05-13 build), but that is annoying :(
> > 
> > libxetex.a(libxetex_a-XeTeX_ext.o): In function `initversionstring':
> > XeTeX_ext.c:(.text+0x50c): undefined reference to `png_get_header_ver'
> > XeTeX_ext.c:(.text+0x5c0): undefined reference to `png_get_header_ver'
> > libxetex.a(libxetex_a-pngimage.o): In function `check_for_png':
> > pngimage.c:(.text+0xa0): undefined reference to `png_sig_cmp'
> > libxetex.a(libxetex_a-pngimage.o): In function `png_scan_file':
> > pngimage.c:(.text+0x130): undefined reference to `png_create_read_struct'
> > pngimage.c:(.text+0x140): undefined reference to `png_create_info_struct'
> > pngimage.c:(.text+0x154): undefined reference to `png_init_io'
> > pngimage.c:(.text+0x160): undefined reference to `png_read_info'
> > pngimage.c:(.text+0x16c): undefined reference to `png_get_image_width'
> > pngimage.c:(.text+0x17c): undefined reference to `png_get_image_height'
> > pngimage.c:(.text+0x18c): undefined reference to `png_get_bit_depth'
> > pngimage.c:(.text+0x19c): undefined reference to 
> > `png_get_x_pixels_per_meter'
> > pngimage.c:(.text+0x1cc): undefined reference to 
> > `png_get_y_pixels_per_meter'
> > pngimage.c:(.text+0x270): undefined reference to `png_destroy_info_struct'
> > pngimage.c:(.text+0x28c): undefined reference to `png_destroy_read_struct'
> > pngimage.c:(.text+0x2fc): undefined reference to `png_destroy_read_struct'
> > collect2: error: ld returned 1 exit status
> > 
> > Does anyone have time to investigate?
> > 
> > Guessing the libpng-1.6.35 update is the most likely cause.
> > 
> 
> Main difference in libpng-1.6.35 are png_size_t -> size_t change and build
> system regenerated with new autoconf/autobreak, and a lot of typo fixes,
> doesn't seem hugely likely to trigger this..
> 

Well that's fun. I brought my semi-ancient spaceheater out of semi-retirement
(winter is coming anyway, so this makes sense) and tried a few things.

The following libtool command generates different output on various arches.

/usr/bin/libtool  --tag=CXX   --mode=link c++  -O2 -pipe  -L/usr/local/lib 
-L/usr/X11R6/lib -o xetex xetexdir/xetex-xetexextra.o 
synctexdir/xetex-synctex.o xetex-xetexini.o xetex-xetex0.o xetex-xetex-pool.o 
libxetex.a -L/usr/local/lib -lharfbuzz-icu -lharfbuzz -L/usr/local/lib 
-lgraphite2 -L/usr/local/lib -licui18n -licuuc -licudata -lpthread -lm     
/usr/obj/ports/texlive_base-2017/texlive-20170524-source/Work/libs/teckit/libTECkit.a
 
/usr/obj/ports/texlive_base-2017/texlive-20170524-source/Work/libs/poppler/libpoppler.a
 -L/usr/local/lib -lpng -lz -L/usr/X11R6/lib -lfreetype -lz -lz libmd5.a 
-L/usr/X11R6/lib -lfontconfig -lfreetype -lz lib/lib.a 
/usr/obj/ports/texlive_base-2017/texlive-20170524-source/Work/texk/kpathsea/libkpathsea.la
  -lm

Some of this is expected (differing c++ standard library), some not.
Both start with

libtool: link: c++ -o .libs/xetex -pthread -O2 -pipe 
xetexdir/xetex-xetexextra.o synctexdir/xetex-synctex.o xetex-xetexini.o 
xetex-xetex0.o xetex-xetex-pool.o libxetex.a 
/usr/obj/ports/texlive_base-2017/texlive-20170524-source/Work/libs/teckit/libTECkit.a
 
/usr/obj/ports/texlive_base-2017/texlive-20170524-source/Work/libs/poppler/libpoppler.a
 libmd5.a lib/lib.a -L.libs -lharfbuzz-icu -lm -licuuc -licudata -lharfbuzz 
-lglib-2.0 -liconv -lpcre -lintl -lfreetype -lz

Then the next bit is different

SPARC64: ... -lgraphite2 -licui18n -lpthread -lstdc++ -lestdc++ -lfontconfig ...
AMD64:   ... -lgraphite2 -lc++ -lc++abi -lpthread -licui18n -lpng -lfontconfig 
...

And then finishing up with

-lexpat -lkpathsea -Wl,-rpath-link,/usr/local/lib,-rpath-link,/usr/X11R6/lib

I don't know what's going on but repeating the above libtool command line
using GNU libtool instead of the perl one in base, it manages to link xetex
successfully. I am now trying a texlive build with the diff below.

naddy, am I OK to commit this if my build succeeds?



Index: Makefile
===================================================================
RCS file: /cvs/ports/print/texlive/base/Makefile,v
retrieving revision 1.102
diff -u -p -r1.102 Makefile
--- Makefile    4 Sep 2018 12:46:20 -0000       1.102
+++ Makefile    9 Oct 2018 20:49:34 -0000
@@ -7,12 +7,11 @@ DISTNAME =            texlive-${DIST_V}-source
 PKGNAME =              texlive_base-${V}
 WRKDIST =              ${WRKDIR}/texlive-${DIST_V}-source
 
-REVISION-main =                2
+REVISION =             3
 
 MULTI_PACKAGES = -main -mktexlsr
 PKGNAME-mktexlsr =     texlive_mktexlsr-${V}
 PKGNAME-main =         ${PKGNAME}
-REVISION-mktexlsr =    0
 
 DISTFILES =            ${DISTNAME}${EXTRACT_SUFX} \
                        texlive-${DIST_V}-extra${EXTRACT_SUFX}
@@ -85,6 +84,8 @@ USE_GMAKE =   Yes
 
 .if ${MACHINE_ARCH} == "sparc64"
 CFLAGS +=      -fPIC
+# somehow base libtool misses -lpng while linking xetex
+USE_LIBTOOL =  gnu
 .endif
 
 # clisp limits which arches we can use xindy on

Reply via email to