Opened 5 years ago

Closed 4 years ago

#58615 closed defect (fixed)

texlive-bin-extra @50853_1+doc: texdoc cannot find texlive.tlpdb

Reported by: nstanger (Nigel Stanger) Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: dliessi (Davide Liessi), guillaumesalagnac, FredericVivien (Frédéric Vivien), ballapete (Peter "Pete" Dyballa)
Port: texlive-bin-extra

Description

When I attempt to run texdoc, I get the following error:

texdoc error: No texlive.tlpdb nor shipped tlpdb data found

As far as I can tell this coincided with the recent switch to TeX Live 2019 (I use texdoc frequently and it worked OK under 2018). A complete uninstall, clean, and re-install of all ports related to TeX Live 2019 had no effect, other than taking quite some time :).

It looks like texlive.tlpdb is normally generated bytlmgr (see https://tex.stackexchange.com/q/137428), which of course isn’t used by or included in the texlive ports.

The error message itself comes from line 588 of texdoclib-search.tlu (https://github.com/TeX-Live/texdoc/blob/5f8b971c265db526ab6c0a456eb14c93923e211c/script/texdoclib-search.tlu#L588). On lines lines 683–704 it looks like the script searches for a local package database file, and when it can’t find one, calls get_tlpinfo_from_dist() to find the version supplied with the distribution (confirmed by the attached debug output, which includes the debug message from line 702), and that doesn’t exist. I’ve not used Lua at all, so that’s about as far as I get.

I’m running High Sierra 10.13.6, FWIW.

Attachments (1)

texdoc_debug_output.txt (3.2 KB) - added by nstanger (Nigel Stanger) 5 years ago.
Debug output from texdoc --debug verbatim

Download all attachments as: .zip

Change History (19)

Changed 5 years ago by nstanger (Nigel Stanger)

Attachment: texdoc_debug_output.txt added

Debug output from texdoc --debug verbatim

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

Cc: dports@… removed
Owner: changed from dports@… to drkp

comment:2 Changed 5 years ago by hansgans

Same issue here

comment:3 Changed 5 years ago by dliessi (Davide Liessi)

Cc: dliessi added

comment:4 Changed 5 years ago by guillaumesalagnac

Cc: guillaumesalagnac added

comment:5 Changed 5 years ago by FredericVivien (Frédéric Vivien)

I have the very same problem. I am running macOS Mojave 10.14.6. I have uninstalled all texlive-* packages from my macport installation and re-installed them. The problem remains the same...

comment:6 Changed 5 years ago by FredericVivien (Frédéric Vivien)

Cc: FredericVivien added

comment:7 Changed 5 years ago by sjLambda (Lambda Coder)

Same problem on mac OS 10.15.1 and 10.11.6; cleaned macports and reinstalled on both to no avail. Same error msg. Here's the default location -f switch shows:

texdoc -f cfr-lm

/opt/local/share/texmf-texlive/scripts/texdoc/texdoclib.tlu 3.1
Configuration files are:
    active	/opt/local/share/texmf-texlive/texdoc/texdoc.cnf
Recommended file(s) for personal settings:
    /Users/sjeer/Library/texmf/texdoc/texdoc.cnf

comment:8 Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

A few minutes ago I had a similar problem (xelatex did not understand polyglossia, texdoc did not find texlive.tlpdb). Since I had migrated from an old unsupported MacBook with High Sierra to one with Catalina and had to reinstall MacPorts, the MacPorts installer put into my ~/.cshrc a new PATH setting with /opt/local/bin:/opt/local/sbin in front of $PATH. Which is wrong, because I have TeX Live and the MacPorts TeX Live and know to handle these two.

xelatex failed because of a setup not visible in MacPorts TeX Live, and because I invoked texdoc as /usr/local/texlive/2019/bin/x86_64-darwin/texdoc utilities from MacPorts were chosen for execution. Confusion was the result.

So it's possible that you have mixed up path settings… They might even be different in login and in shell/Terminal environment…

comment:9 in reply to:  8 ; Changed 5 years ago by nstanger (Nigel Stanger)

Replying to ballapete:

So it's possible that you have mixed up path settings… They might even be different in login and in shell/Terminal environment…

Not for me. I only have MacPorts Tex Live installed, so it’s definitely not that. texlive.tlpdb just simply doesn’t exist anywhere on my machine.

comment:10 in reply to:  9 Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

Replying to nstanger:

Not for me. I only have MacPorts Tex Live installed, so it’s definitely not that. texlive.tlpdb just simply doesn’t exist anywhere on my machine.

That's correct. This file is used by tlmgr, the TeX Live Manager. This is the tool that is used used to configure and update the TeX Live distribution. MacPorts brings excerpts to the Mac user, no tlmgr involved, no texlive.tlpdb needed.

I don't speak Lua (yet?), but I can see inside /opt/local/share/texmf-texlive/scripts/texdoc/texdoclib-search.tlu that texdoc can distinguish between a vanilla TeX Live distribution and a re-packaged distribution as with MacPorts. And I can also remember a short period of time when texdoc did not work because of a re-implementation that was using a realpath function only existing in Linux. This happened just recently. (And is fixed now in TL.)

Using MacPorts' TeX Live re-distribution I get the same result:

texdoc verbatim
texdoc error: No texlive.tlpdb nor shipped tlpdb data found.
Exit 2

So MacPorts' texdoc does have a bug.

BTW, you can tell texdoc to use the command open -a Skim.app %s or such (TeXShop, Preview, Adobe's Acrobat Reader) to display PDF files.

texdoc debug-config: Setting "viewer_pdf=open -a Skim.app %s" in file "/Users/pete/Library/texmf/texdoc/texdoc.cnf" on line 32.

comment:11 Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

Cc: ballapete added

comment:12 Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

I reported the issue to the texdoc bug base here: https://github.com/TeX-Live/texdoc/issues/53.

comment:13 Changed 5 years ago by dliessi (Davide Liessi)

It is not a bug in upstream texdoc, but a packaging error in MacPorts!

As per the original description of this ticket:

The error message itself comes from line 588 of texdoclib-search.tlu [...]. On lines lines 683–704 it looks like the script searches for a local package database file, and when it can’t find one, calls get_tlpinfo_from_dist() to find the version supplied with the distribution [...], and that doesn’t exist.

Indeed get_tlpinfo_from_dist tries to load data_tlpdb_name, which is defined in texdoclib-const.tlu as texdoc/Data.tlpdb.lua. That file does not exists in MacPorts.

The port should provide either texlive.tlpdb or Data.tlpdb.lua. Instructions to generate the latter are provided in texdoc's README.md file (I think that a copy of texlive.tlpdb is needed to generate the file).

comment:14 in reply to:  13 ; Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

Replying to dliessi:

It is not a bug in upstream texdoc, but a packaging error in MacPorts!

The port should provide either texlive.tlpdb or Data.tlpdb.lua. Instructions to generate the latter are provided in texdoc's README.md file (I think that a copy of texlive.tlpdb is needed to generate the file).

It is not possible to create this auxiliary file locally because $TEXDOC/script does not exist. The bug has to be fixed in the MacPorts ports.

comment:15 in reply to:  14 Changed 5 years ago by dliessi (Davide Liessi)

Replying to ballapete:

It is not possible to create this auxiliary file locally [...]

I didn't mean to suggest it.

The bug has to be fixed in the MacPorts ports.

Indeed.

comment:16 Changed 5 years ago by drkp (Dan Ports)

Yes, we are not installing texlive.tlpdb (which was not required by older versions of texdoc). I will fix this.

comment:17 Changed 4 years ago by drkp (Dan Ports)

Status: assignedaccepted

I have a fix for this on my texlive2020 branch; will merge when that update is complete.

comment:18 Changed 4 years ago by drkp (Dan Ports)

Resolution: fixed
Status: acceptedclosed

In 73396594cf737f853b78c1c64c410a47450dfb06/macports-ports (master):

texlive: update to TeX Live 2020

  • biblatex-biber: update to 2.14
  • texlive-tlpdb: new port to install TeX Live package database

This is used by some scripts nowadays, including texdoc

  • texlive-bin-extra: add perl dependencies for latexindent
  • texlive-bin: provide TeXDist directory structure

Closes: #60541
Closes: #58615
Closes: #51668

Note: See TracTickets for help on using tickets.