Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

RedHat compile issues - configure

2010-09-30
2013-02-10
  • Paul Menten
    Paul Menten
    2010-09-30

    I ran into some issues with configuring and compiling on RedHat Linux. Here is the output of a 'uname -a' command;

    Linux xxxx.xxxx.xxxx.com 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

    First issue was the need to install the libgd libraries.

    Second issue was the 'configure' script was choking during the process of detecting the proper parameters for the 'readline' calls. Although it was properly detecting which calls were supported, the makefile options that it detected were immediately overwritten by a recursive call that was testing the readline.h file. In particular, the make file option -lncurses was overwritten, but any of ncurses curses termcap terminfo or termlib types would not have been properly configured in the makefile.

    The failure to find the ncurses option/switch resulted in a build error with an output like;
    /usr/local/lib/libreadline.so: undefined reference to `tgetnum'
    /usr/local/lib/libreadline.so: undefined reference to `tgoto'
    /usr/local/lib/libreadline.so: undefined reference to `tgetflag'
    /usr/local/lib/libreadline.so: undefined reference to `BC'
    /usr/local/lib/libreadline.so: undefined reference to `tputs'
    /usr/local/lib/libreadline.so: undefined reference to `PC'
    /usr/local/lib/libreadline.so: undefined reference to `tgetent'
    /usr/local/lib/libreadline.so: undefined reference to `UP'
    /usr/local/lib/libreadline.so: undefined reference to `tgetstr'

    And, if that weren't enough, subsequent 'configure' tests for libraries such as the compression library 'libz' would fail because of the previous failure to properly configure the readline libraries.

    My workaround was to hard-code the '-lncurses' switch into the configure script after its test for readline.h.

    Third issue was  the configure script's call into the libgd script, gdlib-config -libs, that provides the compile options. The gdlib-config includes a macro @LIBICONV@, intended to point to the double-byte language conversion libraries. That definition of that macro does not exist in my RedHat linux system, so it gets passed verbatim into the configure script, which causes yet another failure. I modified the gdlib-config script to remove that macro.

    Hope this helps somebody.

    Paul