wxWidget ../configure cant find gtk-config

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
jacob
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Jan 09, 2017 11:28 am

wxWidget ../configure cant find gtk-config

Post by jacob »

Hi,
I am using cluster with following specifications
Type : Cluster GPGPU
Processors : AMD Opteron 6200 (x86_64)
Graphics Cards : NVIDIA Tesla M2050
Interconnect : Ethernet 100/1000
: InfiniBand QDR (Fat tree)
Number of cores : 1632
Computing Power : 67.17 TFLOPS
RAM per node : 48/64 GB
Storage per node : 60 GB (SSD) + Lustre
Operating System : Scientific Linux CERN 6.3 (Carbon)
Queue system : Torque 2.5.12 + Maui 3.3.1

I need to compile wxWidgets-2.9.5 in my working directory. while configuring i get this:

configure: WARNING: Defaulting to the builtin regex library for Unicode build.
checking for zlib.h >= 1.1.4... no
checking for zlib.h... (cached) no
configure: WARNING: zlib library not found or too old, will use built-in instead
checking for png.h > 0.90... no
checking for png.h... (cached) no
configure: WARNING: system png library not found or too old, will use built-in instead
checking for jpeglib.h... no
configure: WARNING: system jpeg library not found, will use built-in instead
checking for tiffio.h... no
configure: WARNING: system tiff library not found, will use built-in instead
checking for lzma_code in -llzma... no
checking for jbg_dec_init in -ljbig... no
checking for expat.h... no
configure: WARNING: system expat library not found, will use built-in instead
checking for GTK+ version...
checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 2.6.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occurred. This usually means GTK+ is incorrectly installed.
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GTK+ - version >= 3.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
checking for gtk-config... no
checking for GTK - version >= 1.2.7... no
*** The gtk-config script installed by GTK could not be found
*** If GTK was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GTK_CONFIG environment variable to the
*** full path to gtk-config.
checking for gtk-config... (cached) no
checking for GTK - version >= 1.2.3... no
*** The gtk-config script installed by GTK could not be found
*** If GTK was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the GTK_CONFIG environment variable to the
*** full path to gtk-config.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.

configuration cmd

"../configure --enable-unicode --enable-debug --prefix=$(pwd)"

NOTE: I dont have sudo rights on cluster, how can i fix this error?
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: wxWidget ../configure cant find gtk-config

Post by DavidHart »

Hi,

The problem is that you don't have the gtk+2 (or 3) development package installed; in fedora that would be called gtk2-devel. By the way, "../configure cant find gtk-config" is true but irrelevant these days; gtk-config is the gtk+1.2 era equivalent of the modern pkg-config. The wx configure still checks for it as a fall-back when pkg-config fails, which it did just above:

Code: Select all

checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 2.6.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occurred. This usually means GTK+ is incorrectly installed.
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GTK+ - version >= 3.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
As you don't have root access, I can think of only two solutions:
1) Build gtk+2 yourself, and point to it when you configure wxGTK.
Or, second best by a long way:
2) Build wxX11 instead, by doing:
../configure --with-x11 ...
wxX11 is little used or tested but it works, at least for reasonable values of 'work'. It doesn't depend on gtk+.

Finally, why wx2.9.5 in particular? wx2.9 was a development series. wx3.0.2 is the latest stable release version.

Regards,

David
jacob
In need of some credit
In need of some credit
Posts: 6
Joined: Mon Jan 09, 2017 11:28 am

Re: wxWidget ../configure cant find gtk-config

Post by jacob »

Hi David,
Thank you so much. I am trying to compile a visual c++ project which uses wxWidgets2.9.5. I am not sure if i can change version of wxWidgets on linux or not. So, i stick to wxWidgets2.9.5.

i tried the second way Building with wxX11 instead, by doing: ../configure --with-x11 and got this error
checking for X... no
configure: error: X11 not found, please use --x-includes and/or --x-libraries options (see config.log for details)

it didnt work for me, then i downolad wxX11 from https://www.wxwidgets.org/downloads/
and tried configuring it, which gives the same error

checking for GTK+ version...
checking for pkg-config... /usr/bin/pkg-config
checking for GTK+ - version >= 2.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.

I am new to this, would you please help how to build gtk+2 myself? the first way
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxWidget ../configure cant find gtk-config

Post by ONEEYEMAN »

Hi,
You are building on the cluster, which means that you are trying to build using some network OS version.
This network OS most likely does not have any GUI at all, only the console and the application required to manage network.

You best bet would be to install any flavor of *nix locally on the client machine and try to build the library and application.
BTW what app you are trying to build? If it a GUI one, chances are that it will NOT run on that cluster, since it does not have any X system at all.

Thank you.
Post Reply