Hi Bertrand, incidentally, i did an update of my OpenBSD-current base system since building the last groff release tarball three days ago. The system now uses the LLVM linker by default instead of the GNU binutils linker:
$ which ld /usr/bin/ld $ ld --version LLD 6.0.0 (compatible with GNU linkers) This is no longer used: $ /usr/bin/ld.bfd --version GNU ld version 2.17 Copyright 2005 Free Software Foundation, Inc. [...] I do not see any regressions so far. So now we also know that it is possible to build this groff release with the complete LLVM toolchain. Bertrand Garrigues wrote on Sat, Dec 08, 2018 at 01:07:26AM +0100: > Yes the test is buggy. On my GNU/Linux system the test always says > 'yes' although I obviously don't need the declaration. I think we can > get ride of that one and replace it by gnulib's hypot module. The patch > below fixes the build on Solaris 11 (need to call 'bootstrap' and > regenerate the tarball with 'make dist'). I'll do more tests this > weekend. Applying your patch, building a new release tarball, and testing that on OpenBSD-current, Debian Jessie, and Solaris 11, everything works. On Solaris 10, Perl 5.8.4 is in use. On that ancient version of Perl, Deri's latest gropdf(1) endianness fix is ineffective because support for "L<" appears to be broken in unpack(3p). With the following debugging code: printf STDERR "hdr: %d %d %d %d\n", ord($hdr), ord(substr $hdr, 1), ord(substr $hdr, 2), ord(substr $hdr, 3); my $sl=unpack('L',$hdr); print STDERR "sl: $sl\n"; $sl=unpack('L>',$hdr); print STDERR "sl>: $sl\n"; $sl=unpack('L<',$hdr); print STDERR "sl<: $sl\n"; i see this build output: GROFF contrib/mom/examples/typesetting.pdf Perl module Compress::Zlib not available - cannot compress this pdf hdr: 176 6 0 0 sl: 2953183232 sl>: 2953183232 sl<: 2953183232 Negative length at /home/schwarze/groff-1.22.4.rc4p2.solaris10/build/gropdf line 2439. GROFF contrib/mom/examples/slide-demo.pdf So the "<" or ">" appears to be totally ignored by that ancient Perl, even though the feature is already documented. I don't think we should attempt to work around that ancient Perl bug. I mean, srsly, Perl 5.8.4 in 2018? On Solaris 9, installation still fails because of the "for f in ; do" we discussed earlier, and the test suite still fails as shown at the end (no change in that respect), but i see no regressions from your patch. But the following seems suspicious (on OpenBSD): $ grep hypot ../configure gl_hypot_required=plain # Code from module hypot: gl_LIBOBJS="$gl_LIBOBJS hypot.$ac_objext" $ grep hypot config.log config.status [ no output ] $ find . -name '*hypot*' ./src/libs/libgroff/.deps/libgroff_a-hypot.Po ./src/libs/libgroff/libgroff_a-hypot.o ./lib/.deps/hypot.Po Nothing whatsoever is tested, and looking at src/libs/libgroff/hypot.cpp, it is merely a completely trivial wrapper. So what is the gnulib "hypot" module supposed to do? If it does nothing, why do you even use it? Yours, Ingo > diff --git a/bootstrap.conf b/bootstrap.conf > index 5161d1fd..6cf16c84 100644 > --- a/bootstrap.conf > +++ b/bootstrap.conf > @@ -43,6 +43,7 @@ gnulib_modules=" > fprintf-posix > snprintf > vsnprintf > + hypot > " > > # Name of the Makefile.am > diff --git a/configure.ac b/configure.ac > index cb2bd10a..e0a049f6 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -95,7 +95,6 @@ GROFF_POSIX > # checks for header stuff > GROFF_SRAND > GROFF_NEED_DECLARATION([gettimeofday]) > -GROFF_NEED_DECLARATION([hypot]) > GROFF_NEED_DECLARATION([popen]) > GROFF_NEED_DECLARATION([pclose]) > GROFF_NEED_DECLARATION([putenv]) > diff --git a/src/libs/libgroff/hypot.cpp b/src/libs/libgroff/hypot.cpp > index 3eb2fb96..1fa44d46 100644 > --- a/src/libs/libgroff/hypot.cpp > +++ b/src/libs/libgroff/hypot.cpp > @@ -20,10 +20,6 @@ along with this program. If not, see > <http://www.gnu.org/licenses/>. */ > > #include <math.h> > > -#ifdef NEED_DECLARATION_HYPOT > - double hypot(double, double); > -#endif /* NEED_DECLARATION_HYPOT */ > - > double groff_hypot(double x, double y) > { > double result = hypot(x, y); ----- 8< ----- schnipp ----- >8 ----- 8< ----- schnapp ----- >8 ----- > uname -a SunOS unstable9s 5.9 Generic_Virtual sun4u sparc SUNW,SPARC-Enterprise-T5220 > cat test-suite.log ======================================== GNU Troff 1.22.4: ./test-suite.log ======================================== # TOTAL: 3 # PASS: 2 # SKIP: 0 # XFAIL: 0 # FAIL: 1 # XPASS: 0 # ERROR: 0 .. contents:: :depth: 2 FAIL: contrib/mom/examples/tests-mom.sh ======================================= ./contrib/mom/examples/tests-mom.sh: !: not found ./contrib/mom/examples/tests-mom.sh: !: not found ./contrib/mom/examples/tests-mom.sh: !: not found ./contrib/mom/examples/tests-mom.sh: !: not found ./contrib/mom/examples/tests-mom.sh: !: not found ./contrib/mom/examples/tests-mom.sh: !: not found Checking number of pages of /home/schwarze/groff-1.22.4.rc4p2.solaris9/build/con trib/mom/examples/letter.pdf pdfinfo: cannot find/execute "pdfinfo" in ISA subdirectories Error: expected 1 pages, found pages Checking number of pages of /home/schwarze/groff-1.22.4.rc4p2.solaris9/build/con trib/mom/examples/mom-pdf.pdf pdfinfo: cannot find/execute "pdfinfo" in ISA subdirectories Error: expected 8 pages, found pages Checking number of pages of /home/schwarze/groff-1.22.4.rc4p2.solaris9/build/con trib/mom/examples/mon_premier_doc.pdf pdfinfo: cannot find/execute "pdfinfo" in ISA subdirectories Error: expected 5 pages, found pages Checking number of pages of /home/schwarze/groff-1.22.4.rc4p2.solaris9/build/con trib/mom/examples/sample_docs.pdf pdfinfo: cannot find/execute "pdfinfo" in ISA subdirectories Error: expected 12 pages, found pages Checking number of pages of /home/schwarze/groff-1.22.4.rc4p2.solaris9/build/con trib/mom/examples/slide-demo.pdf pdfinfo: cannot find/execute "pdfinfo" in ISA subdirectories Error: expected 27 pages, found pages Checking number of pages of /home/schwarze/groff-1.22.4.rc4p2.solaris9/build/con trib/mom/examples/typesetting.pdf pdfinfo: cannot find/execute "pdfinfo" in ISA subdirectories Error: expected 3 pages, found pages Checking if /home/schwarze/groff-1.22.4.rc4p2.solaris9/build/contrib/mom/example s/typesetting.pdf has images pdfimages: cannot find/execute "pdfimages" in ISA subdirectories no images found Checking if /home/schwarze/groff-1.22.4.rc4p2.solaris9/build/contrib/mom/example s/slide-demo.pdf has images pdfimages: cannot find/execute "pdfimages" in ISA subdirectories no images found