DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th September 2016
acampbell acampbell is offline
Fdisk Soldier
 
Join Date: Sep 2014
Posts: 65
Default Why does pkg_add gimp fail on one machine but not another?

I have two machines, both running -current on AMD64. On issuing pkg_add -ui on one of these everything works as expected. On the other, gimp fails to upgrade 'because of libraries'. Yet presumably the libraries are identical, since I've just upgraded the base system on each?

This has happened on the last two upgrades. Both machines are accessing the same server (mirror.bytemark.co.uk).

It's not a total disaster because I still have gimp working on both machines, but I'd like to understand what is going on. I tried ldconfig without success. Should I use pkg_check?
Reply With Quote
  #2   (View Single Post)  
Old 27th September 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,670
Default

-current is a moving target. If these two systems are both using the same -current build, and are both pointing to the same package path, then it is possible the machine with problems has errors in its package database. Running pkg_check(8) will correct any correctable errors.
Reply With Quote
  #3   (View Single Post)  
Old 27th September 2016
TronDD TronDD is offline
Shell Scout
 
Join Date: Sep 2014
Posts: 127
Default

Also as time marches on and library version change, the old ones don't get removed. If one machine has been updated for a year, say, it will have the previous library versions on it. If the other machine was a fresh install, it won't. So if the packages haven't caught up yet, they will be linked to the old libraries not present on the new system.

Similarly if you wait periods of time between -current updates, you can have gaps of missing libraries.

So you can't presume the libraries on each system are identical. You have to look.

Tim.
Reply With Quote
  #4   (View Single Post)  
Old 28th September 2016
acampbell acampbell is offline
Fdisk Soldier
 
Join Date: Sep 2014
Posts: 65
Default

Thanks to both for replies. Everything seems to be back to normal now but I don't fully understand why.

What I did:
1. run pkg_check -f. This showed a lot of "missing reverse dependencies", which it fixed.
2. But gimp now didn't work at all, with complaints about missing libraries. (Stopped work for the night.)
3. Today, I did a further update to the latest base system (28.9.12), after which gimp started working again!

Tentative conclusion and questions:
I think this means that the missing libraries were supposed to be provided by the base system but previously were not being installed because of the missing reverse dependencies problem. This would explain why today's update fixed things, following the pkg_check yesterday. Correct?

More generally, when one sees a lot of missing libraries, where should they come from: base system, packages/ports, or both?
Reply With Quote
  #5   (View Single Post)  
Old 28th September 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,670
Default

First, I'm not looking over your shoulder, so I can not see what dependenciy references were missing, nor would I know why.

Second, pkg_check(5) repairs inconsistencies in the database of installed packages, to my recollection it does not install missing items for you.

The database resides in /var/db/pkg, as described in package(5). Let's look at gimp:
Code:
$ cd /var/db/pkg/gimp-2.8.18p0/
$ ls -l
total 616
-rw-r--r--  1 root  wheel  284905 Sep 26 22:16 +CONTENTS
-rw-r--r--  1 root  wheel     759 Sep 26 22:16 +DESC
-rw-r--r--  1 root  wheel     762 Sep 26 22:16 +REQUIRING
$
The +CONTENTS file is the package's packing list, and is based on the port packing list in /usr/ports/graphics/gimp/stable/pkg/PLIST.

The +DESC file is a copy of /usr/ports/graphics/gimp/stable/pkg/DESCR.

+REQUIRING is the package run dependency list:
Code:
$ cat ./+REQUIRING
ghostscript-9.07p3
libmng-1.0.10p3
babl-0.1.18
dbus-1.10.10v0
openjpeg-1.5.1p1
ijs-0.35p2
bzip2-1.0.6p8
.
.
.
$
Let's look at one of these dependencies, such as bzip2, which is used everywhere.
Code:
$ cd /var/db/pkg/bzip2-1.0.6p8/
$ ls -l
total 16
-rw-r--r--  1 root  wheel  2237 Sep 26 22:19 +CONTENTS
-rw-r--r--  1 root  wheel   433 Sep 26 22:19 +DESC
-rw-r--r--  1 root  wheel   457 Sep 26 22:19 +REQUIRED_BY
$
The new file is +REQUIRED_BY. These are reverse dependencies. These are tracked to keep me from inadvertently deleting bzip2 while it is still needed. Once these many packages have been deleted, it is safe to delete bzip2 from my system.
Code:
$ cat ./+REQUIRED_BY
yelp-3.20.1p0
totem-pl-parser-3.10.6p2
imlib2-1.4.7p1
ffmpeg-20160903
libarchive-3.2.1
.
.
.
gimp-2.8.18p0
.
.
.
$
------

There are several types of dependencies.

Build dependencies are simply packages needed to build a port, such as compilers and the many build toolchains.

Run dependencies must be installed and remain installed while the package is installed. Simple tools like bzip2 are often both build and run dependencies.

Library dependencies are more complex, as they may be third party, or may be in base or in X11. Library dependencies are considered to be both build and run. See the many references to LIB_DEPENDS and WANTLIB in bsd.port.mk(5) for further details.

Last edited by jggimi; 28th September 2016 at 10:57 AM. Reason: typos
Reply With Quote
  #6   (View Single Post)  
Old 28th September 2016
acampbell acampbell is offline
Fdisk Soldier
 
Join Date: Sep 2014
Posts: 65
Default

Thank you very much - that's extremely helpful. I now have a better understanding of how it all ties together.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
GIMP 2.8.? lumiwa FreeBSD Ports and Packages 4 7th February 2013 01:24 AM
why does it fail to create drawable ? daemonfowl OpenBSD General 4 11th May 2012 03:33 PM
GIMP on AMD64 issues? tetrodozombie OpenBSD Packages and Ports 4 6th February 2010 12:01 AM
Gimp 2.8 will feature single-window mode J65nko News 4 4th February 2010 09:21 PM
RAID-1 over NFS with fail-over PatrickBaer FreeBSD General 0 12th October 2008 12:03 AM


All times are GMT. The time now is 02:03 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick