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

gnuplot checking and gnuplot window size #43

Closed
holgafreak opened this issue Jul 24, 2017 · 1 comment
Closed

gnuplot checking and gnuplot window size #43

holgafreak opened this issue Jul 24, 2017 · 1 comment

Comments

@holgafreak
Copy link

I use torch7 a lot, and use luajit from torch. Checking if gnuplot is installed fails with torch luajit, because assertion

  -- Check gnuplot exists
    assert(os.execute("gnuplot --version >/dev/null 2>&1") == 0, "gnuplot not found. Is gnuplot installed?")

fails, because os.execute return true instead of 0. Changing 0 to true makes luaradio happy. This with my luajit
xxx-GL553VW:~$ luajit -v
LuaJIT 2.1.0-beta1 -- Copyright (C) 2005-2015 Mike Pall. http://luajit.org/

Also trying to change the gnuplot window size something goes wrong and gnuplot dies. The gnuplot window is little bit too big. When some examples plot 3 windows, they all don't fit on my laptop monitor without overlapping windows flickering annoyingly. Dragging windows to smaller is ok.
I'm on Ubuntu 16.04:
uname -a
Linux xxxx-GL553VW 4.4.0-83-generic #106-Ubuntu SMP Mon Jun 26 17:54:43 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

vsergeev added a commit that referenced this issue Dec 17, 2019
when LuaJIT is built with Lua 5.2 compatibility
(`-DLUAJIT_ENABLE_LUA52COMPAT`), `os.execute()` returns more detailed
exit status, including a success boolean as the first return value
instead of the integer exit code.

resolves #43.
vsergeev added a commit that referenced this issue Dec 17, 2019
when LuaJIT is built with Lua 5.2 compatibility
(`-DLUAJIT_ENABLE_LUA52COMPAT`), `os.execute()` returns more detailed
exit status, including a success boolean as the first return value
instead of the integer exit code.

resolves #43.
vsergeev added a commit that referenced this issue Dec 17, 2019
when LuaJIT is built with Lua 5.2 compatibility
(`-DLUAJIT_ENABLE_LUA52COMPAT`), `os.execute()` returns more detailed
exit status, including a success boolean as the first return value
instead of the integer exit code.

resolves #43.
@vsergeev
Copy link
Owner

Thanks. I've fixed the gnuplot existence checks in master. They're due to LuaJIT being built with -DLUAJIT_ENABLE_LUA52COMPAT, which uses the Lua 5.2 API for os.execute(). The Lua 5.2 os.execute() returns more detailed status information (beginning with a success boolean) instead of just an exit code.

As for the gnuplot issues, there are stability issues in general (#26), especially when doing something like resizing. I recommend using the wxWidgets output if you haven't tried it already. It seems to be the most reliable for me.

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

No branches or pull requests

2 participants