Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not find gnuplot 5.4 on Windows #570

Open
jinq0123 opened this issue Apr 7, 2022 · 9 comments · May be fixed by #755
Open

Can not find gnuplot 5.4 on Windows #570

jinq0123 opened this issue Apr 7, 2022 · 9 comments · May be fixed by #755

Comments

@jinq0123
Copy link

jinq0123 commented Apr 7, 2022

cargo bench reports:

Gnuplot not found or not usable, using plotters backend
`gnuplot --version` returned an unparseable version string:

gnuplot 5.4 is installed:

>gnuplot --version
gnuplot 5.4 patchlevel 3

I found gnuplot version was not piped as expected.

>gnuplot --version > out.txt

out.txt is empty.

I installed gnuplot 5.2.8 to walk around this.

@anderson-international
Copy link

I have the same problem. I Gnuplot 5.4 patchlevel 3 installed also get the same error:

Gnuplot not found or not usable, using plotters backend
`gnuplot --version` returned an unparseable version string: 

@BuyMyMojo
Copy link

Still same issue error with gnuplot 5.5 patchlevel 0

@bheisler
Copy link
Owner

Hello! Thanks for the bug report.

I haven't been able to reproduce this issue with gnuplot 5.4 patchlevel 4.

For those of you having this issue, can you check if gnuplot is maybe printing its output to stderr?

@BuyMyMojo
Copy link

$ gnuplot.exe

        G N U P L O T
        Version 5.5 patchlevel 0    last modified 2022-08-10

        Copyright (C) 1986-1993, 1998, 2004, 2007-2022
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        mailing list:     gnuplot-beta@lists.sourceforge.net
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')

Terminal type is now 'qt'
Encoding set to 'cp1252'.
gnuplot>

@BuyMyMojo
Copy link

Sorry I misread, whe nrunning cargo bench it does not output to the terminal, I get an error of it being unparsable

`gnuplot --version` returned an unparseable version string: gnuplot 5.5 patchlevel 0

@bheisler
Copy link
Owner

Well, what I wanted to know is whether gnuplot --version prints its version to stderr or stdout.

@grtwje
Copy link

grtwje commented Apr 16, 2023

Works for me, Windows 11 and gnuplot 5.4 patchlevel 6. Likely not helpful to those with the problem, but it is a reference data point.

@hecatia-elegua
Copy link

win10 gnuplot 5.4 patchlevel 6,
another data point:

  1. make sure gnuplot/bin is in PATH
  2. restart vscode
  3. use cargo bench -- --plotting-backend gnuplot
  4. returns "gnuplot --version returned an unparseable version string"
  5. restart vscode
  6. use gnuplot --version
  7. works
  8. use cargo bench -- --plotting-backend gnuplot
  9. works

@sandersaares
Copy link

`gnuplot --version` returned an unparseable version string: gnuplot 6.1 patchlevel 0

The version string is in the error message, so it has to be in stdout because parse_version() did get a correct-seeming string. If I copy-paste this same string from the error message and smash it into parse_version(), everything works fine. This suggests the problem is something we cannot see.

image

Oh hey, that is not UTF-8 that gnuplot is emitting, it is UTF-16! Feeding that into String::from_utf8() is not going to result in happy times.

Why does it show up fine in the error message then? I suppose something somewhere along the pipeline to the error getting printed just skips the 0x00 bytes when displaying.

If all that Criterion needs here is detect version, perhaps a "try again with UTF-16 just in case" fallback might be useful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants