Hello to you all and I greet you all as a new user to the forum and as a new user to Linux in general. I was trying to install GTK+ and while trying to install the rest of the components each time I was using the ./configure the following was shown in my terminal
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
and I would like to ask how to solve it.
Thank you all in advance!
You may not have the gcc compiler installed. From terminal, try "sudo apt-get install gcc gcc-cpp gcc-c++"
Thank you very much this resolved the problem at first! Now I encounter this error which I am no so sure how to solve it:
configure: error: Package requirements (libffi >= 3.0.0) were not met:
No package 'libffi' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBFFI_CFLAGS
and LIBFFI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Thank you again!
I'm going to try to install GTK+ on my system and see if I can work out the details. I will get back to you.
OK, I got GTK+ installed, although I think I am too stupid to ever learn to program with it.
My environment: Ubuntu 12.04, using LXDE desktop and Synaptic package manager.
The following programs need to be installed or some of your ./configures will fail:
libffi (I installed that from source)
I installed all of the GTK+ packages in /opt/gtk+, so the configure script was
When I was ready to configure the GTK package itself, I first set some environment variables.
CPPFLAGS is a space separated list of paths enclosed in quotes that shows the compiler where the include files are.
Similarly, LDFLAGS is a space separated list of paths enclosed in quotes that shows where the libraries are.
CPPFLAGS="-I/opt/gtk+/include/atk-1.0/atk -I/opt/gtk+/include/gdk-pixbuf-2.0/gdk-pixbuf . . ."
PKGCONFIG_PATH shows where pkgconfig is.
LDFLAGS="-L/opt/gtk+/lib -L/opt/gtk+/lib/glib-2.0/include . . ."
After you get these three items entered into terminal, type
I also found it necessary to set the LD_LIBRARY_PATH. Basically you can use the same paths you used for LDFLAGS but it is a colon separated list:
export CPPFLAGS LDFLAGS PKG_CONFIG_PATH
Finally, you want to tell the compiler where any binaries are. Once again, a colon separated list.
LD_LIBRARY_PATH="/opt/gtk+/lib:/opt/gtk+/lib/glib-2.0/include: . . ."
Then I was ready to install the GTK+ package.
PATH="/opt/gtk+/bin: . . .:$PATH"
BTW, I followed the "installation guide" link on the GTK+ website to get this done. It was very helpful. Be sure you
sudo make install
install the packages in the correct order: GLib, Pango, ATK, GDKPixbuf, and then GTK+.
Hi, agavri. Welcome aboard!
Compiling from source requires you to track down and install all dependant software. Which is why you would want to use the package manager for most software installation, unless you need to make some change to the applicable source code.
There ya go... you need to install libffi before you can install GTK+.
Originally Posted by agavri
After reviewing, it looks like hagfish52 gave a very comprehensive list of the dependencies that you'll need to meet.
Thank you very very much for your assistance on this matter I will get down to business immediately!! Your help is so important to me and I thank you honestly :) I will reply to tell you how it all went!
You have been very bery helpful and I will notify you on the matter!! Thank you so much honestly :)
You are very welcome. I hope the installation goes without a hitch, but let us know if you have any problems.