Results 1 to 9 of 9
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-10-2012 #1Just Joined!
- Join Date
- Jul 2012
- Posts
- 4
About GTK+
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!
- 07-11-2012 #2
You may not have the gcc compiler installed. From terminal, try "sudo apt-get install gcc gcc-cpp gcc-c++"
- 07-11-2012 #3Just Joined!
- Join Date
- Jul 2012
- Posts
- 4
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!
- 07-12-2012 #4
Hi Agavri,
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.
- 07-13-2012 #5
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:
g++
zlib1g-dev
libtiff4-dev
libffi (I installed that from source)
libcairo2-dev
libxext-dev
xorg-dev
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.Code:./configure --prefix=/opt/gtk+
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.Code: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.Code:LDFLAGS="-L/opt/gtk+/lib -L/opt/gtk+/lib/glib-2.0/include . . ."
After you get these three items entered into terminal, typeCode:PKG_CONFIG_PATH="/opt/gtk+/lib/pkgconfig"
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:Code:export CPPFLAGS LDFLAGS PKG_CONFIG_PATH
Finally, you want to tell the compiler where any binaries are. Once again, a colon separated list.Code:LD_LIBRARY_PATH="/opt/gtk+/lib:/opt/gtk+/lib/glib-2.0/include: . . ." export LD_LIBRARY_PATH
Then I was ready to install the GTK+ package.Code:PATH="/opt/gtk+/bin: . . .:$PATH" export PATH
BTW, I followed the "installation guide" link on the GTK+ website to get this done. It was very helpful. Be sure youCode:./configure --prefix=/opt/gtk+ make sudo make install
install the packages in the correct order: GLib, Pango, ATK, GDKPixbuf, and then GTK+.Last edited by hagfish52; 07-13-2012 at 11:06 PM.
- 07-14-2012 #6
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+.
*EDIT*
After reviewing, it looks like hagfish52 gave a very comprehensive list of the dependencies that you'll need to meet.Last edited by jayd512; 07-14-2012 at 12:40 AM. Reason: see EDIT
Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 07-14-2012 #7Just Joined!
- Join Date
- Jul 2012
- Posts
- 4
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!
- 07-14-2012 #8Just Joined!
- Join Date
- Jul 2012
- Posts
- 4
You have been very bery helpful and I will notify you on the matter!! Thank you so much honestly
- 07-14-2012 #9
You are very welcome. I hope the installation goes without a hitch, but let us know if you have any problems.


Reply With Quote

