From: Ethan A M. <merritt@u.washington.edu> - 2018-04-20 01:07:37
|
On Thursday, April 19, 2018 4:59:24 PM PDT Tatsuro MATSUOKA wrote: > After commit on 2018-04-18, > Cygwin build fail in internal.c > > > > gcc -DHAVE_CONFIG_H -I. -I../../gnuplot-gnuplot-main/src -I.. -I../term -I../../gnuplot-gnuplot-main/term -DBINDIR=\"/opt/gp530/bin\" -DX11_DRIVER_DIR=\"/opt/gp530/libexec/gnuplot/5.3\" -DQT_DRIVER_DIR=\"/opt/gp530/libexec/gnuplot/5.3\" -DGNUPLOT_SHARE_DIR=\"/opt/gp530/share/gnuplot/5.3\" -DGNUPLOT_PS_DIR=\"/opt/gp530/share/gnuplot/5.3/PostScript\" -DGNUPLOT_JS_DIR=\"/opt/gp530/share/gnuplot/5.3/js\" -DGNUPLOT_LUA_DIR=\"/opt/gp530/share/gnuplot/5.3/lua\" -DCONTACT=\"gnu...@li...\" -DHELPFILE=\"/opt/gp530/share/gnuplot/5.3/gnuplot.gih\" -DGNUPLOT_X11=\"`echo gnuplot_x11 | sed 's,x,x,'`.exe\" -DXAPPLRESDIR=\"/etc/X11/app-defaults/\" -I/usr/local/include -I/usr/include -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 > -I/usr/include/libpng16 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -MT internal.o -MD -MP -MF $depbase.Tpo -c -o internal.o ../../gnuplot-gnuplot-main/src/internal.c &&\ > mv -f $depbase.Tpo $depbase.Po > ../../gnuplot-gnuplot-main/src/internal.c: In function 'f_sprintf': > ../../gnuplot-gnuplot-main/src/internal.c:1652:62: error: '__PRI64_PREFIX' undeclared (first use in this function) > char *newformat = gp_alloc(strlen(next_start) + strlen(__PRI64_PREFIX) + 1, NULL); > ^~~~~~~~~~~~~~ > ../../gnuplot-gnuplot-main/src/internal.c:1652:62: note: each undeclared identifier is reported only once for each function it appears in > > > The same error happened native windows build. > > > On WSL (ubuntu 16.04) no error appears > > Is this a bug of gnuplot or problem of windows side? This new piece of code was added to allow the format specifiers "%d" and "%x" and "%i" to work even if the integer being printed requires 64 bits rather than 32 bits. See the discussion attached to Bug #2037. Before this change the program would print out "NaN" in this case. We can go back to that for platforms that do not allow a better solution, but let's try to figure out why it is failing for cygwin. As I understand it, the C99 standard requires that __PRI64_PREFIX is defined in the file <inttypes.h>. The 64-bit integer code in gnuplot tests for HAVE_INTTYPES_H to see if the compiler supports this part of the C99 standard. But I could be wrong. It is very hard to figure out exactly which C standard requires what. It is possible that the standard only requires definition of PRIo64 PRIu64 PRIx64 PRIX64 and the PREFIX that they share was added as a convenience by glibc without the standard requiring it. But you are using gcc so I would have expected the PREFIX definition to be there. What version of gcc are you using? Is the symbol HAVE_INTTTYPE_H defined in your configuration? Does inttypes.h contain any definitions for the 64bit integer formats? Does your cygwin C compiler support a compile option -std=gnu99? If so that might work. Ethan > > > Tatsuro > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta -- Ethan A Merritt Biomolecular Structure Center, K-428 Health Sciences Bldg MS 357742, University of Washington, Seattle 98195-7742 |