LIBS=-liconv for building gnuplot-6.0.4

I just built gnuplot-6.0.4 with:

/usr/opt/Gnuplot/gnuplot-6.0.4/configure \
--prefix=/usr/opt/Gnuplot \
--with-x \
--without-lua \
--disable-plugins \
--disable-wxwidgets \
--without-latex \
LIBS=-liconv

Without LIBS=-liconv I get errors. I suppose that building in linux LIBS=-liconv is not necessary.

Why?
 
It "should" in the the modern libc and not require external linking. Try creating an independent C program that uses an iconv function directly, but dont link iconv and see if it compiles/runs. That would tell you the gnuplot build breaks something.
 
It seems there is iconv in libc and also the separate library:

# ll /usr/include/iconv.h /usr/local/include/iconv.h /usr/local/lib/libiconv.*
-r--r--r-- 1 root wheel 4319 May 10 2024 /usr/include/iconv.h
-rw-r--r-- 1 root wheel 9995 May 21 01:04 /usr/local/include/iconv.h
-rw-r--r-- 1 root wheel 1233138 May 21 01:04 /usr/local/lib/libiconv.a
lrwxr-xr-x 1 root wheel 17 May 21 01:04 /usr/local/lib/libiconv.so@ -> libiconv.so.2.7.0
lrwxr-xr-x 1 root wheel 17 May 21 01:04 /usr/local/lib/libiconv.so.2@ -> libiconv.so.2.7.0
-rwxr-xr-x 1 root wheel 1108296 May 21 01:04 /usr/local/lib/libiconv.so.2.7.0*

How I force to use one or the other and not to combine includes of the one with libs of the other?
 
Back
Top