# /libexec/ld-elf.so.1: Shared object "libgcrypt.so.16" not found



## cabriofahrer (Sep 23, 2010)

After doing a [cmd=]portmaster --packages --packages-if-newer www/seamonkey2[/cmd] I first could not boot into gnome anymore, GDM would always fall back into the login. (Note that in my /etc/csh.cshrc I've put the entry "setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/", so that I always get the 8-stable-packages).

Then I performed a [cmd=]portmaster --packages --packages-if-newer x11/gnome2[/cmd] and I could boot into gnome again, everything seemed to work fine.

But then it turned out that epihany and the battery monitor don't work anymore (and probably other things), here is what I get when starting those applications from a terminal:


```
$ gnome-power-manager
/libexec/ld-elf.so.1: Shared object "libgcrypt.so.16" not found, required by "gnome-power-manager"
$ epiphany
/libexec/ld-elf.so.1: Shared object "libgcrypt.so.16" not found, required by "epiphany"
$
```
I don't know if this has anything to do with what it says about the port "gettext" in UPDATING. Also, I must admit that I do not quite understand what it says there...

But after a complete upgrade of gnome without errors everything should work fine, shouldn't it?


----------



## jb_fvwm2 (Sep 23, 2010)

1... update the ports tree


```
portmaster -d -B gnome-power-manager /var/db/pkg/epiphany-(some_number)
```
(One would include the path on the second so not
more than plain epiphany would be included.)

1a... install portmaster
2... check UPDATING for gcrypt (july 2010)
3... run the code above, wait for "permission
to proceed" prompt if occurs, else wait for
completion of the portmaster command.
4... if further errors occur, maybe post back


----------



## cabriofahrer (Sep 24, 2010)

I've run the command as you said and gnome-power-manager and epiphany were reinstalled. Gnome-power-manager then worked again, epiphany didn't. The same error appeared.
I then tried


```
cd /usr/ports/www/epiphany
make deinstall
make reinstall
```

But then the port would not even build anymore, an error code appeared again saying:


```
/libexec/ld-elf.so.1: Shared object "libgcrypt.so.16" not found
```

Also a [cmd=]portmaster epiphany[/cmd] would give the same.

In the end I did a [cmd=]pkg_add -r epiphany[/cmd] but when trying to run epiphany after installation I got that same error code again.

You also said: "2... check UPDATING for gcrypt (july 2010)"

Well, I read the note about libgcrypt, but what about it? Should I have rebuild all ports around libcrypt as it says there? I don't see how this is related to my problem.

And why does gnome-power-manager now work after the rebuild, but epiphany does not?

It somehow seems to me that the note in UPDATING about "gettext" alerts of problems arising even after a rebuild of all depending ports that should then be reported?


----------



## jb_fvwm2 (Sep 24, 2010)

An upgrade to gettext (if not minor) may break all gettext-dependent ports. Similarly with an upgrade to (lib)(g)crypt.
...
Notwithstanding the workaround I started using this year
for the former. (It is in another post, "libintl.so.8 " ... one
can search for.)
...
The notes in UPDATING usually work well if one has not too
many ports installed.
...
In your case, however, you can use maybe seamonkey, firefox,
dillo, w3m, lynx, links, elinks, midori, opera, or
some other browser in the meantime?
...
one of the ports needed by the build OR the run or
epiphany still needs upgrading for epiphany to build.
(usually).   And the pkg_add -r may 
(might have caused) cause more
problems than it would solve (older packages are found
that way) in this case.


----------



## cabriofahrer (Sep 25, 2010)

Oh yes, I do use seamonkey anyway and it works fine. Would an upgrade of all ports solve my problem?


----------



## wblock@ (Sep 25, 2010)

cabriofahrer said:
			
		

> Oh yes, I do use seamonkey anyway and it works fine. Would an upgrade of all ports solve my problem?



Maybe.  Certainly upgrading only some ports while skipping others will definitely cause problems.  It's kind of an all or nothing setup.


----------



## cabriofahrer (Sep 28, 2010)

Well, I've performed a "portupgrade -aPP" and that didn't solve the problem either. I know that this procedure cannot upgrade all ports, but I think the not upgraded ports do not have anything to do with the functionality of gnome. And now (or even before without noticing) gnome-help doesn't work.
Gnome-help is not a port of itself, it must be part of something else and I would like to recompile that port. But which port would that be?


----------



## wblock@ (Sep 28, 2010)

sysutils/bsdadminscripts has the very useful pkg_libchk.  That will go through installed applications and tell you what libraries are missing.  Actually, applications that are missing libraries are often the ones that need to be rebuilt, because they libraries they depend on have already been updated.

Here's my article on updating ports: http://www.wonkity.com/~wblock/docs/html/portupgrade.html.


----------



## cabriofahrer (Oct 16, 2010)

Thanks a lot for the hint, that really is a useful tool. But in the end it didn't solve any problem. E.g. a port reported by pkg_libchk to miss libraries didn't rebuild, again with the error 
	
	



```
/libexec/ld-elf.so.1: Shared object "libgcrypt.so.16" not found
```

But meanwhile I've updated the ports tree and performed another `portupgrade -aPP`

Epiphany now works again. pkg_libchk would report a lot of missing libraries again, but after performing a [cmd=]portsclean -L[/cmd] it was all gone! 

So it looks like performing a [cmd=]portsclean -L[/cmd] can be more useful than recompiling the ports listed by pkg_libchk?

But here is the still remaining problem: gnome-help still doesn't work. Here is what the terminal reports:


```
$ gnome-help

(gnome-help:1727): Gtk-CRITICAL **: gtk_tool_button_new: assertion `icon_widget == NULL || GTK_IS_MISC (icon_widget)' failed

(gnome-help:1727): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(gnome-help:1727): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(gnome-help:1727): Gtk-CRITICAL **: gtk_toolbar_insert: assertion `GTK_IS_TOOL_ITEM (item)' failed

(gnome-help:1727): Gtk-CRITICAL **: gtk_tool_button_new: assertion `icon_widget == NULL || GTK_IS_MISC (icon_widget)' failed

(gnome-help:1727): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(gnome-help:1727): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

(gnome-help:1727): Gtk-CRITICAL **: gtk_toolbar_insert: assertion `GTK_IS_TOOL_ITEM (item)' failed
$
```

Could it be that there is an error with gtk? What is it that I could try recompiling? Here is everything gtk-related on my machine:


```
$ pkg_info | grep gtk
avahi-gtk-0.6.27    Gtk+ tools and bindings to the Avahi mDNS system
clutter-gtk-0.10.4_1 GTK+ Integration library for Clutter
pkg_info: corrupted record (pkgdep line without argument), ignoring
gtk-2.20.1_2        Gimp Toolkit for X11 GUI (current stable version)
gtk-engines2-2.20.1_1 Theme engine for the GTK+-2.0 toolkit
gtk-sharp-2.12.10   GTK+ and GNOME interfaces for the .NET runtime
gtk-vnc-0.3.10_3    VNC viewer widget for GTK+
gtk-xfce-engine-2.6.0_3 An XFCE engine for GTK 2.0
gtkglext-1.2.0_8    An OpenGL extension to GTK
gtkhtml3-3.30.3     Lightweight HTML rendering/printing/editing engine
gtkimageview-1.6.4_2 Simple image viewer widget
gtkmm-2.20.3_1      C++ wrapper for Gtk+, Pango, Atk
gtksourceview-1.8.5_7 A text widget that adds syntax highlighting to the GtkTextV
gtksourceview2-2.10.4 A text widget that adds syntax highlighting to the GtkTextV
linux-f10-gtk2-2.14.7_2 GTK+ library, version 2.X (Linux Fedora 10)
linux-libgtkembedmoz-0.0.20100806 HTML rendering library
poppler-gtk-0.12.4_1 Gtk bindings to poppler
py26-cluttergtk-0.10.0 Python modules for Clutter-gtk toolkit
py26-gtk-2.17.0_4   A set of Python bindings for GTK+
py26-gtksourceview-2.10.1 A python bindings for the version 2 of the GtkSourceView li
webkit-gtk2-1.2.4   An opensource browser engine
pkg_info: corrupted record (pkgdep line without argument), ignoring
$
```


----------



## wblock@ (Oct 17, 2010)

cabriofahrer said:
			
		

> Thanks a lot for the hint, that really is a useful tool. But in the end it didn't solve any problem. E.g. a port reported by pkg_libchk to miss libraries didn't rebuild, again with the error
> 
> 
> 
> ...



Above, you did a "deinstall reinstall", which could reinstall the same broken build.  Instead, clean the port and do a fresh build:
`# cd /usr/ports/www/epiphany`
`# make deinstall clean`
`# make install clean`


----------



## cabriofahrer (Oct 18, 2010)

Well, thank you, but as I said, epihany worked again after another recent

`# portupgrade -aPP`.

The only problem remaining is the application "gnome-help" for which I posted the corresponding error code. My guess is that some gtk-related port (I've listed the ports, too) needs to be recompiled. But which one? And it is just a guess. Maybe it is another problem? The error code says something about icons as well.


----------



## none (Nov 2, 2010)

hi,

I get the same error, but with libchamplain:


```
CCLD   libchamplain-gtk-0.4.la
/usr/local/bin/g-ir-scanner -v \
        --namespace GtkChamplain --nsversion=0.4 \
        --strip-prefix=GtkChamplain \
        -D_THREAD_SAFE -D_REENTRANT -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -
I/usr/local/include/cairo -I/usr/local/include/pango-1.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include -I/usr/local/include/glib-2.0 
-I/usr/local/lib/glib-2.0/include -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/clutter-1.0 -
I/usr/local/include/drm   \
        -D_REENTRANT -I/usr/local/include/libsoup-gnome-2.4 -I/usr/local/include/libsoup-2.4 -I/usr/local/include/libxml2 -I/usr/local/include 
-I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include   \
        -I..                    \
        -DCHAMPLAIN_COMPILATION         \
        -DCHAMPLAIN_GTK_COMPILATION     \
        --add-include-path=../champlain \
        --c-include="champlain-gtk.h gtk-champlain-embed.h" \
        --include=Champlain-0.4 \
        --include=Clutter-1.0 \
        --include=Gtk-2.0 \
        --library=champlain-gtk-0.4 \
        --libtool="/bin/sh /usr/ports/graphics/libchamplain/work/gnome-libtool" \
        --output GtkChamplain-0.4.gir \
        --pkg gobject-2.0 \
        --pkg gtk+-2.0 \
        ./champlain-gtk-marshal.list ./champlain-gtk-marshal.h ./champlain-gtk-marshal.c ./gtk-champlain-embed.c \
        ./champlain-gtk.h ./gtk-champlain-embed.h
/libexec/ld-elf.so.1: Shared object "libgcrypt.so.16" not found, required by "libchamplain-0.4.so.1"
Command '['/usr/ports/graphics/libchamplain/work/libchamplain-0.4.6/champlain-gtk/tmp-introspect0Imvic/GtkChamplain-0.4', '--introspect-
dump=/usr/ports/graphics/libchamplain/work/libchamplain-0.4.6/champlain-gtk/tmp-
introspect0Imvic/types.txt,/usr/ports/graphics/libchamplain/work/libchamplain-0.4.6/champlain-gtk/tmp-introspect0Imvic/dump.xml']' returned 
non-zero exit status 1
gmake[3]: *** [GtkChamplain-0.4.gir] Error 1
gmake[3]: Leaving directory `/usr/ports/graphics/libchamplain/work/libchamplain-0.4.6/champlain-gtk'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/ports/graphics/libchamplain/work/libchamplain-0.4.6/champlain-gtk'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/graphics/libchamplain/work/libchamplain-0.4.6'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/graphics/libchamplain.

===>>> make failed for graphics/libchamplain
===>>> Aborting update

===>>> Update for libchamplain-0.4.6 failed
===>>> Aborting update
```

I've tried [cmd=]portmaster -ad[/cmd] and [cmd=]portmaster -r libgcrypt[/cmd] as seen in UPDATING.

I just cant update all ports here :/

I've run [cmd=]portsclean -L[/cmd] twice.

Is there any other thing I can do, before [cmd=]pkg_delete -a[/cmd]
?

Thanks,

none


----------



## wblock@ (Nov 3, 2010)

So what version of libgcrypt do you actually have?

```
% locate libgcrypt.so
/usr/local/lib/compat/pkg/libgcrypt.so.16
/usr/local/lib/libgcrypt.so
/usr/local/lib/libgcrypt.so.17
```

That's the current version, which you should have.  Then the question becomes "why is the software you're trying to install looking for the old version?"  My guess would be that there's been some of that soft-linking of libraries which was so popular a couple of months ago and really is not a good idea.  I even wrote a program to check for those: http://www.wonkity.com/~wblock/fakelib/fastfakelib.

After that, cleaning and deinstalling/installing libgcrypt (not reinstalling) might make a difference.  Capture the build and you may see errors.


----------



## none (Nov 4, 2010)

thanks Thanks,

but But I did need the box and my patience was not that good, and `pkg_delete -a` was my chosen way. 

well Well, even though, when I got to issue a `make install clean` in xorg, gnome2 and firefox, in this order, I got quite the same error.

I did have that compat libs you showed, but in my case was .17 and compat would be .15.

I just ran `pkg_delete -a` and got straight to the point of libchamplain (that would complain about libgcrypt). let's Let's see what comes from it.

I guess that was my case, old libs. just Just don't know how to deal with it apart from complete reinstall.

`portmaster -ad` was ok before, just this gcrypt problem 

Thanks,

none

ps: problem again ! Testing those scripts you told. Thanks.


----------

