LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Installing GTK using makepkg on dependencies. (https://www.linuxquestions.org/questions/slackware-14/installing-gtk-using-makepkg-on-dependencies-521692/)

Crobat 01-22-2007 08:40 AM

Installing GTK using makepkg on dependencies.
 
As the title indicates, I want to install gtk+-2.12.9, but I made all the dependencies into packages, and installed everything so far with installpkg. When I try to install gtk, first it complains that it can't find the right stuff in /usr/local/lib, which I saw a solution for, but not a solution that also uses Slack packages.

Has anyone successfully installed gtk using makepkg/installpkg?

jong357 01-22-2007 09:52 AM

Your being a little vauge which makes it hard for anyone to know what your problem is. What was the error? What was the solution? What's wrong with the official GTK+2 SlackBuild?

Crobat 01-22-2007 11:18 AM

I'm sorry for being vague. I'm trying to remember this from work. I would rather try the SlackBuild, but couldn't find it anywhere. Any suggestions on where to look? I'll have to bookmark it. :)

piete 01-22-2007 11:43 AM

FYI: /source is on disks 5 & 6 for slack 11, and disks 3 & 4 for slack 10.1.

You'll find original slackbuild scripts for a lot of the gnome stuff in 10.1 source (my local mirror below):

ftp://ftp.heanet.ie/mirrors/ftp.slac...1/source/gnome

Also, take a peek at:

http://gsb.freerock.org/download/

They have a slackbuild project for gnome.

Finally, you can find the current GTK+2 slackbuild in /source/l/gtk+2 (again my local mirror below ... )

ftp://ftp.heanet.ie/mirrors/ftp.slac...source/l/gtk+2

You WILL want to find a more appropriate mirror if you don't already have the source disks.

- Piete.

Crobat 01-22-2007 12:18 PM

Thanks! I'll check those out! :)

Crobat 01-22-2007 05:15 PM

That's not quite the latest version of gtk+. The version I found on the web is version 2.10.

Crobat 01-22-2007 06:07 PM

ok..at home now. These are the errors I'm getting trying to build gtk+:

Code:

./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_title'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_is_private'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_set_description'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_size'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_free'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_type_register_static_simple'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_pdf_surface_create'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_surface_set_fallback_resolution'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_load_from_file'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_visited'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_modified'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_key_file_set_double'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_set_mime_type'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_set_is_private'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_has_item'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_key_file_get_double'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_applications'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_ps_surface_set_size'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_uris'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_new'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_description'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_set_title'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_surface_get_type'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_to_file'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_add_group'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_pdf_surface_create_for_stream'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_add_application'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_remove_item'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_mime_type'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_move_item'
./.libs/libgtk-x11-2.0.so: undefined reference to `cairo_pdf_surface_set_size'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_groups'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_app_info'
./.libs/libgtk-x11-2.0.so: undefined reference to `g_bookmark_file_get_added'
collect2: ld returned 1 exit status
make[4]: *** [gtk-query-immodules-2.0] Error 1
make[4]: Leaving directory `/home/mike/gtk+-2.10.8/gtk'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/mike/gtk+-2.10.8/gtk'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/mike/gtk+-2.10.8/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mike/gtk+-2.10.8'
make: *** [all] Error 2


piete 01-22-2007 08:16 PM

Quote:

That's not quite the latest version of gtk+. The version I found on the web is version 2.10.
Erm, no, it's not the latest ... the point is the scripts should be (largely) the same, regardless of the version.

One thing that does strike me as odd: in the OP you said you wanted 2.12 ... so, how is 2.10 suddenly the latest? You need to tell us the whole story, I think.

Anyway. I would suggest that you've not installed cairo, based on that output ... but why it should successfully configure but fail to build is beyond me. My suspicion is you've got inconsistent version numbers with your deps and instead of building 2.12 from scratch, you're trying actually to just rebuild gtk+2 on top of a stock system without it's 2.12 deps. [Edit - sorry, I'm thinking of the gnome deps, gtk+ is a bit different: http://svn.exactcode.de/t2/trunk/pac...tk+/gtk+.cache ]

Some information that might be helpful:
* What ./configure did you use?
* What deps + versions are installed?

Finally, may I ask *why* you want to update gtk+2? Some app requires it, or just for the hell of it?

Ok, so I've just had a look at gtk.org and I think I see what's happened .. for those still reading the thread, here's some info:

latest stable gtk+2: 2.10
latest stable glib: 2.12.9

gtk+ depends on glib, and the install process for gtk+ is failing (see above).

For your reading pleasure, the similar threads box below hefted these two - worth a look, really:
http://www.linuxquestions.org/questi...d.php?t=251920
http://www.linuxquestions.org/questi...d.php?t=174049

From the top; once more, with feeling!
- Piete.

jong357 01-22-2007 09:59 PM

Crobat, incase you didn't know, these packages are all related and should be built in the order listed if your looking to install the latest GTK+2

glib2
popt
atk
cairo
pango
gtk+2

They are all backwards compatable with earlier versions to the best of my knowledge and nothing on Slack will break by using the latest versions of the above packages. Atleast I haven't encountered any software that broke by updating those.

I'm still not sure what your problem is. Looks like you managed to snip the top part of your error off so posting the above doesn't do too much good IMO... Still don't know what "dependencies" you are talking about that you built and what options you passed to ./configure. The only suggestion I would give at this point is to remove ALL of the packages above, but leave versions 1 of gtk/glib, and use scripts that work, building in the order listed above. Your still being vauge... And piete is probably right. I'm wildly guessing that your trying to build the latest GTK2 against one or more of the stock slackware packages listed above. Aint' gonna' work... Update one, update all.

The official Slackware scripts should work just fine. All you need to do is change the version variable. That should be the case anyway. Haven't tested recently. If it helps you, I have scripts of my own that I use for slackware. They can be found here: http://jaguarlinux.com/pub/slackware.../gnome-2.16.2/ There is nothing special about them tho. They should do the same exact thing as the Slackware scripts.

Sorry if I sound frustrated but I KNEW this would happen often if Slackware 11 wasn't updated before it was shipped. You can't even build much of anything against cairo-1.0.4 so I'm not even sure why it's on slackware to begin with... :mad: There is 1.2.4 in 'testing' but I would hardly consider that a 'testing' package.. I think Slack is turning pure QT... ;) It's bad enough gnome users were left out in the cold but newer GTK app users are going to face the same situation sooner or later...

So, the resolution is to build the above packages in the exact order listed. Make sure you clean your system first and use --prefix=/usr...

Crobat 01-23-2007 07:23 AM

Yea maybe I should've started with my overall goal. I'm trying to run the latest Cedega package, and when I try, it tells me that I need gtk+2 installed, so then I tried installing gtk+2, and apparently I don't have the dependencies for ./configure to work.

So, moving across the web, I pick up the ones that I do need, which are (again, this is from memory) glib, cairo, pango. Cedega also needs python gtk2, but I haven't got that far yet.

Anywho, this is why I'm looking to install the newest gtk. I would normally just use the old one, but cedega is barking at me. :)

Oh, and I didn't use the prefix=/usr, so that may have something to do with it.

piete 01-23-2007 07:45 AM

Ahhhhhh now we get it =D

So, next question: are you trying to *run* Cedega, or *compile* Cedega?

`./configure --prefix=/usr` fixes a lot of problems when it comes to pkgconfig, the alternative is to use:

`PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" ./configure` # you will want to check that directory path.

Crobat 01-23-2007 08:58 AM

I'm just trying to run Cedega. I installed the Slack package to make my life a little easier. ;)

Crobat 01-23-2007 09:12 AM

The first goal was to use something like this:

./configure -prefix=/Package/WhateverImInstalling && make && make install

cd /Package/WhateverImInstalling

makepkg WhateverImInstalling.tgz
installpkg WhateverImInstalling.tgz


However, I scratched that idea, because I couldn't see anyone recommending doing things this way. I think I'll aim for the `PKG_CONFIG_PATH="/usr/local/lib/pkgconfig" ./configure` way. I think that path is correct, but I'll check it later. :)

All this to play Warcraft 3 with Cedega. :D

jong357 01-23-2007 09:36 AM

Cedega runs just fine on a stock Slackware 11. All you need is pygtk-2.8.x

Next time, state your problem as far upstream as you can. Saves alot of time. ;)

http://jaguarlinux.com/pub/slackware...s/pygtk-2.8.6/

Of course, now you need to get your system back to it's original state..

jong357 01-23-2007 09:39 AM

Quote:

Originally Posted by Crobat
The first goal was to use something like this:

./configure -prefix=/Package/WhateverImInstalling && make && make install

cd /Package/WhateverImInstalling

makepkg WhateverImInstalling.tgz
installpkg WhateverImInstalling.tgz

Also, that's completely wrong.. Sounds like you need to brush up on compiling/making packages.

It's:

./configure --prefix=/usr
make
make install DESTDIR=/Package/WhateverImInstalling
cd /Package/WhateverImInstalling
makepkg WhateverImInstalling.tgz
installpkg WhateverImInstalling.tgz

Also, letting configure default to /usr/local is subject to debate. I don't like it and think everything should go in /usr but that is what /usr/local is for I guess. Why install to an obscure directory and start appending PATH's when you can just fire and forget to /usr?

Crobat 01-23-2007 09:49 AM

Wow...thanks everyone...I've learned tons from just this thread alone! :)

Definitely will try the package install again, using your recommendations.

jong357 01-23-2007 09:54 AM

Quote:

Originally Posted by Crobat
I'm trying to run the latest Cedega package, and when I try, it tells me that I need gtk+2 installed

One last thing, 10:1 it didn't say that you need gtk+2. It would have said something about not finding gtk+2.pyc or something like that. It was complaining that it couldn't find the GTK+2 python bindings, therefore the GUI couldn't run.

Crobat 01-23-2007 10:18 AM

Yea..that's right. I was paraphrasing from memory. Sorry about that.

edit: Actually, I don't recall it mentioning python. It said something about unable to find GTK2.

piete 01-23-2007 10:40 AM

Fwiw I'm glad we've fixed (I hope?) the problem, but ... really ... copy & pasting the initial error message would've fixed it in the second post ;)

Hope everything's all right now, and, good work jong!

As a closing comment, I agree with jong on the use of --prefix=/usr , but let me just dump some info here for the other readers:

By default, ./configure will use the prefix /usr/local . I wish I could say with authority *why*, but all I have is a feeling that it's something to do with the way the directory structure has been put together. Anyway, I remember that the /usr prefix is to be used for system packages (from the distro, really) and /usr/local is your local stuff, that you've installed yourself.

When the only person using the machine is the administrator (ie: your personal desktop box for home) there are a lot of reasons to just put it all in /usr. Most of them end with: " ... because then you'll stay sane."

You can use prefix to good effect when dealing with multiple versions of the same program or, in the latter case, multiple programs configured in different ways (such as a toolchain - binutils, glibc, gcc).

./configure --prefix=/opt/firefox-1.5
./configure --prefix=/opt/firefox-2.0

./configure --prefix=/opt/mplayer-rc1
./configure --prefix=/opt/mplayer-0.8

./configure --prefix=/opt/crosstool/arm7
./configure --prefix=/opt/crosstool/mipsel
./configure --prefix=/opt/crosstool/i686
./configure --prefix=/opt/crosstool/ppc
./configure --prefix=/opt/crosstool/arm7

I would hasten to add, however, that this is ONLY sensible when you're dealing with an end-user application (mplayer, wine, cedega!), not a library (ffmpeg, gtk!). Gobolinux ( http://www.gobolinux.org/ ) uses an alternative directory structure based on app-dir and lib-dirs - where one directory contains the whole library. Unlike --prefix=/usr, where the .so are actually located in /usr/lib, the headers in /usr/include, a bunch of documentation in /usr/doc and so on, lib-dirs would have /usr/lib/gtkmm/ where everything listed above was.

I recommend reading up on some of this stuff. Once you know how to exploit it - your system will thank you for it by not being a mess ;)

Take care,
- Piete.

Crobat 01-24-2007 08:23 PM

ok..gave this another try. Got down to the atk package. Untarred the package, and cd to the directory.

Code:

root@noteslack:/home/mike/Desktop/Downloaded/atk-5.6.0# ./configure
bash: ./configure: No such file or directory

So I'm stumped. How do I install this? Do I have the right stuff here?

jong357 01-25-2007 12:31 AM

:cry:

I hate to break it to you, but 1.12.4 is the latest stable version...

I assume your just upgrading to upgrade at this point since we have already established it's not necessary in order to get cedega running....

You'll have to plow thru this own your own I'm afraid. Your getting snagged on the basics of the basics. I'll help you out and give you the correct links to the source tarballs... We are dealing with 'gnome' related packages and as such, odd numbered versions are 'testing' and even numbered versions are 'stable'. atk-1.12.4 is the latest stable version. atk-1.13.2 is the latest 'development' version. Stick with the 'stable' versions. Cairo is the only one that doesn't follow that scheme. Actually, I think cairo does the same thing. 1.3.x is development and 1.2.x is stable.

glib2 - ftp://ftp.gtk.org/pub/glib/
popt - http://rpm.net.in/mirror/rpm-4.4.x/
atk - http://ftp.gnome.org/pub/GNOME/sources/atk/
cairo - http://cairographics.org/releases/
pango - http://ftp.gnome.org/pub/GNOME/sources/pango/
gtk+2 - ftp://ftp.gtk.org/pub/gtk/

And I've already given you a link to my build scripts... It's a cake walk, it really is... ;)

Crobat 01-25-2007 07:31 AM

Yes, I'm continuing the upgrade because I started it, and I'll be darned if I'll quit now.

Thanks again for your time, and most importantly your patience. I hit the panic button a few times on this one, I must admit. I think I'll be just fine now. :)

jong357 01-25-2007 04:44 PM

Also, since your upgrading past gtk-2.8.x you will also need pygobject before you build pygtk. It used to be part of pygtk but they split it out on the newer versions. I think that's what happened anyway. pygobject are the python bindings for glib2's gobject. So, you'll want to use the same major version of pygobject as the version of glib2 that's on your system. If you have glib-2.10.x installed, then use pygobject-2.10.x...

http://ftp.gnome.org/pub/GNOME/sources/pygobject/

Obviously, you'll want the 2.12.x series.

Crobat 01-25-2007 08:40 PM

ok..installed pyobject 2.12.1 using ./configure prefix=/usr && make && make install

tried to compile pygtk 2.10.2 using ./configure && make && make install, and received these errors.

(for the record, I had pygobject 2.10, but pygtk required pygobject 2.12.1 or higher)

Code:

gtkmodule.c:33:22: pycairo.h: No such file or directory
gtkmodule.c:34: error: syntax error before '*' token
gtkmodule.c:34: warning: type defaults to `int' in declaration of `Pycairo_CAPI'
gtkmodule.c:34: warning: data definition has no type or storage class
gtkmodule.c: In function `init_pycairo':
gtkmodule.c:182: error: `Pycairo_IMPORT' undeclared (first use in this function)
gtkmodule.c:182: error: (Each undeclared identifier is reported only once
gtkmodule.c:182: error: for each function it appears in.)
gtkmodule.c: In function `init_gtk':
gtkmodule.c:195: warning: suggest parentheses around && within ||
make[2]: *** [_gtk_la-gtkmodule.lo] Error 1
make[2]: Leaving directory `/home/mike/Desktop/Downloaded/pygtk-2.10.2/gtk'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/mike/Desktop/Downloaded/pygtk-2.10.2'
make: *** [all] Error 2

Tried to run cedega, just for kicks, and this was the exact error I was getting before.

Code:

F1 2007-01-25 21:42:00,584 CRITICAL Unable to load GTK2 Python bindings: No module named gtk
I hope that helps someone out there, because I'm back to square one; no cedega. :(

Crobat 01-25-2007 08:53 PM

ok..received an older version of Cedega (5.1), and just ran the update wizard. Things are now working smoothly with the newest Cedega. So, I did get some victory. :)

jong357 01-25-2007 09:55 PM

Quote:

Originally Posted by Crobat
(for the record, I had pygobject 2.10, but pygtk required pygobject 2.12.1 or higher)

Your also not listening to what I said above...

Quote:

Originally Posted by jong357
So, you'll want to use the same major version of pygobject as the version of glib2 that's on your system. If you have glib-2.10.x installed, then use pygobject-2.10.x...


Quote:

Originally Posted by Crobat
Code:

gtkmodule.c:33:22: pycairo.h: No such file or directory

Your missing pycairo. This is why it's better to just stick with the stock slackware install and just add pygtk-2.8.x....

They broke up all the python bindings on version 2.10 of pygtk.

http://cairographics.org/releases/

pycairo is in there. Download the same version that your cairo is....:cry: :cry: :cry: :cry: ;)

Your installing all this useless clutter that isn't even going to get used just to have an updated GTK... If it's running, then cool. Leave it be.

Crobat 01-26-2007 07:50 AM

All right. I concede. I'll leave it be. Again, thanks for the info. I just wanted to get a better understanding of it just in case I needed to do this at a later time. :)

jong357 01-26-2007 10:09 AM

Well, it is a good learning expierence, so by all means, if your having fun with it then keep going. At some point in time you aught to get into the habit of making packages tho instead of doing a straightup 'make install'.

The only way you can remove those now is to keep the source directories around and do a 'make uninstall' from within them. Whereas, if you made packages, you just 'removepkg /var/log/packages/whatever.tgz'

All of my scripts are made from a basic template, so it takes me about a minute to make a script for a new package. If I find something isn't as it should be after the first run, I adjust the script and run it again until all the bits make it to where they should be.

So, along with the build order I've listed previously, looks like you need to add:

pygobject
pycairo
pygtk

If you get another "cannot find blah.h : no such file or directory" then you need to type 'blah.h' into google and find out what source code contains 'blah.h'. then build that and go back to the package that was complaining about 'blah.h'.... Eventually, you'll make it to the final package, which in this case, is pygtk...


All times are GMT -5. The time now is 08:46 AM.