# libexiv2 problem when upgrading kdeartwork-4



## ohle (Nov 9, 2010)

Hello.

While upgrading ports, specifically kdeartwork-4.3.5_1 on my 8.1 amd64 installation,
building kdeartwork-4.5.3 fails at the linking stage:


```
[ 50%] Building CXX object kscreensaver/kdesavers/CMakeFiles/kvm.kss.dir/kvm.o
/usr/bin/ld: warning: libexiv2.so.7, needed by /usr/local/kde4/lib/libkexiv2.so, not found (try using -rpath or -rpath-link)
/usr/local/kde4/lib/libkexiv2.so: undefined reference to `Exiv2::Exifdatum::Exifdatum(Exiv2::ExifKey const&, Exiv2::Value const*)'
```

(...and so on). I have a diffrent version of libexiv2 installed:

```
[root@laphroaig /usr/ports/devel]# ls /usr/local/lib/libexiv2.so.*
/usr/local/lib/libexiv2.so.9
```

I didn't find anything that looks relevant in UPDATING. Do i need the older version of libexiv2? If so, where do I get it?

Thanks in advance for your help,
   Ohle


----------



## wblock@ (Nov 9, 2010)

No, it's a broken graphics/exiv2, but it's probably not just that port.  See posts #5 and #6 here.


----------



## ohle (Nov 10, 2010)

Huh, OK, if that's what it is, I guess I'll have to do that. The guide I followed way back
when I upgraded to version 8 didn't tell me to rebuild all ports, so I'm a bit surprised.
May I ask how you deduced that this is the problem? Just curious, the symptoms seemed totally
random to me.

Thanks anyway,
   Ohle


----------



## wblock@ (Nov 10, 2010)

ohle said:
			
		

> Huh, OK, if that's what it is, I guess I'll have to do that. The guide I followed way back when I upgraded to version 8 didn't tell me to rebuild all ports, so I'm a bit surprised.



Please let the author know that should be added.  Here's a reference from the FreeBSD FAQ.



> May I ask how you deduced that this is the problem? Just curious, the symptoms seemed totally random to me.



Your compile was looking for libexiv2.so.7, but you already had libexiv2.so.9 installed.  Something is still referring to the old version.  pkg_libchk(1) is good at finding this type of error.


----------



## ohle (Nov 11, 2010)

I see. So the problem is that with a FreeBSD major version upgrade, old library
versions are removed from the ports tree, and the dependency tree of installed
ports becomes messed up.

Thanks for the explanation. I'm now rebuilding all ports, which is quite the pain
I have to admit.


----------



## wblock@ (Nov 11, 2010)

ohle said:
			
		

> I see. So the problem is that with a FreeBSD major version upgrade, old library versions are removed from the ports tree, and the dependency tree of installed
> ports becomes messed up.



Not exactly.  Upgrading individual ports without upgrading the ports that depend on them can cause this at any time.  portmaster(8) should automatically upgrade dependencies, while portupgrade(1) needs the *-r* option to do that.

Upgrading FreeBSD Ports


----------



## ohle (Nov 12, 2010)

wblock said:
			
		

> portmaster(8) should automatically upgrade dependencies, while portupgrade(1) needs the *-r* option to do that.



If I'm reading the manpage of portmaster (which I use) correctly, it also needs an *-r* switch to do that. It also calls this case 'rarely necessary'. 

Would I be correct in thinking that a necessity to recompile dependent ports would be mentioned in UPGRADING (and I must have missed such a note)?


----------



## wblock@ (Nov 12, 2010)

ohle said:
			
		

> If I'm reading the manpage of portmaster (which I use) correctly, it also needs an *-r* switch to do that. It also calls this case 'rarely necessary'.



portmaster's -r is more like portupgrade's -fr.



> Would I be correct in thinking that a necessity to recompile dependent ports would be mentioned in UPGRADING (and I must have missed such a note)?



It might be mentioned in UPDATING, but using either portmaster or portupgrade -r should take care of it either way.

Oh, and let me slightly reword a sentence I used before for better accuracy:
"Upgrading individual ports without *rebuilding* the ports that depend on them can cause dependency version problems at any time."


----------



## fatfredyy (Nov 28, 2010)

Hi,
I'm having the same problem when running:

```
portmaster -a
```
to upgrade my gtk. I have graphics/exiv2 installed but when i run:

```
portmaster -r graphics/exiv2
```
it returns: 
	
	



```
/var/db/pkg/graphics/exiv2 does not exist
```
 I've ran the [cmd=]pkgdb -aF[/cmd] no changes. And I think that it's the kdeartwork4's issue not the exiv2's but I'm just newbie  (please correct me if I'm wrong). I don't know what else I can do.
Greetings Fatfredyy


----------



## wblock@ (Nov 28, 2010)

It doesn't sound like the same problem, but it's hard to tell.  Before going on, go read this: Upgrading FreeBSD Ports.

Have you followed /usr/ports/UPDATING from the last time you updated ports?  There was a KDE change.

Capture the output of the session to show the exact error messages it gives.


----------



## fatfredyy (Nov 29, 2010)

I meant I have a:


```
[ 50%] Building CXX object kscreensaver/kdesavers/CMakeFiles/kvm.kss.dir/kvm.o
/usr/bin/ld: warning: libexiv2.so.7, needed by /usr/local/kde4/lib/libkexiv2.so, not found (try using -rpath or -rpath-link)
/usr/local/kde4/lib/libkexiv2.so: undefined reference to `Exiv2::Exifdatum::Exifdatum(Exiv2::ExifKey const&, Exiv2::Value const*)'
```
 error  and it's a shame to admit it, there is a note in UPDATING regarding the KDE upgrade, which I missed... For now I'm comfortable with GNOME but I think I will start the fight soon .
Greetings Fatfredyy


----------

