Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have libffi installed and it's in /usr/local/lib, yet the glib make process can't find it

/home/mathmagi/src/glib-2.32.4/gio/.libs/lt-glib-compile-resources: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory
/home/mathmagi/src/glib-2.32.4/gio/.libs/lt-glib-compile-resources: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory
/home/mathmagi/src/glib-2.32.4/gio/.libs/lt-glib-compile-resources: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory
/home/mathmagi/src/glib-2.32.4/gio/.libs/lt-glib-compile-resources: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory
make[4]: Entering directory `/home/mathmagi/src/glib-2.32.4/gio/tests'
  GEN    gdbus-test-codegen-generated.c
  GEN    test_resources.c
/home/mathmagi/src/glib-2.32.4/gio/.libs/lt-glib-compile-resources: error while loading shared libraries: libffi.so.6: cannot open shared object file: No such file or directory
make[4]: *** [test_resources.c] Error 127
make[4]: Leaving directory `/home/mathmagi/src/glib-2.32.4/gio/tests'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/mathmagi/src/glib-2.32.4/gio'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/mathmagi/src/glib-2.32.4/gio'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mathmagi/src/glib-2.32.4'
make: *** [all] Error 2

It's definitely in /usr/local/lib!

bash-4.1# updatedb
bash-4.1# locate libffi.so.6
/usr/local/lib/libffi.so.6
/usr/local/lib/libffi.so.6.0.0
/home/mathmagi/src/libffi-3.0.11/x86_64-unknown-linux-gnu/.libs/libffi.so.6
/home/mathmagi/src/libffi-3.0.11/x86_64-unknown-linux-gnu/.libs/libffi.so.6.0.0

With glib I've tried

LDFLAGS=-L/usr/local/lib ./configure

Doesn't work.

How do I find where glib is looking and change it?

share|improve this question
    
Well, I guess I got it to work anyway. I had /usr/local/lib set in /etc/ld.so.conf and that didn't work, but all of a sudden setting the path to LD_LIBRARY_PATH made it work. I'm still wondering why nothing else worked. –  Mathmagician Aug 9 '12 at 10:50
    
According to output it wasn't problem of linking, but the problem with existing executable lt-glib-copmile-resources during its loading. That's why setting LDFLAGS didn't work. –  xaizek Aug 9 '12 at 10:59

1 Answer 1

LD_LIBRARY_PATH=/usr/local/lib 

worked for me on Debian Squeeze.

share|improve this answer
    
Can you please mark this as the answer to your question? –  Sly Oct 2 '12 at 6:53
    
@OliverSalzburg - What file does this line go into? –  dieKleene Sep 20 '13 at 14:05
1  
@dieKleene: I only edited this answer, but I would assume it's supposed to be an environment variable. Set it like export LD_LIBRARY_PATH=/usr/local/lib –  Oliver Salzburg Sep 20 '13 at 14:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.