LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't compile gtk+ programs =\ (https://www.linuxquestions.org/questions/linux-software-2/cant-compile-gtk-programs-%3D%5C-77028/)

EnigmaX 07-29-2003 02:45 PM

Can't compile gtk+ programs =\
 
A simple window display program (the one from the tutorial at gtk.org/) gives me some errors =\. Heres some information about it:

[root@vt-hinsdale2b-28 enigx]# gcc gtktest.c -o gtktest `pkg-config --cflags --libs gtk+-2.0`
Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-2.0' found
gtktest.c:1:21: gtk/gtk.h: No such file or directory
[root@vt-hinsdale2b-28 enigx]# echo $PKG_CONFIG_PATH
/usr/local/lib/pkgconfig
[root@vt-hinsdale2b-28 enigx]# locate gtk+-2.0.pc
/home/enigx/gtk+-2.2.2/gtk+-2.0.pc.in
/home/enigx/gtk+-2.2.2/gtk+-2.0.pc
/usr/local/lib/pkgconfig/gtk+-2.0.pc
[root@vt-hinsdale2b-28 enigx]#


Is there an alternate to pkg-config or is there something im doing wrong?

(Note: /home/enigx/gtk+02.2.2/ was the directory where I did the make)

Mara 07-29-2003 03:42 PM

Do you have gtk*-devel packages?

EnigmaX 07-29-2003 07:05 PM

pygtk-devel, but not installed

I did a make install for gtk2.2 and thats how I have that.

acid_kewpie 07-30-2003 03:05 AM

i really wouldn't suggest compiling it from source, you may well end up with conflicting versions of gtk

EnigmaX 07-30-2003 12:04 PM

Is there an alternate way? gtk.org only had the source.

The only devel I have is the one I compiled, but I do have the normal one..

Besides the point, Is there another way I can compile this? Either not using pkg-config or a way to fix it? :/

EnigmaX 07-31-2003 06:19 PM

Still need help, If anyone could post if they need a bit more info or something it would be helpful :/

AZ_Rider 08-30-2003 07:34 PM

gtk2-devel
 
I have run into this several times now, the error that reads:

Package gtk+-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-2.0.pc'
to the PKG_CONFIG_PATH environment variable


I understand this to mean I need to install the "gtk2-devel" package.

Does anyone have a list of the dependenies upon dependencies upon more dependencies this insane package requires to get installed and in what order to do it all in? I'm sure I can eventually get it all figured out but it looks at least a couple days worth of work.

This is such an unbelievable pain, I have to think someone has probably documented the process somewhere and I am just too new to Linux to know where to look. Any suggestions?


Thanks in advance,
Rob

acid_kewpie 08-31-2003 05:04 AM

what's the problem, you already know what to do to fix it... and that -devel package won't have any other dependencies (unless of course you don't even have gtk2 installed.. which is very unliekly)

Mara 08-31-2003 03:14 PM

Re: gtk2-devel
 
Quote:

Originally posted by AZ_Rider
[B]I have run into this several times now, the error that reads:


Does anyone have a list of the dependenies upon dependencies upon more dependencies this insane package requires to get installed and in what order to do it all in? I'm sure I can eventually get it all figured out but it looks at least a couple days worth of work.

It depends on your distro. If you use apt-get or urpmi to get the missing packages, all dependencies for them will be installed.

AZ_Rider 08-31-2003 03:52 PM

gtk2-devel problem details
 
Here's some detail:

[root@RedHatLinux rob]# rpm -i gtk2-devel-2.2.3-1.1.i386.rpm
warning: gtk2-devel-2.2.3-1.1.i386.rpm: V3 DSA signature: NOKEY, key ID e418e3aaerror: Failed dependencies:
XFree86-devel is needed by gtk2-devel-2.2.3-1.1
atk-devel >= 1.0.0-1 is needed by gtk2-devel-2.2.3-1.1
glib2-devel >= 2.2.0-1 is needed by gtk2-devel-2.2.3-1.1
pango-devel >= 1.2.0-3 is needed by gtk2-devel-2.2.3-1.1

and it goes on like this from there when I try installing the dependencies....

[root@RedHatLinux gtkdep]# rpm -i XFree86-devel-4.3.0-22.1.i386.rpm
warning: XFree86-devel-4.3.0-22.1.i386.rpm: V3 DSA signature: NOKEY, key ID e418e3aa
error: Failed dependencies:
XFree86-libs = 4.3.0-22.1 is needed by XFree86-devel-4.3.0-22.1
fontconfig-devel is needed by XFree86-devel-4.3.0-22.1
pkgconfig is needed by XFree86-devel-4.3.0-22.1
(Rob's note: pkgconfig is installed)

[root@RedHatLinux gtkdep]# rpm -i atk-devel-1.3.5-1.i386.rpm
warning: atk-devel-1.3.5-1.i386.rpm: V3 DSA signature: NOKEY, key ID e418e3aa
error: Failed dependencies:
atk = 1.3.5 is needed by atk-devel-1.3.5-1
glib2-devel >= 2.0.6-3 is needed by atk-devel-1.3.5-1

[root@RedHatLinux gtkdep]# rpm -i glib2-devel-2.2.3-1.1.i386.rpm
warning: glib2-devel-2.2.3-1.1.i386.rpm: V3 DSA signature: NOKEY, key ID e418e3aa
error: Failed dependencies:
pkgconfig >= 1:0.8 is needed by glib2-dev

[root@RedHatLinux gtkdep]# rpm -i pango-devel-1.2.5-1.1.i386.rpm
warning: pango-devel-1.2.5-1.1.i386.rpm: V3 DSA signature: NOKEY, key ID e418e3aa
error: Failed dependencies:
XFree86-devel >= 4.2.99 is needed by pango-devel-1.2.5-1.1
fontconfig-devel >= 2.0 is needed by pango-devel-1.2.5-1.1
freetype-devel >= 2.1.3-3 is needed by pango-devel-1.2.5-1.1
glib2-devel >= 2.2.0-1 is needed by pango-devel-1.2.5-1.1
el-2.2.3-1.1

And then the missing dependencies listed have their own missing dependencies.... Is there something I'm doing wrong?

Thanks again,
Rob

LooseCanon 08-31-2003 04:19 PM

Re: gtk2-devel
 
Quote:

Originally posted by AZ_Rider

Does anyone have a list of the dependenies upon dependencies upon more dependencies this insane package requires to get installed and in what order to do it all in? I'm sure I can eventually get it all figured out but it looks at least a couple days worth of work.

LOL!!!!

Sorry.. shouldn't laugh. hehe. I'm at the point of installation where you are now and I freaked when I saw all these dependencies.

I want to install pan v 0.14.2 and when I ran ./configure it said I needed PKG-CONFIG. So I got that, installed it and now ./configure tells me that I need GLIB and GTHREAD and GOBJECT. Waaaaaaaa?

Gosh I wish I could just get a whole bunch of these files all installed at once. BTW, I'm running SuSE 8.2 "personal" (which kinda sucks because it doesn't install any headers or stuff like that).

I'm a thread or two below/above depending on who responds an when.. check out "how to check version of glib"...

AZ_Rider 08-31-2003 04:33 PM

Attempt at apt-get
 
Thanks Mara for the advice... I'm using Red Hat 9 and I got the version of apt-get for it. Perhaps I am not using it correctly? Here's what happens when I try to use it to install gtk2-devel:

[root@RedHatLinux rob]# apt-get install gtk2-devel
Reading Package Lists... Done
Building Dependency Tree... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
gtk2-devel: Depends: atk-devel (>= 1.0.0-1) but it is not going to be installed
Depends: glib2-devel (>= 2.2.0-1) but it is not going to be installed
Depends: gtk2 (= 2.2.1) but 2.2.3-1.1 is to be installed
Depends: pango-devel (>= 1.2.0-3) but it is not going to be installed
E: Broken packages
------------------------------------------------------------------------------
Thanks,
Rob

Mara 09-01-2003 05:29 PM

You should try up2date. As far as I know it works similar to urpmi and apt-get (and is designed for RH).

Apt-get problem. Try the following sequence:
apt-get update
apt-get install gtk2-devel

AZ_Rider 09-03-2003 02:19 AM

Been there....
 
...done that.

I have tried the update & install in apt-get many times. I have now used apt-get to install several other things but for some reason with this one it says the 4 dependencies listed by the RPM install basically can't be installed. It also won't install the dependencies directly.

I also tried going through Synaptic, the GUI version of apt-get and got the exact same results.

I am beginning to wonder if this maybe is a RH 9 issue and it would work fine under RH 7 or 8...

Up2Date only updates installed software, it doesn't fetch new software. Red Hat has an "add/remove" applet but it doesn't do dependecies, it just seems like a front end for rpm.

-Rob

Mara 09-03-2003 02:55 PM

Look at your sources list. Are you sure it's complete?


All times are GMT -5. The time now is 11:29 AM.