I have an issue with gnuplot, so I want to report it.
I want to run the latest version.
(I'm on Ubuntu 20.04.5 LTS with gnuplot 5.2 patchlevel 8 2019-12-01)
I download and extract the source gnuplot-5.4.5.tar.gz
I run: apt-get build-dep gnuplot
I run ./configure and get an error:
checking for LIBCERF... configure: WARNING:
Package requirements (libcerf) were not met:
No package 'libcerf' found
I have to run: apt install libcerf-dev
Now, ./configure gives no warnings.
Perhaps build-dep is only building for gnuplot 5.2 (and I'm building 5.4),
or perhaps build-dep is missing a dependency. You decide.
I run "make" and get these compile warnings:
wxterminal/wxt_gui.cpp: In function ‘void wxt_atexit()’: wxterminal/wxt_gui.cpp:4276:10: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [
-Wunused-result]
4276 | freopen("/dev/null","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
wxterminal/wxt_gui.cpp:4277:10: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
4277 | freopen("/dev/null","w",stderr);
|
gplt_x11.c: In function ‘main’: gplt_x11.c:764:2: warning: ignoring return value of ‘freopen’, declared with attribute warn_unused_result [-Wunused-result]
764 | freopen("/dev/null", "w", stderr);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gplt_x11.c: In function ‘process_event’:
gplt_x11.c:4663:12: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result] 4663 | if (cmd) system(cmd);
|
qtterminal/QtGnuplotApplication.cpp: In member function ‘void QtGnuplotApplication::enterPersistMode()’: qtterminal/QtGnuplotApplication.cpp:94:9: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unuse
d_result [-Wunused-result]
94 | freopen("/dev/null","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
qtterminal/QtGnuplotApplication.cpp:95:9: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’, declared with attribute warn_unused_result [-Wunused-result]
95 | freopen("/dev/null","w",stderr);
|
I got a working gnuplot 5.4.5 binary, but it was a bit ugly on the way.
I'm on Ubuntu 20.04.5 LTS
For libcerf, it is not an issue of gnuplot team but is an issue for packaging of gnuplot on the Ubuntu. Please ask on the Ubuntu package team.
Last edit: Tatsuro MATSUOKA 2022-10-17
On Ubuntu 22.04, gnuplot version is 5.4.3 and it lacks libcerf. Ubuntu gnuplot team have prepared gnuplot package without libcerf library.
The warnings you show are just that - warnings, not errors. Recent versions of the C compiler have gotten very noisy in warning about trivialities. I usually set CFLAGS to
"-Wall -g -Og -Wdeclaration-after-statement -Wuninitialized -Wunused-result -Wreturn -type"to suppress these.As to the package dependencies for Ubuntu, that is out of our hands. Gnuplot will run just fine without libcerf, by the way. It just won't have built-in support for the set of special functions in that library.