bugGNU source-highlight - Bugs: bug #53022, source-highlight: cannot find...


bug #53022: source-highlight: cannot find input file anywhere outlang.map

Submitted by:  None
Submitted on:  Tue 30 Jan 2018 06:58:02 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 03 Jun 2019 03:59:25 PM UTC, comment #2: 

Also a macOS + brew user here, with the same problem.

I found that running


spots the problem, and asks for a directory, which anon/OP kindly supplied (namely, `/usr/local/share/source-highlight`)

Supplying that value saves a config file which fixes the problem.

I suspect a brew issue, here, so will feed this to that bug-tracker, too.

Geraint Edwards <gedge>
Sun 02 Jun 2019 02:25:59 PM UTC, comment #1: 

This is probably some issue with how it was configured
and/or installed.

The code computes a directory name relative to the
executable, and uses that to find the default datadir.
Mine looks like:

./config.h:#define RELATIVEDATADIR "../share/source-highlight"

so, it looks in $argv0/../share/source-highlight for files.

I don't think there's a good way to see this value if you
just have the executable, but if you have the configure
logs or the like you can probably figure it out.

Where is your executable installed?  If it's in
/usr/local/bin then I'd expect it to work.

Tom Tromey <tromey>
Project Administrator
Tue 30 Jan 2018 06:58:02 PM UTC, original submission:  

When I try to view a file using `less`, I always get the error `"source-highlight: cannot find input file anywhere outlang.map"`.  Even if I invoke `source-highlight` without any arguments, it seems to have this trouble:

[KenMacBook-2:~] % less tiles.R
source-highlight: cannot find input file anywhere outlang.map
[KenMacBook-2:~] % source-highlight --failsafe --infer-lang -f esc --style-file=esc.style -i tiles.R 
source-highlight: cannot find input file anywhere outlang.map
[KenMacBook-2:~] % source-highlight                                                                
source-highlight: cannot find input file anywhere outlang.map

If I manually add a `--data-dir` parameter to the `source-highlight` call, it doesn't complain anymore (and the output is colorized):

[KenMacBook-2:~] % source-highlight --failsafe --infer-lang -f esc --style-file=esc.style -i tiles.R --data-dir=/usr/local/share/source-highlight    
hexagon <- function(x, y, side, ...) {
  polygon(x=x+side/2*c(0, 1, 3, 4, 3, 1),
          y=y+side*sqrt(3)/2*c(0, -1, -1, 0, 1, 1),

plot(3,3, type='n')

Has my configuration gotten messed up?

Note I originally submitted this to Homebrew at https://github.com/Homebrew/homebrew-core/issues/18087 .



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by gedge (Posted a comment)
  • -email is unavailable- added by tromey (Posted a comment)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.5