4

I installed libffi-3.0.11, because another program needs that. But after the installation the other program (by calling the comand ./configure)don't recognize that libffi is installed. Do I have to set a environment variable? Or are all variables set automatically?

1
  • you may need to execute 'ldconfig' command. also take look at the binary by executing 'ldd' to see what it needs and where it looks for. Commented Sep 6, 2012 at 8:13

2 Answers 2

1

usually there is a LIBPATH, you should try to include the directory where your lib resided into this path. In addition, if you have a default bash

export LIBPATH=/your/libffi/path:$LIBPATH

I highly recommend to put this into a script and load it whenever you login automatically so that you don't need to repeat this step

/home/yourhome/.profile <- make sure you insert it into this file and its loaded automatically

Here is a guide how to do the task: http://archive.linuxfromscratch.org/lfs-museum/5.1-pre1/LFS-BOOK-5.1-PRE1-HTML/chapter06/glibc.html

The parameter you probably need is the following: ./configure --libexecdir=/usr/lib:

If you have installed the libffi library properly this should completely solve your problem.

Sign up to request clarification or add additional context in comments.

4 Comments

LIBPATH doesn't affect linkers. You are probably confusing it with LD_LIBRARY_PATH.
Peter did not state anything about linkers just that another program needs it, normally if it is a shared library and he has an executable which requires libffi this will be sufficient, btw he said "after the installation"
@ Oliver Sry it was my fault. The other program (glib-2.33.3 by the way ) needs LIBFFI for ./configure
@Peter if so you can try Maxim Yegorushkin's solution, by setting the LD_LIBRARY_PATH, another solution is to see if you can build it without it (in case you don't need those features) it would be important to know which paths it currently is looking for, another option which could help is LDFLAGS, have a look if you can define them on your configure command, this is the lib-linker flag
1

It depends, if you install libffi on /usr/local you should probably set the includes dir of the app you want to configure to /usr/local.

For the new app, try ./configure --prefix=/usr/local. To see the options of configure, use ./configure --help. Can you show the example of what is not running ?

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.