Opened 2 years ago

Closed 2 years ago

#57154 closed defect (fixed)

dvisvgm @2.3.4: build failure

Reported by: hugo-ribeiro (Hugo Ribeiro) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: Cc: drkp (Dan Ports), mojca (Mojca Miklavec), mf2k (Frank Schima), ryandesign (Ryan Schmidt), hapaguy (Brian Kurt Fujikawa), michaelld (Michael Dickens), diochnos, captainproton1971 (Captain Proton), basmac
Port: xmlto dvisvgm

Description

The problem might be due to the installation script looking for grep instead of ggrep; I have the macports version of grep installed (grep @3.1_1).

if [ `type -p asciidoc` ]; then \
                asciidoc -a icons -a 'iconsdir=.' -a badges -a 'revnumber=2.3.4' --unsafe -bdocbook -dmanpage -o dvisvgm-man.xml.tmp dvisvgm.txt; \
                xsltproc -o dvisvgm-man.xml ../doc/tweak-db-refentry.xsl dvisvgm-man.xml.tmp; \
                rm dvisvgm-man.xml.tmp; \
        fi
if [ `type -p xmlto` ]; then \
                xmlto -m ../doc/conf-dblatex-man.xsl --stringparam man.endnotes.list.enabled=0 --stringparam man.endnotes.are.numbered=0 --stringparam man.authors.section.enabled=0 man dvisvgm-man.xml; \
        fi
/opt/local/bin/xmlto: line 264: /opt/local/bin/grep: No such file or directory
Input file /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_dvisvgm/dvisvgm/work/dvisvgm-2.3.4/doc/dvisvgm-man.xml not found
make[2]: *** [dvisvgm.1] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_dvisvgm/dvisvgm/work/dvisvgm-2.3.4/doc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_dvisvgm/dvisvgm/work/dvisvgm-2.3.4'
make: *** [all] Error 2

However, during the configuration part ggrep is detected.

checking for grep that handles long lines and -e... /opt/local/bin/ggrep

p.s: the port has no maintainer. I'm cc'ing drkp since he was the last one submitting a commit for dvisvgm.

Attachments (7)

main.log (118.6 KB) - added by hugo-ribeiro (Hugo Ribeiro) 2 years ago.
dvisvgm-fail-tiger-no-asciidoc.log (1.1 MB) - added by kencu (Ken) 2 years ago.
build failure on tiger if asciidoc is not installed…
dvisvgm-fail-tiger-debug.log (253.8 KB) - added by kencu (Ken) 2 years ago.
dvisvgm-fail-tiger-make-debug.log (17.7 KB) - added by kencu (Ken) 2 years ago.
dvisvgm-success-tiger-make-debug-with-asciidoc-installed.log (17.6 KB) - added by kencu (Ken) 2 years ago.
make -d all in doc directory with asciidoc installed
diochnos_fail_without_asciidoc.log (125.6 KB) - added by diochnos 2 years ago.
Fail log without asciidoc installed
diochnos_fail_with_asciidoc.log (158.5 KB) - added by diochnos 2 years ago.
Fail log with asciidoc installed

Download all attachments as: .zip

Change History (37)

Changed 2 years ago by hugo-ribeiro (Hugo Ribeiro)

Attachment: main.log added

comment:1 Changed 2 years ago by jmroot (Joshua Root)

Port: xmlto added

Looks like the path to grep is baked in to xmlto.

comment:2 Changed 2 years ago by jmroot (Joshua Root)

And dvisvgm doesn't declare a dependency on xmlto either.

comment:3 Changed 2 years ago by mojca (Mojca Miklavec)

Cc: mojca added

comment:4 Changed 2 years ago by mojca (Mojca Miklavec)

Cc: mf2k ryandesign added

My xmlto says the following:

# Utilities that we need that aren't everywhere
FIND=/opt/local/bin/gfind     # This must be GNU find (need -maxdepth)
MKTEMP=mktemp # See http://www.mktemp.org if missing on your system
BASH=/bin/sh     # GNU bash, for running the format scripts
GETOPT=/opt/local/bin/getopt # a getopt that supports --longoptions
TAIL=/opt/local/bin/gtail     # a tail that supports -n (posix)
GREP=/usr/bin/grep     # GNU grep, for searching patterns
SED=/usr/bin/sed       # GNU sed, for modification of patterns

This looks as if your xmlto was compiled when whatever port provides /opt/local/bin/grep was active, and now you deactivated/uninstalled it. I would classify this to be a problem with xmlto Any executable listed in the file needs to be at least a runtime dependency of xmlto. So this is primarily a problem of xmlto rather than a problem with dvisvgm.

The unrelated problem is that xmlto should not be called when building dvisvgm in the first place, at least not when building from a release. Given that it wasn't installed on my machine (and I did compile dvisvgm from source in the last couple of days) it apparently uses it opportunistically.

comment:5 in reply to:  4 Changed 2 years ago by ryandesign (Ryan Schmidt)

Replying to mojca:

This looks as if your xmlto was compiled when whatever port provides /opt/local/bin/grep was active, and now you deactivated/uninstalled it.

Or rather, it was compiled with grep @3.1_0 or earlier active. As of grep @3.1_1, it doesn't provide /opt/local/bin/grep anymore; it now provides /opt/local/bin/ggrep.

I would classify this to be a problem with xmlto Any executable listed in the file needs to be at least a runtime dependency of xmlto. So this is primarily a problem of xmlto rather than a problem with dvisvgm.

That's one of the two problems, yes.

The unrelated problem is that xmlto should not be called when building dvisvgm in the first place, at least not when building from a release.

Right, that's the second problem.

comment:6 Changed 2 years ago by hapaguy (Brian Kurt Fujikawa)

Cc: hapaguy added

comment:7 Changed 2 years ago by JeffFessler (Jeff Fessler)

Anybody have a workaround for this issue?
My upgrade to texlive-bin-extra failed because it depends on this dvisvgm so now texlive is broken :(
BTW, in my case "which grep" returns /usr/bin/grep for what it's worth. Thanks.

comment:8 Changed 2 years ago by jmroot (Joshua Root)

Cc: michaelld added

[dd83f69f8bfbc7c2ad240d91790bd841b481d84d/macports-ports] was an attempt to fix this, but now it will be broken for users who don't have the grep and gsed ports installed.

comment:9 Changed 2 years ago by michaelld (Michael Dickens)

Sorry about that breakage; luckily it was caught quickly! I just pushed the fix.

I was having the exact issue of this ticket, and fixing xmlto resolved the issue for me. [Updating dvisvgm to the latest version is a little more challenging, since it now has extra dependencies, some of which don't exist in MacPorts ...]

Last edited 2 years ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:10 Changed 2 years ago by diochnos

Cc: diochnos added

comment:11 Changed 2 years ago by captainproton1971 (Captain Proton)

Cc: captainproton1971 added

comment:12 Changed 2 years ago by mojca (Mojca Miklavec)

Can this ticket be closed now?

I opened two feature requests:

Last edited 2 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:13 Changed 2 years ago by kencu (Ken)

needs asciidoc as well? I might be wrong about this. Retesting...

Edit:

It seems to need asciidoc on Tiger, at least. Build fails without asciidoc installed. Testing other systems.

Last edited 2 years ago by kencu (Ken) (previous) (diff)

comment:14 Changed 2 years ago by mojca (Mojca Miklavec)

Well, it "needs" asciidoc, xmlto, xsltproc. However, it doesn't really need them, it just opportunistically runs them when present, to build stuff like man page which doesn't exist in development sources, but exists in the released version. I didn't inspect into details, but I assume all those calls are pretty much useless.

Changed 2 years ago by kencu (Ken)

build failure on tiger if asciidoc is not installed...

comment:15 Changed 2 years ago by kencu (Ken)

I admit I don't really understand why it needs asciidoc on Tiger and apparently not on other systems. Not a big deal. I just installed asciidoc on my Tiger box and all is well...

comment:16 Changed 2 years ago by mojca (Mojca Miklavec)

Can you please provide the log?

comment:17 in reply to:  16 Changed 2 years ago by kencu (Ken)

Replying to mojca:

Can you please provide the log?

Above.

attachment:dvisvgm-fail-tiger-no-asciidoc.log

Last edited 2 years ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:18 Changed 2 years ago by mojca (Mojca Miklavec)

The log merely says

/opt/local/bin/xmlto: line 1: /opt/local/bin/grep: No such file or directory

Nothing related to asciidoc.

comment:19 Changed 2 years ago by kencu (Ken)

mmm. Late at night I guess -- the log I uploaded seems to concatenate a few logs together, although I didn't realize macports would concatenate them like that. I'll send up a completely clean one.

The error I saw finally was at the very end of the log I uploaded:

:info:build Making all in doc
:info:build make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_dvisvgm/dvisvgm/work/dvisvgm-2.3.4/doc'
:info:build if [ `type -p asciidoc` ]; then \
:info:build 	asciidoc -a icons -a 'iconsdir=.' -a badges -a 'revnumber=2.3.4' --unsafe -bdocbook -dmanpage -o dvisvgm-man.xml.tmp dvisvgm.txt; \
:info:build 	xsltproc -o dvisvgm-man.xml ../doc/tweak-db-refentry.xsl dvisvgm-man.xml.tmp; \
:info:build 	rm dvisvgm-man.xml.tmp; \
:info:build fi
:info:build if [ `type -p xmlto` ]; then \
:info:build 	xmlto -m ../doc/conf-dblatex-man.xsl --stringparam man.endnotes.list.enabled=0 --stringparam man.endnotes.are.numbered=0 --stringparam man.authors.section.enabled=0 man dvisvgm-man.xml; \
:info:build fi
:info:build Input file /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_dvisvgm/dvisvgm/work/dvisvgm-2.3.4/doc/dvisvgm-man.xml not found
:info:build make[2]: *** [dvisvgm.1] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_dvisvgm/dvisvgm/work/dvisvgm-2.3.4/doc'
:info:build make[1]: *** [all-recursive] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_dvisvgm/dvisvgm/work/dvisvgm-2.3.4'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_dvisvgm/dvisvgm/work/dvisvgm-2.3.4'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_dvisvgm/dvisvgm/work/dvisvgm-2.3.4" && /usr/bin/make -j2 -w all 
:info:build Exit code: 2

and here, it seems to error because of a missing input file:

:info:build Input file /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_dvisvgm/dvisvgm/work/dvisvgm-2.3.4/doc/dvisvgm-man.xml not found

which appears to be generated by asciidoc a few lines earlier - and sure enough it builds if asciidoc is available.

I just tried building from source on Leopard PPC and that works fine without asciidoc installed...

Last edited 2 years ago by kencu (Ken) (previous) (diff)

comment:20 Changed 2 years ago by kencu (Ken)

I'll upload a full clean failing log. I'll also upload a debug log made using make -d in the doc directory.

Last edited 2 years ago by kencu (Ken) (previous) (diff)

Changed 2 years ago by kencu (Ken)

Changed 2 years ago by kencu (Ken)

Changed 2 years ago by kencu (Ken)

make -d all in doc directory with asciidoc installed

Changed 2 years ago by diochnos

Fail log without asciidoc installed

Changed 2 years ago by diochnos

Fail log with asciidoc installed

comment:21 Changed 2 years ago by diochnos

Attached two logs from my end: OS X 10.13.6, MacPorts 2.5.3.

  1. diochnos_fail_without_asciidoc.log: this is the log file that I obtained when asciidoc was not installed on my system and I attempted to upgrade the ports.
  1. diochnos_fail_with_asciidoc.log: this is the log file that I obtained after first installing asciidoc and then attempting to upgrade the ports.

In this second case I received the following messages:

--->  Computing dependencies for dvisvgm
--->  Fetching distfiles for dvisvgm
--->  Verifying checksums for dvisvgm
--->  Extracting dvisvgm
--->  Configuring dvisvgm
--->  Building dvisvgm
--->  Staging dvisvgm into destroot
--->  Installing dvisvgm @2.3.4_3
Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents.
The following ports will break: texlive @2018_0
Continue? [y/N]: N
--->  Activating dvisvgm @2.3.4_3
Error: Failed to activate dvisvgm: Image error: /opt/macports/high_sierra/bin/dvisvgm is being used by the active texlive-bin-extra port.  Please deactivate this port first, or use 'port -f activate dvisvgm' to force the activation.
Error: See /opt/macports/high_sierra/var/macports/logs/_opt_macports_high_sierra_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_dvisvgm/dvisvgm/main.log for details.
Error: Problem while installing dvisvgm
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

Hope this helps in this process.

comment:22 Changed 2 years ago by mojca (Mojca Miklavec)

@diochnos: doesn't this commit solve the problem? Do you have the latest version of port definitions (did you run sudo port selfupdate very recently)? Your xmlto seems outdated in any case.

Last edited 2 years ago by mojca (Mojca Miklavec) (previous) (diff)

comment:23 in reply to:  22 ; Changed 2 years ago by diochnos

Replying to mojca:

I did run sudo port selfupdate and indeed xmlto is outdated. However if I attempt to upgrade the ports, it first tries to update texlive-bin-extra. These are the ports that I currently have outdated on my system (sudo port outdated):

texlive-bin-extra              47446_0 < 47446_1         
xmlto                          0.0.28_1 < 0.0.28_3       
xorg-libXcomposite             0.4.4_0 < 0.4.4_1         
xorg-libXcursor                1.1.14_0 < 1.1.15_1       
xorg-libXinerama               1.1.3_0 < 1.1.4_1         
xorg-libXrandr                 1.5.1_0 < 1.5.1_1         
xorg-libXtst                   1.2.3_0 < 1.2.3_1         
youtube-dl                     2018.08.04_0 < 2018.09.26_0  

I will probably go about and uninstall texlive-bin-extra, upgrade everything else, and then attempt to bring back in texlive-bin-extra.

comment:24 in reply to:  23 Changed 2 years ago by diochnos

Replying to diochnos:

Indeed, uninstalling texlive-bin-extra (ignoring the warning that texlive will be broken), then upgrading all the other ports and then re-installing texlive-bin-extra brings dvisvgm back in and everything seems to be working without any issues.

So, I should be good. Thank you all.

comment:25 Changed 2 years ago by galsondor (Scott G. Ainsworth)

For me, installing asciidoc resolved the dvisvgm build failure on both macOS 10.13.6 and 10.14 (MacPorts v2.5.3).

comment:26 Changed 2 years ago by michaelld (Michael Dickens)

Ditto the prior comment for me.

comment:27 Changed 2 years ago by kencu (Ken)

should we just make asciidoc a build dep until we sort this out?

comment:28 Changed 2 years ago by michaelld (Michael Dickens)

I'm good with adding asciidoc as a dependency for now.

comment:29 Changed 2 years ago by basmac

Cc: basmac added

comment:30 Changed 2 years ago by michaelld (Michael Dickens)

Owner: set to michaelld
Resolution: fixed
Status: newclosed

In 1fae2917511abb38449461b97974a399e9891a39/macports-ports (master):

dvisvgm: add asciidoc as dependency

Closes: #57154

Note: See TracTickets for help on using tickets.