On Thu, Oct 24, 2024 at 11:26:58PM +0100, Deri wrote:
> On Thursday, 24 October 2024 20:46:32 BST Bjarni Ingi Gislason wrote:
> > GROFF contrib/hdtbl/examples/mixed_pickles.pdf
> > Attempt to call undefined import method with arguments ("splitpath") via
> > package "File::Spec" (Perhaps you forgot to load the package?) at
> > /home/bg/git/groff/build/gropdf line 29.
> >
> > Line 29 is
> >
> > use File::Spec qw(splitpath);
> >
> > N.B. perl is now
> >
> > This is perl 5, version 40, subversion 0 (v5.40.0) built for
> > x86_64-linux-gnu-thread-multi
> > (with 43 registered patches, see perl -V for more detail)
> >
> > Copyright 1987-2024, Larry Wall
> >
> > -.-
> >
> > The "hdtbl.am" file is in the attachment.
> >
> > N.B. The warning is not marked with "warning: ".
>
> Hi Bjarni,
>
> I'm afraid I can't duplicate this, even using your patched hdtbl.am:-
>
> [derij@pip build (master)]$ cp hdtbl.am ../contrib/hdtbl/hdtbl.am
> cp: overwrite '../contrib/hdtbl/hdtbl.am'? y
> [derij@pip build (master)]$ make -j
> cd .. && /bin/sh /home/derij/groff-git/groff/build-aux/missing automake-1.16
> --gnu Makefile
> cd . && /bin/sh ./config.status Makefile depfiles
> config.status: creating Makefile
> config.status: executing depfiles commands
> make all-recursive
> make[1]: Entering directory '/home/derij/groff-git/groff/build'
> make[2]: Entering directory '/home/derij/groff-git/groff/build'
> make[2]: *** No rule to make target 'contrib/hdtbl/examples/fonts.dvi_n.in',
> needed by 'contrib/hdtbl/examples/fonts.dvi_n.roff'. Stop.
> make[2]: *** Waiting for unfinished jobs....
> make[2]: Leaving directory '/home/derij/groff-git/groff/build'
> make[1]: *** [Makefile:10872: all-recursive] Error 1
> make[1]: Leaving directory '/home/derij/groff-git/groff/build'
> make: *** [Makefile:6521: all] Error 2
>
> The message you quote comes from your perl, however, I altered the PSPIC line
> in mixed_plckles.roff to:-
>
> PDFPIC -I -\\n[.l]u ../../doc/gnu.xpm
>
> And ran this command in the contrib/hdtbl directory:-
>
> test-groff -Tpdf -petU -mhdtbl examples/mixed_pickles.roff > mixed_pickles.pdf
>
> Output attached, no messages output, looks Ok.
>
Thanks for looking into this.
I assume that you do use a different (older) version of perl than I have
now.
Using your change does not improve the compilation as
a) gropdf: warning: './../doc/gnu.xpm' does not appear to be a pdf file
and there is no picture in the output file
b) If I create "gnu.pdf" with "ps2pdfwr", there is no picture
GROFF contrib/hdtbl/examples/mixed_pickles.pdf
troff: backtrace: '/home/bg/git/groff/build/s-tmac/pdfpic.tmac':44: macro
'pdfpic@get-image-dimensions'
troff: backtrace: '/home/bg/git/groff/build/s-tmac/pdfpic.tmac':132: macro
'PDFPIC'
troff: backtrace: file
'/home/bg/git/groff/build/../doc/../contrib/hdtbl/examples/mixed_pickles.roff':51
troff:/home/bg/git/groff/build/../doc/../contrib/hdtbl/examples/mixed_pickles.roff:51:
warning: macro '.if' not defined
gropdf: warning: PDF Dict Key '[' does not start with '/'
Line 51:
. if '\*[.T]'pdf' \{\
. PDFPIC -I -\\n[.l]u ../doc/gnu.pdf\" <-- line 51
.\". PSPIC -I -\\n[.l]u gnu.eps
. \}
.