Building against libcerf fails. libcerf defines a cmplx type, which is then tried to be redefined in gp_types.h
In file included from libcerf.c:15:
gp_types.h:143:8: error: expected ‘{’ before ‘double’
struct cmplx {
^~~~~
gp_types.h:143:8: error: two or more data types in declaration specifiers
gp_types.h:143:8: error: two or more data types in declaration specifiers
struct cmplx {
^~~~~
gp_types.h:151:9: error: expected ‘{’ before ‘double’
struct cmplx cmplx_val;
^~~~~
gp_types.h:151:9: error: two or more data types in declaration specifiers
gp_types.h:151:9: error: two or more data types in declaration specifiers
struct cmplx cmplx_val;
^~~~~
More information needed, since it isn't failing on other systems.
In libcerf v1.1 the defined complex structure is named
_Complex
, which does not conflict with anything in gnuplot.What is your OS?
What version of libcerf do you have?
Can you Email me the source for the cerf.h file it provides?
This is with libcerf 1.8, available at http://apps.jcns.fz-juelich.de/src/libcerf/
Thank you for the report and the pointer to a newer libcerf.
It works for me with the following 1-line change to the gnuplot source.
==> HOWEVER <==
In order to build libcerf 1.8 from the source you pointed to I had to force it with
CFLAGS = "--std=c99 ... <other stuff="">"
and even so the test script run by cmake generated warnings about type mismatch.
So I am not certain whether the libcerf shared library generated by other build recipes will in all cases be compatible. Another option would have been to build it with g++ but I didn't pursue that.
Please test.</other>
I confirm that this patch fixes the build for me too. I didn't find any of the issues you mention when building libcerf (with GCC 8.2)
Side note: strangely, configure reports libcerf as not found, but it is used in the build anyway.
Last edit: Antonio Rojas 2018-10-11
Great. Thanks for testing.
Fix is in 5.3 and will be included in the next 5.2 release
FWIW I find that the change to cerf.h was introduced in version 1.7. The linux distro package lists I checked are only up to 1.5 so it will be a while yet before this is relevant to most people. Nice to catch it early.
Note that since libcerf-1.8 they changed scaling of Voigt function so
the Voigt profile plots will look different than those on the gnuplot page.
See:
http://apps.jcns.fz-juelich.de/src/libcerf/CHANGELOG
Dmitri.
On Mon, Nov 5, 2018 at 3:14 PM Dmitri A. Sergatskov dasergatskov@users.sourceforge.net wrote:
Very strange. That means the libcerf output for the Voigt profile no
longer behaves according to the description on Wikipedia or previously
published figures. I can see the change in the code itself, but there is
no corresponding change in the man page description that comes with
libcerf. Either it was wrong before (libcerf < 1.8) or it is wrong now
(libcerf 1.8) but I don't know which.
Related
Bugs:
#2077On Mon, Nov 5, 2018 at 6:27 PM Ethan Merritt sfeam@users.sourceforge.net
wrote:
Dmitri.
Thanks for this report.
The normalization went wrong in release 1.8 and stayed wrong in 1.9.
I will withdraw these releases right now, and prepare a new release
as soon as possible.
For the time being, stay with 1.6 (autotools configure) or 1.7(cmake).
Sorry for this - Joachim