|
From: Tatsuro M. <tma...@ya...> - 2016-04-12 08:53:04
|
> From: Mojca Miklavec > To: Tatsuro MATSUOKA > Cc: gnuplot-beta > Date: 2016/4/11, Mon 19:34 > Subject: Re: stdfn.h: error: conflicting types for 'memcopy' and 'sys_errlist' on Cygwin build > > On 11 April 2016 at 12:26, Tatsuro MATSUOKA wrote: >> >> I have completely forgotten to build and install libcerf again. >> Sorry for the noise. >> >> However, why >> >> LIBCERF_CFLAGS='-I/usr/local/include' \ >> LIBCERF_LIBS='-L/usr/local/lib -lcerf' \ >> >> flags affect checking functions that are not related libcerf ? > > I'm semi-blindly guessing. > > If configure[.ac] finds out that cerf should be used, it adds > LIBCERF_CFLAGS to CFLAGS and LIBCERF_LIBS to LDFLAGS. Those CFLAGS and > LIBS are then used for all the remaining tests. > > If that is indeed the case, I believe there are two "bugs": > > - gnuplot should figure out that libcerf is not working and not add > those flags at all > - the flags should be added to the globas set of flags at the end, not > at the beginning of the configure script Thank you for your reply On ubuntu flags LIBCERF_CFLAGS='-I/usr/local/include' \ LIBCERF_LIBS='-L/usr/local/lib -lcerf' \ are not required so that this might be an issue of my pkg-config setting. However, looking into config.log, I found the following: **************************************************************** configure:7376: checking for LIBCERF configure:7384: $PKG_CONFIG --exists --print-errors "libcerf" configure:7387: $? = 0 configure:7402: $PKG_CONFIG --exists --print-errors "libcerf" configure:7405: $? = 0 configure:7481: result: yes configure:9592: checking for memcpy configure:9592: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib -lcerf conftest.c -ldl -lm -lcerf >&5 conftest.c:93:6: warning: conflicting types for built-in function 'memcpy' [enabled by default] char memcpy (); ^ configure:9592: $? = 0 configure:9592: result: yes configure:9592: checking for memmove configure:9592: gcc -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib -lcerf conftest.c -ldl -lm -lcerf >&5 LIBCERF_CFLAGS='-I/usr/local/include ' LIBCERF_LIBS='-L/usr/local/lib -lcerf ' **************************************************************** On Ubuntu, pkg-config checks libcerf. However, "-I/usr/local/include -L/usr/local/lib -lcerf" is added to the many functions test. Is the above intended? Tatsuro |