epstopdf has no #! line, can't be invoked by scripts (Debian patch available)

Bug #613040 reported by Joost Cassee
28
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Rubber
Invalid
Undecided
Unassigned
rubber (Ubuntu)
Invalid
Undecided
Unassigned
texlive-extra (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

epstopdf invokes perl using:

eval '(exit $?0)' && eval 'exec perl -S $0 ${1+"$@"}' && eval 'exec perl -S $0 $argv:q'

…when it should instead use:

#!/usr/bin/perl

The debian package (texlive-binaries; source package texlive-bin) contains patches which fix this bug, and similar bugs in a2ping, pdfcrop, thumbpdf and vpe.

Original description
====================

Binary package hint: rubber

A LaTeX document I want to compile to PDF using rubber contains Postscript files. These files have to be converted, but the call to epstopdf fails:

$ rubber -vv -d document.tex
...
converting figure.eps to PDF...
executing: epstopdf --outfile=figure.pdf figure.eps
Traceback (most recent call last):
  File "/usr/bin/rubber", line 9, in <module>
    sys.exit(Main()(sys.argv[1:]))
  File "/usr/share/rubber/rubber/cmdline.py", line 296, in __call__
    return self.main(cmdline)
  File "/usr/share/rubber/rubber/cmdline.py", line 260, in main
    ret = env.final.make(self.force)
  File "/usr/share/rubber/rubber/__init__.py", line 223, in make
    ret = src.make()
  File "/usr/share/rubber/rubber/__init__.py", line 237, in make
    ret = self.run()
  File "/usr/share/rubber/rubber/rules/shell.py", line 34, in run
    if self.env.execute(cmd):
  File "/usr/share/rubber/rubber/__init__.py", line 705, in execute
    os.execve(progname, prog, penv)
OSError: [Errno 8] Exec format error
process 6231 (epstopdf) returned 256
'epstopdf' failed

The Gentoo bugzilla has an entry describing the same problem:
http://bugs.gentoo.org/show_bug.cgi?id=289818

Basically, the problem is with the silly perl locating trickery in the first line of epstopdf. Rubber just tries to execute it as an executable, but there is no shebang.

This is rubber package 1.1-2.2ubuntu1 and texlive-font-utils 2009-7ubuntu3 (containing epstopdf) on Ubuntu Lucid / 10.04.

Revision history for this message
John Stowers (nzjrs) wrote :
Joost Cassee (jcassee)
summary: - Convention of graphics using epstopdf fails
+ Conversion of graphics using epstopdf fails
Revision history for this message
Paul Natsuo Kishimoto (khaeru) wrote : Re: Conversion of graphics using epstopdf fails

Per the upstream suggestion, this is a bug in TeX Live itself.

Debian has a patch that adds a proper shebang line to eps2pdf: 12_fix_epstopdf_invocation.diff in texlive-bin_2009-8.diff.gz from http://packages.debian.org/sid/texlive-binaries.

Changed in texlive-extra (Ubuntu):
status: New → Confirmed
Changed in rubber:
status: New → Won't Fix
summary: - Conversion of graphics using epstopdf fails
+ epstopdf has no #! line, can't be invoked by scripts (Debian patch
+ available)
Changed in rubber (Ubuntu):
status: New → Invalid
Changed in rubber:
status: Won't Fix → Invalid
description: updated
Revision history for this message
Henrik Holst (millihenrik) wrote :

This bug is still present in natty (even though the application has moved to the texlive-font-utils package), and the Debian patch which is adding the shebang also works, so could the maintainer please add this patch soon. Or are we waiting for upstream to fix this?

Revision history for this message
Wart (wart-kobold) wrote :

This bug is still present in Precise. I also verified that adding the shebang line to epstopdf fixes the problem.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.