Find the answer to your Linux question:
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.
  1. #1
    Just 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!

  2. #2
    Linux Newbie hagfish52's Avatar
    Join Date
    Dec 2011
    Location
    Asheville, NC
    Posts
    225
    You may not have the gcc compiler installed. From terminal, try "sudo apt-get install gcc gcc-cpp gcc-c++"

  3. #3
    Just 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!

  4. #4
    Linux Newbie hagfish52's Avatar
    Join Date
    Dec 2011
    Location
    Asheville, NC
    Posts
    225
    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.

  5. #5
    Linux Newbie hagfish52's Avatar
    Join Date
    Dec 2011
    Location
    Asheville, NC
    Posts
    225
    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

    Code:
     ./configure --prefix=/opt/gtk+
    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.

    Code:
    CPPFLAGS="-I/opt/gtk+/include/atk-1.0/atk -I/opt/gtk+/include/gdk-pixbuf-2.0/gdk-pixbuf . . ."
    Similarly, LDFLAGS is a space separated list of paths enclosed in quotes that shows where the libraries are.

    Code:
     LDFLAGS="-L/opt/gtk+/lib -L/opt/gtk+/lib/glib-2.0/include . . ."
    PKGCONFIG_PATH shows where pkgconfig is.

    Code:
     PKG_CONFIG_PATH="/opt/gtk+/lib/pkgconfig"
    After you get these three items entered into terminal, type

    Code:
    export CPPFLAGS  LDFLAGS PKG_CONFIG_PATH
    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:
              LD_LIBRARY_PATH="/opt/gtk+/lib:/opt/gtk+/lib/glib-2.0/include: . . ."
              export LD_LIBRARY_PATH
    Finally, you want to tell the compiler where any binaries are. Once again, a colon separated list.

    Code:
    PATH="/opt/gtk+/bin: . . .:$PATH"
              export PATH
    Then I was ready to install the GTK+ package.

    Code:
     ./configure --prefix=/opt/gtk+
              make
              sudo make install
    BTW, I followed the "installation guide" link on the GTK+ website to get this done. It was very helpful. Be sure you
    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.

  6. #6
    Administrator jayd512's Avatar
    Join Date
    Feb 2008
    Location
    Kentucky
    Posts
    5,023
    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.

    Quote Originally Posted by agavri View Post
    configure: error: Package requirements (libffi >= 3.0.0) were not met:

    No package 'libffi' found
    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.

  7. #7
    Just 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!

  8. #8
    Just 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

  9. #9
    Linux Newbie hagfish52's Avatar
    Join Date
    Dec 2011
    Location
    Asheville, NC
    Posts
    225
    You are very welcome. I hope the installation goes without a hitch, but let us know if you have any problems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •