While trying to check why my ./configure script cannot find my libraries,
I found this really confusing problem. I've got a libutil library in /usr/local/lib. When I compile a program
gcc -o test test.cpp -lutil -L/usr/local/lib
it goes just fine. But when instead i export LD_LIBRARY_PATH=/usr/local/lib and remove -L option, it fails (and also fails when ./configure checks for libraries, as I've seen in config.log). I've tried to putj /usr/local/lib in ld.so.conf and run ldconfig with no results.
My system is RH 7.2