Menu

g++: @LIBICONV@ error making gnuplot 4.2.2?

Help
greg k
2007-11-06
2013-02-10
  • greg k

    greg k - 2007-11-06

    Hi-

    I'm trying to compile gnuplot 4.2.2 on an i686 athlon box running RHEL4. My developers need JPEG, GIF and PNG support, so I ditched the standard gnuplot that came with RHEL4 and got the following pieces, which I've compiled from source:
    -gnuplot 4.2.2
    -gd-2.0.35
    -jpeg-6b
    -libpng-1.2.22
    -libiconv-1.11
    When I do ./configure, the messages seem to indicate I'll get a successful build with all the graphics features I need enabled (except I don't have cairo or pango support, don't know if that's needed). When I do a make, I get the following errors:

    (snip)
    Making version.c
    g++  -g -O2  -L/usr/local/lib -L/usr/X11R6/lib -o gnuplot  alloc.o axis.o breaders.o bitmap.o color.o command.o contour.o datafile.o dynarray.o eval.o fit.o gadgets.o getcolor.o graph3d.o graphics.o help.o hidden3d.o history.o internal.o interpol.o matrix.o misc.o mouse.o parse.o plot.o plot2d.o plot3d.o pm3d.o readline.o save.o scanner.o set.o show.o specfun.o standard.o stdfn.o tables.o term.o time.o unset.o util.o util3d.o variable.o version.o   -lreadline  -lncurses  -lz -lgd -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm @LIBICONV@   -lm
    g++: @LIBICONV@: No such file or directory
    make[3]: *** [gnuplot] Error 1
    make[3]: Leaving directory `/usr/local/src/gnuplot-4.2.2/src'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/usr/local/src/gnuplot-4.2.2/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/usr/local/src/gnuplot-4.2.2'
    make: *** [all] Error 2

    Can someone help me interpret this error? BTW, if I echo $LD_LIBRARY_PATH, I get "/usr/local/lib;/usr/local/include.."as part of it, which is where libiconv.so and other libraries live, so I'm not sure why this error is happening.

    The configuration summary output is posted below. Thanks for any help!

    Greg

    =======================(config summary)=================
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking for gcc... gcc
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ANSI C... none needed
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking for function prototypes... yes
    checking how to run the C preprocessor... gcc -E
    checking for egrep... grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for string.h... (cached) yes
    checking how to run the C preprocessor... gcc -E
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking for preprocessor stringizing operator... yes
    checking for emacs... emacs
    checking for tex... no
    checking for latex... no
    checking for latex2e... no
    checking for pdflatex... no
    checking for dvips... no
    checking for troff... troff
    checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
    checking for gethostbyname... yes
    checking for connect... yes
    checking for remove... yes
    checking for shmat... yes
    checking for IceConnectionNumber in -lICE... yes
    checking for MS-DOS/djgpp/libGRX... no
    checking for NeXT... no
    checking for Apple MacOS X... no
    checking for BeOS... no
    checking for Alpha/AXP CPU... no
    checking for sin... no
    checking for sin in -lm... yes
    checking for ANSI C header files... (cached) yes
    checking dirent.h usability... yes
    checking dirent.h presence... yes
    checking for dirent.h... yes
    checking errno.h usability... yes
    checking errno.h presence... yes
    checking for errno.h... yes
    checking float.h usability... yes
    checking float.h presence... yes
    checking for float.h... yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking locale.h usability... yes
    checking locale.h presence... yes
    checking for locale.h... yes
    checking math.h usability... yes
    checking math.h presence... yes
    checking for math.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking time.h usability... yes
    checking time.h presence... yes
    checking for time.h... yes
    checking sys/time.h usability... yes
    checking sys/time.h presence... yes
    checking for sys/time.h... yes
    checking for sys/types.h... (cached) yes
    checking sys/bsdtypes.h usability... no
    checking sys/bsdtypes.h presence... no
    checking for sys/bsdtypes.h... no
    checking sys/ioctl.h usability... yes
    checking sys/ioctl.h presence... yes
    checking for sys/ioctl.h... yes
    checking sys/param.h usability... yes
    checking sys/param.h presence... yes
    checking for sys/param.h... yes
    checking sys/select.h usability... yes
    checking sys/select.h presence... yes
    checking for sys/select.h... yes
    checking sys/socket.h usability... yes
    checking sys/socket.h presence... yes
    checking for sys/socket.h... yes
    checking for sys/stat.h... (cached) yes
    checking sys/systeminfo.h usability... no
    checking sys/systeminfo.h presence... no
    checking for sys/systeminfo.h... no
    checking sys/timeb.h usability... yes
    checking sys/timeb.h presence... yes
    checking for sys/timeb.h... yes
    checking sys/utsname.h usability... yes
    checking sys/utsname.h presence... yes
    checking for sys/utsname.h... yes
    checking libc.h usability... no
    checking libc.h presence... no
    checking for libc.h... no
    checking malloc.h usability... yes
    checking malloc.h presence... yes
    checking for malloc.h... yes
    checking poll.h usability... yes
    checking poll.h presence... yes
    checking for poll.h... yes
    checking sgtty.h usability... yes
    checking sgtty.h presence... yes
    checking for sgtty.h... yes
    checking termios.h usability... yes
    checking termios.h presence... yes
    checking for termios.h... yes
    checking values.h usability... yes
    checking values.h presence... yes
    checking for values.h... yes
    checking pwd.h usability... yes
    checking pwd.h presence... yes
    checking for pwd.h... yes
    checking for stdbool.h that conforms to C99... yes
    checking for _Bool... yes
    checking for struct exception in math.h... yes
    checking whether stat file-mode macros are broken... no
    checking for unistd.h... yes
    checking if errno variable is declared... yes
    checking for size_t... yes
    checking for time_t in time.h... yes
    checking return type of signal handlers... void
    checking for atexit... yes
    checking for memcpy... yes
    checking for memmove... yes
    checking for memset... yes
    checking for on_exit... yes
    checking for bcopy... yes
    checking for bzero... yes
    checking for setvbuf... yes
    checking for strerror... yes
    checking for strchr... yes
    checking for strrchr... yes
    checking for strstr... yes
    checking for index... yes
    checking for rindex... yes
    checking for isnan... yes
    checking for erf... yes
    checking for erfc... yes
    checking for gamma... yes
    checking for lgamma... yes
    checking for getcwd... yes
    checking for poll... yes
    checking for pclose... yes
    checking for popen... yes
    checking for select... yes
    checking for sleep... yes
    checking for stpcpy... yes
    checking for strcspn... yes
    checking for strdup... yes
    checking for strcasecmp... yes
    checking for stricmp... no
    checking for strncasecmp... yes
    checking for strnicmp... no
    checking for sysinfo... yes
    checking for tcgetattr... yes
    checking for vfprintf... yes
    checking for doprnt... no
    checking for usleep... yes
    checking for snprintf... yes
    checking whether signgam is declared... yes
    checking for sigsetjmp... yes
    checking for sys/select.h... (cached) yes
    checking for sys/socket.h... (cached) yes
    checking types of arguments for select... int,fd_set *,struct timeval *
    checking for tputs in -lncurses... yes
    checking for remove_history in -lreadline... yes
    checking readline/readline.h usability... yes
    checking readline/readline.h presence... yes
    checking for readline/readline.h... yes
    checking readline/history.h usability... yes
    checking readline/history.h presence... yes
    checking for readline/history.h... yes
    checking readline/tilde.h usability... yes
    checking readline/tilde.h presence... yes
    checking for readline/tilde.h... yes
    checking for deflate in -lz... yes
    checking zlib.h usability... yes
    checking zlib.h presence... yes
    checking for zlib.h... yes
    checking for gdlib-config... /usr/local/bin/gdlib-config
    checking for gdImageCreate in -lgd... yes
    checking gd.h usability... yes
    checking gd.h presence... yes
    checking for gd.h... yes
    checking for gdImageGif in -lgd... yes
    checking for gdImageGifAnimBegin in -lgd... yes
    checking for gdImageJpeg in -lgd... yes
    checking for gdImageStringFT in -lgd... yes
    checking for gdImagePng in -lgd... yes
    checking for pdflib-config... no
    checking for PDF_get_majorversion in -lpdf... no
    checking for multi-byte support in x11... checking for XmbDrawString in -lX11... yes
    checking for g++... g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking dependency style of g++... gcc3
    checking how to run the C++ preprocessor... g++ -E
    checking for wx-config... no
    configure: WARNING: wxWidgets can't be found. You can try --with-wx-config-path to give the right path to wx-config. The wxWidgets terminal will not be compiled.
    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for CAIROPANGO... Package cairo was not found in the pkg-config search path.
    Perhaps you should add the directory containing `cairo.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'cairo' found
    configure: WARNING: Package requirements (cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10) for the
    wxWidgets terminal were not met:

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively, you can avoid the need to call pkg-config if you set the
    environment variables CAIROPANGO_CFLAGS and CAIROPANGO_LIBS to the
    corresponding flags for cairo, pango, and pangocairo.
    See the pkg-config man page for more details.

    The wxWidgets terminal will not be compiled.
    checking for PANGO_1_10_2... Package pango was not found in the pkg-config search path.
    Perhaps you should add the directory containing `pango.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'pango' found
    no
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating config/Makefile
    config.status: creating demo/Makefile
    config.status: creating docs/Makefile
    config.status: creating m4/Makefile
    config.status: creating man/Makefile
    config.status: creating share/Makefile
    config.status: creating share/LaTeX/Makefile
    config.status: creating src/Makefile
    config.status: creating src/beos/Makefile
    config.status: creating src/wxterminal/Makefile
    config.status: creating term/Makefile
    config.status: creating tutorial/Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing depfiles commands
    config.status: executing default commands
    configure: configuring in lisp
    configure: running /bin/sh './configure' --prefix=/usr/local  --cache-file=/dev/null --srcdir=.
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make sets $(MAKE)... (cached) yes
    checking for a BSD-compatible install... /usr/bin/install -c
    checking for emacs... emacs
    checking where .elc files should go... ${datadir}/emacs/site-lisp
    checking for dvips... no
    checking for latex... no
    checking for latex2e... no
    checking for makeinfo... /usr/bin/makeinfo
    checking for pdflatex... no
    checking for emacs version... 21.3.1
    checking whether info-look.el is needed... not needed with emacs 21.3.1
    configure: creating ./config.status
    config.status: creating Makefile

    ** Configuration summary for gnuplot 4.2.2:

    gnuplot will be compiled with the following terminals:

      Standalone terminals: yes (always builtin)
        (aed512, aed767, aifm, bitgraph, cgm, corel, dumb, dxf, eepic, emf, emtex,
        epslatex, epson_180dpi, epson_60dpi, epson_lx800, fig, gpic, hp2623A,
        hp2648, hp500c, hpdj, hpgl, hpljii, hppj, imagen, kc_tek40xx, km_tek40xx,
        latex, metafont, metapost, mif, pbm, postscript, pslatex, nec_cp6, okidata,
        pcl5, pstex, pstricks, qms, regis, selanar, svg, starc, tandy_60dpi,
        tek40xx, tek410x, texdraw, tgif, tkcanvas, tpic, vttek)
      x11/xlib terminal: yes (with mouse support)
        (with multi-byte fonts)
        (with binary polygon protocol (EXPERIMENTAL))
      jpeg terminal: yes
      gif terminal: yes (with animated gif)
      png terminal: yes
        (jpeg, gif and png terminals can use TTF fonts)
      pdf terminal: no (requires libpdf)
      plot library terminal: no (use --with-plot to enable, requires GNU plotutils
                                 or UNIX plot)
      linux terminal (vga console): no (use --with-linux-vga to enable,
                                           requires SVGAlib)
      vgagl terminal ((s)vga console): no (use --with-linux-vga to enable,
                                           requires SVGAlib with vgagl)
      ggi terminal: no (use --with-ggi to enable, requires libggi)
      iris4d terminal: no (use --enable-iris to enable, requires libgl_s)
      mgr terminal: no (use --enable-mgr to enable, requires libpixrect)
      rgip/uniplex terminal: no (use --enable-rgip to enable)
      svga terminal (MSDOS/djgpp): no
      be terminal (BeOS): no
      next terminal: no
      aqua terminal (MacOS X): no
      wxt terminal: no (requires C++, wxWidgets>2.6, cairo>0.9, pango>1.10)

      Additional terminals are availaible in platform-specific makefiles:
       amiga (makefile.amg and makefile.ami), apollo/gpr (makefile.unx), atari/vdi
       (makefile.st), cgi (makefile.unx), mtos (makefile.mto), pm (makefile.os2),
       sun (makefile.unx), unixpc (makefile.unx), windows (various Windows
       makefiles)
      Additional terminals are built automatically if possible at compile-time:
       vesa (MSDOS), emxvga (MSDOS, OS/2), ega/vga/svga/ssvga/hercules (Windows with
       Zortec compiler), macintosh

    gnuplot will be compiled with the following features:

      Fitting error variables: yes
      String-handling in datafiles: yes
      Plot style histograms: yes
      String variables: yes
      Command line macros: yes (EXPERIMENTAL)
      Placement of rectangles and other objects: yes (EXPERIMENTAL)
      Plot style image: yes (EXPERIMENTAL)
      General binary data file reading: yes (EXPERIMENTAL)

    gnuplot will be compiled with the following options:

      Readline library: GNU readline library with  -lncurses
      Command-line history file: yes
      Check current directory for .gnuplot file: no (use --with-cwdrc to enable)
      Sort help/subtopic tables by column: no (use --without-row-help to enable)
      Use TeX kpsexpand to search for fonts: no (use --with-kpsexpand to enable)
      Thin plate splines: no (use --enable-thin-spline to enable)
      Hidden3d optimization: quadtree
      Deprecated syntax and terminal options : yes

    gnuplot will install the following additional materials:

      lasergnu printer script: no (use --with-lasergnu to enable)
      gnuplot-mode for X/Emacs: yes
      LaTeX tutorial: no
      Help file: yes (always), in /usr/local/share/gnuplot/4.2/gnuplot.gih
      PostScript prologue files: yes (always)

     
    • Hans-Bernhard Broeker

      > BTW, if I echo $LD_LIBRARY_PATH, I get "/usr/local/lib;/usr/local/include..

      That's quite spectacularly wrong.  There's no excuse for putting the include directory into the dynamic linker's search path.

      As to the problem with @LIBICONV@, that's almost certainly a problem with your home-grown installation of libiconv, rather than with gnuplot.  That's made quite obvious by the fact that there's no mention of iconv anywhere in gnuplot's configure script, in the first place.

      Have a look at the config.log file and check pkgconfig output manually to find the details.

       
      • greg k

        greg k - 2007-11-06

        Thanks for your note. So I gather from your reply that I should make sure to leave LD_LIBRARY_PATH unset and insert whatever extra library references might be useful in ld.so.conf instead?

        Actually, the LIBICONV error was present before I downloaded and built libiconv - that was why I added it, in the hopes of eliminating this error. Before and after installing libiconv, a line appears in the config.log as line 3256:
        "TERMLIB=' -lreadline -lncurses -lz -lgd -lXpm -lX11 -ljpeg -lfontconfig -lfreetype -lpng12 -lz -lm @LIBICONV@'"

        I'm not sure what you mean by "check pkgconfig output manually"...

        Greg

         
        • Hans-Bernhard Broeker

          > So I gather from your reply that I should make sure to leave LD_LIBRARY_PATH unset

          Absolutely not.  But you really should keep the .../include directory out of it.

          > Actually, the LIBICONV error was present before I downloaded and built libiconv

          That means it was introduced by some other part of the system.  Probably one of the other libraries put it in there.  The way that can happen is if pkg-config listed this.

          So to sum up: LIBICONV is not in gnuplot's source, so it must come from somewhere else on your machine.  And as you're apparently the first person to ever come across this, you should look in all those places where your system differs from the average.

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.