Tech Talk

Linux, Python, E51, Scripting…

Archive for the ‘centos’ Category

@LIBICONV@ trouble

with 3 comments

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!

Written by abiya

July 9, 2007 at 1:30 pm

Posted in c, centos, pcb, rambling, technical