[MacPorts] #71473: p5.34-pdf-builder @3.26.0 cannot be tested with Perl 5.34 on PPC Mac OS X 10.4.11, Tiger, because File::Temp in Perl's core fails to create directory

MacPorts noreply at macports.org
Fri Dec 6 16:04:48 UTC 2024


#71473: p5.34-pdf-builder @3.26.0 cannot be tested with Perl 5.34 on PPC Mac OS X
10.4.11, Tiger, because File::Temp in Perl's core fails to create directory
-----------------------+------------------------------------------
 Reporter:  ballapete  |      Owner:  (none)
     Type:  defect     |     Status:  new
 Priority:  Normal     |  Milestone:
Component:  ports      |    Version:  2.10.5
 Keywords:  tiger ppc  |       Port:  p5-pdf-builder, p5-file-temp
-----------------------+------------------------------------------
 Before it could be tested 104 Perl Modules were successfully built and
 installed. After `build` the module was `installed in destroot` and then
 the `test phase` could start:

 {{{
 --->  Testing p5.34-pdf-builder
 Executing:  cd
 "/opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5
 -pdf-builder/p5.34-pdf-builder/work/PDF-Builder-3.026" && /usr/bin/make
 test
 PERL_DL_NONLAZY=1 "/opt/local/bin/perl5.34" "-MExtUtils::Command::MM"
 "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0,
 'blib/lib', 'blib/arch')" t/*.t
 t/00-all-usable.t ........... ok
 ...
 t/string.t .................. ok
 t/text.t .................... ok
 convert.orig: no images defined
 `/opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5
 -pdf-builder/p5.34-pdf-builder/work/.tmp/MJ7gloVpTs/test.tif' @
 error/convert.c/ConvertImageCommand/3234.
 Error:
 /opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5
 -pdf-builder/p5.34-pdf-builder/work/.tmp/MJ7gloVpTs/test.tif not found
 # Looks like your test exited with 2 just after 8.
 t/tiff.t ....................
 Dubious, test returned 2 (wstat 512, 0x200)
 Failed 11/19 subtests
 t/version.t ................. ok
 t/viewer-preferences.t ...... ok

 Test Summary Report
 -------------------
 t/tiff.t                  (Wstat: 512 (exited 2) Tests: 8 Failed: 0)
   Non-zero exit status: 2
   Parse errors: Bad plan.  You planned 19 tests but ran 8.
 Files=44, Tests=783, 161 wallclock secs ( 1.10 usr  0.67 sys + 105.08 cusr
 12.79 csys = 119.64 CPU)
 Result: FAIL
 Failed 1/44 test programs. 0/783 subtests failed.
 make: *** [test_dynamic] Error 255
 Command failed:  cd
 "/opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5
 -pdf-builder/p5.34-pdf-builder/work/PDF-Builder-3.026" && /usr/bin/make
 test
 Exit code: 2
 Error: Failed to test p5.34-pdf-builder: command execution failed
 Error: See
 /opt/local/var/macports/logs/nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5
 -pdf-builder/p5.34-pdf-builder/main.log for details.
 }}}

 It all happened on a patched version of MacPorts 2.10.5, see #70539.

 Because I had encountered the test failure bedore and assumed that PDF-
 Builder had a bug that came to fruition on (PPC) Tiger only I opened a bug
 report here: https://github.com/PhilterPaper/Perl-PDF-
 Builder/issues/223#issuecomment-2521305480. So I had a `convert shell
 script` at hand that takes the arguments passed from Perl to
 `ImageMagick's convert` and saves them in a file in /tmp.

 The shell script has this contents:

 {{{
       1 #!/bin/bash
       2 #       Time-stamp: <2024-12-04 21:06:03 root>
       3 #
       4 #       @(#) convert: Substitute for ImageMagick's convert
       5 #                     Records convert's arguments in a file
       6 #                     Because of problems with PDF-Builder's
 t/tiff.t
       7 #
       8 if [ ! -e /tmp/ ]; then          # work-around for a chroot
 environment?
       9     mkdir /tmp
      10 fi
      11 Speicher=/tmp/Convert-Argumente
      12 Datum="$(date "+%F %T")"
      13 printf "%s – %2d args: %s\n" "$Datum" $# "$*" >> $Speicher
      14 pstree -w -p $$ >> $Speicher
      15 convert.orig "$@"
 }}}

 The contents of `/tmp/Convert-Argumente` after the test is:

 {{{
 2024-12-06 15:44:07 –  1 args: -version
 -+= 00001 root /sbin/launchd
  \-+- 00646 root /usr/local/bin/emacs-24.5 -xrm Emacs*iconName: Tiger-
 Kastel -xrm Emacs.FontBackend: xft,ftx,x -T Tiger-Kastel 2009 -geometry
 246x69+50+25 -fn Lucida Sans Typewriter-7
    \-+= 02250 root -bin/tcsh -c time nice +11 port -vs test p5.34-pdf-
 builder
      \-+- 02256 macports /opt/local/libexec/macports/bin/tclsh8.6
 /opt/local/bin/port -vs test p5.34-pdf-builder
        \-+- 02279 macports sh -c  cd
 "/opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5
 -pdf-builder/p5.34-pdf-builder/work/PDF-Builder-3.026" && /usr/bin/make
 test
          \-+- 02280 macports /usr/bin/make test
            \-+- 02289 macports /opt/local/bin/perl5.34
 -MExtUtils::Command::MM -MTest::Harness -e undef *Test::Harness::Switches;
 test_harness(0, 'blib/lib', 'blib/arch') t/00-all-usable.t t/01-basic.t
 t/02-xrefstm.t t/03-xrefstm-index.t t/annotate.t t/barcode.t t/bbox.t t
 /circular-references.t t/cmap.t t/content-deprecated.t t/content.t t/cs-
 webcolor.t t/deprecations.t t/extgstate.t t/filter-ascii85decode.t t
 /filter-asciihexdecode.t t/filter-lzwdecode.t t/filter-runlengthdecode.t t
 /font-corefont.t t/font-synfont.t t/font-ttf.t t/font-type1.t t/gd.t
 t/gif.t t/info.t t/jpg.t t/lite.t t/named-destinations.t t/outline.t
 t/page.t t/papersizes.t t/pdf.t t/png.t t/pnm.t t/rt120397.t t/rt120450.t
 t/rt126274.t t/rt67767.t t/rt69503.t t/string.t t/text.t t/tiff.t
 t/version.t t/viewer-preferences.t
              \-+- 02334 macports /opt/local/bin/perl5.34 t/tiff.t
                \-+- 02335 macports /bin/bash /opt/local/bin/convert
 -version
                  \-+- 02337 macports pstree -w -p 2335
                    \--- 02338 root ps -axwwo user
 2024-12-06 15:44:09 – 10 args: -depth 1 -gravity center -pointsize 78
 -size 1000x100 caption:A caption for the image
 /opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5
 -pdf-builder/p5.34-pdf-builder/work/.tmp/MJ7gloVpTs/test.tif
 -+= 00001 root /sbin/launchd
  \-+- 00646 root /usr/local/bin/emacs-24.5 -xrm Emacs*iconName: Tiger-
 Kastel -xrm Emacs.FontBackend: xft,ftx,x -T Tiger-Kastel 2009 -geometry
 246x69+50+25 -fn Lucida Sans Typewriter-7
    \-+= 02250 root -bin/tcsh -c time nice +11 port -vs test p5.34-pdf-
 builder
      \-+- 02256 macports /opt/local/libexec/macports/bin/tclsh8.6
 /opt/local/bin/port -vs test p5.34-pdf-builder
        \-+- 02279 macports sh -c  cd
 "/opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5
 -pdf-builder/p5.34-pdf-builder/work/PDF-Builder-3.026" && /usr/bin/make
 test
          \-+- 02280 macports /usr/bin/make test
            \-+- 02289 macports /opt/local/bin/perl5.34
 -MExtUtils::Command::MM -MTest::Harness -e undef *Test::Harness::Switches;
 test_harness(0, 'blib/lib', 'blib/arch') t/00-all-usable.t t/01-basic.t
 t/02-xrefstm.t t/03-xrefstm-index.t t/annotate.t t/barcode.t t/bbox.t t
 /circular-references.t t/cmap.t t/content-deprecated.t t/content.t t/cs-
 webcolor.t t/deprecations.t t/extgstate.t t/filter-ascii85decode.t t
 /filter-asciihexdecode.t t/filter-lzwdecode.t t/filter-runlengthdecode.t t
 /font-corefont.t t/font-synfont.t t/font-ttf.t t/font-type1.t t/gd.t
 t/gif.t t/info.t t/jpg.t t/lite.t t/named-destinations.t t/outline.t
 t/page.t t/papersizes.t t/pdf.t t/png.t t/pnm.t t/rt120397.t t/rt120450.t
 t/rt126274.t t/rt67767.t t/rt69503.t t/string.t t/text.t t/tiff.t
 t/version.t t/viewer-preferences.t
              \-+- 02334 macports /opt/local/bin/perl5.34 t/tiff.t
                \-+- 02342 macports /bin/bash /opt/local/bin/convert -depth
 1 -gravity center -pointsize 78 -size 1000x100 caption:A caption for the
 image
 /opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5
 -pdf-builder/p5.34-pdf-builder/work/.tmp/MJ7gloVpTs/test.tif
                  \-+- 02344 macports pstree -w -p 2342
                    \--- 02345 root ps -axwwo user
 }}}

 The `original convert binary convert.orig` complained at the end of
 MacPorts' test phase that "no images [were] defined" in a certain
 directory in MacPorts' build area. Here is a view into its parent
 directory:

 {{{
 root 342 /\ ls -l
 /opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5
 -pdf-builder/p5.34-pdf-builder/work/.tmp/
 total 16
 -rw-------   1 macports  admin   874  6 Dez 15:43 cZpqJoETWa
 -rw-------   1 macports  admin  1350  6 Dez 15:43 lhqVJ1f_IL
 }}}

 The targeted directory, also echoed into the file `/tmp/Convert-
 Argumente`, does not exist, so no file could (can) be created therein

 The test file PDF-Builder uses, is
 `/opt/local/var/macports/build/nue.de.rsync.macports.org_macports_release_tarballs_ports_perl_p5
 -pdf-builder/p5.34-pdf-builder/work/PDF-Builder-3.026/t/tiff.t`. it has

 {{{
      94 # common data for remaining tests
      95 my $width = 1000;
      96 my $height = 100;
      97 my $directory = File::Temp->newdir();
      98 my $tiff_f = File::Spec->catfile($directory, 'test.tif');
      99 my $pdfout = File::Spec->catfile($directory, 'test.pdf');
     100 my $pngout = File::Spec->catfile($directory, 'out.png');
 }}}

 to create a temporary sub-directory  for its test files. Questioning
 `convert` for its version works, because it does not need any other
 directory to work in. This is the statement that produces the test
 failrure:

 {{{
     159 system("$convert -depth 1 -gravity center -pointsize 78 -size
 ${width}x${height} caption:\"A caption for the image\" $tiff_f");
 }}}

 –––––––––––––––––––

 My first tests were too simple, knowing that MacPorts had recorded the
 test failure's state, I only changed the contents of line #159: \"  ->  '.
 This obviously succeeded, because MacPorts did not show an error and
 finished `test` successfully. Could be File::Temp and/or File::Spec
 managed to create a sub-directory in `${workpath}/.tmp` because they need
 two steps on Tiger. (Or I only saw what I wished to see?)

 –––––––––––––––––––

 I also tried to `test in /tmp`, assigning simply `my $directory = '/tmp';`
 or `my $directory = '/tmp/';` (because /tmp is a sym-link) or `my
 $directory = "/tmp";` variations. Agaiin FAILures. Finally I created in
 /tmp the directory `PDF-Builder` with useful permission settings (with and
 without g+s, of course with a changed line #97 in t/tiff.t):

 {{{
 tiger pete 228 /\  ls -l /tmp/
 total 72
 -rw-r--r--   1 macports  wheel  3972  6 Dez 15:44 Convert-Argumente
 drwxrwsr-t   2 macports  wheel    68  6 Dez 15:39 PDF-Builder
 }}}

 FAILures again.

 IMO it's not `PDF-Builder` that produces the FAILuses on PPC Tiger but
 `File::Temp/File::Spec`, both `in Perl's core`. (But it's possible that
 Phil did not use the other modules properly – which only shows on Tiger!
 Not that likely…)

-- 
Ticket URL: <https://trac.macports.org/ticket/71473>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list