Problem compiling GeoIP PHP extension on FreeBSD

Well, here is another app compatibility problem.

Recently I got task to build GeoIP PHP extension. Usually i use mod_geoip, but this time some strange app required PECL extension.

So, i got following error while configure process:

configure: error: wrong geoip lib version or lib not found


Exploring config.log I found following error:

configure:4060: gcc -o conftest -g -O2 -R/usr/local/lib -L/usr/local/lib -lm -ldl conftest.c -lGeoIP >&5
/usr/bin/ld: cannot find -ldl

Since, dl is not a FreeBSD library I have removed linking from configure script:


mv configure configure.old
sed 's/\-ldl//g p' configure.old > configure
chmod 755 configure

And extension was sucessfully compiled.

Btw, I think there is another way to resolve problem - installing Linux compat libs. You can try ;-)

Prev Post: Problems compiling Apache 2.2.6 on FreeBSD 6.2
Next Post:
Main Page: ZulusTips index

Leave a Reply

You must be logged in to post a comment.