@LIBICONV@ trouble
I was trying to compile and install pcb from source on my centos installation when I began running into all sorts of weird errors. The package requires to have gd library installed. I didn’t bother searching for RPMs and decided to install the library too from source. I guess that was where the trouble started.
The installation of libgd itself was painless. It would configure without errors or deps, compile and link also well. ‘make install’ seemed to work well too. It had copied the library to my prefix properly. But in all this, a rather simple regex-replace failed to work. I had not researched to where the failure happens (configure or install). The library creates a gdlib-config script that will be used by other libgd dependant packages for their linking and include referencing. This script seems to have used place-holders for detected libraries like @LIBICONV@ for libiconv. I don’t know if I have included iconv support. At least libgd didn’t seem to mind the absence. But inspite of not minding the absence, the place holder had remained in the script much to my annoyance.
While configuring pcb, it would complain that my installation of gd had no jpeg/png/gif support or my libgd was too old! Neither was possible : libgd was just downloaded from its hosting site; configure of libgd announced that I had configured to include jpeg/png and gif support in my compile. When I viewed the config.log for the causes, it would have failed because gcc would have a -l@LIBICONV@ flag and failed not finding the library. Well, quite obviously lib@LIBICONV@.so is not there on my machine.
I grepped the entire pcb source code to see where this particular library was getting referenced.. In vain. I reinstalled gd about three times. Funnily, each time I tried running gdlib-config but not ‘gdlib-config –libs’ even once!! After about six hours of fist-fighting with the machine, a round of cursing the pcb authors, centos maintainers, myself for being so oblivious of such ’simple’ things and another couple of hours later a little bulb flickered! I tried every option with gdlib-config command to find that gdlib was making such a ridiculous reference! Cursed myself another time for not trying hard enough and edited the gdlib-config shell script to remove the reference. Now pcb is all installed and working fine.
Ironically, this problem didn’t occur in the RedHat EL4 machine I tried to install pcb on. It did not have any -liconv, so @LIBICONV@ got removed somehow!
Hi. Just want to commiserate, and add a bit specific to gnuplot. I just had the same problem trying to install gnuplot with gdlib from source. Exact same problem. I figured it out, and then was able to find your note (searching without the LIBICONV didn’t help much).
This was after having another problem with the gnuplot configure script failing to find png support because in the configure test, it would build without including libpng12. I’m going to go ahead and add some keywords so maybe the next sap will find this sooner:
gnuplot libgd gdlib “undefined reference to png_”
The solution to this, for me, was to force libpng12 linking by adding ‘LDFLAGS=-lpng12′ to my ./configure command.
chris
September 1, 2008 at 3:29 am
Just encountered the same problem (RHEL5)! Thank you for your post.
matt
October 7, 2008 at 10:50 pm
install gd-devel rpm
La;
November 10, 2008 at 9:35 pm