portmaster -a and missing libintl.so.8

Hi,

My FreeBSD 8 box which is 2 days old is already half-broken. I ran "portmaster -a" to see how it works, so some software gets updated until it reaches libpcap:

Code:
Building for libpcap-1.1.1
/libexec/ld-elf.so.1: Shared object "libintl.so.8" not found, required by "gmake"
*** Error code 1

Stop in /usr/ports/net/libpcap.

===>>> make failed for net/libpcap
===>>> Aborting update

===>>> Update for libpcap-1.0.0 failed
===>>> Aborting update
Root can still ssh, but regular users who use bash can't:
Code:
/libexec/ld-elf.so.1: Shared object "libintl.so.8" not found, required by "bash"
Connection to server closed.
 
Sounds like you installed ports before updating the ports tree. After a new install, update the ports tree before installing anything.

To fix the current problem, see the 20100530 entry in /usr/ports/UPDATING.
 
In /usr/ports/UPGRADING I have found:
Code:
20100524:
  AFFECTS: users of devel/darcs, ports-mgmt/porte, textproc/pandoc,
           x11/xmobar, x11-wm/xmonad, x11-wm/xmonad-contrib


        # cd /usr/ports/devel/gobject-introspection
        # make clean
        # make deinstall
        # make install clean

  Then continue your upgrade procedure normally.

  If there are still ports on your system that are looking for libintl.so.8
  (either in ${LOCALBASE}/lib/compat/pkg, or non-existent), _please_ file
  a PR so that a correct direct dependency can be added.
After updating the Ports Collection, I tried applying the commands to libpcap but it still failed :(
 
Hmmm I can't edit my previous post???

Anyway, why would the update fail? It would have failed yesterday too as the Ports Collection would not yet be updated.
 
Code:
$ sudo portsclean -C
sudo: portsclean: command not found

So I go and install portupgrade which portsclean is part of, and now I see it wants to use berkleyDB as a backend DB, but portmaster was advertising that it doesn't use any DB backend.

I'm starting to get mixed up with all the various tools required.
 
Portsclean is a part of portupgrade package (i think)
Code:
cd /usr/ports/ports-mgmt/portupgrade
make config
make install clean
portsclean -C
or
portsclean -CDD
to remove also useless packages from /usr/ports/distfiles
 
Code:
===>  Building for libpcap-1.1.1
/libexec/ld-elf.so.1: Shared object "libintl.so.8" not found, required by "gmake"
Code:
$ locate libintl.so
/usr/local/lib/libintl.so
/usr/local/lib/libintl.so.8
I don't know what it's looking for :\
 
libintl.so.8 is part of gettext. You probably have upgraded gettext and eliminated the old library. That breaks things that depend on gettext.

The 20100530 entry in /usr/ports/UPDATING tells you how to rebuild all the ports that depend on gettext.

Other things may be broken, too, and searching on libintl.so.8 will find a lot of people recommending linking the new library as the old one. That's a temporary fix that may be necessary. If you have to do that, remove the link after you've upgraded all the dependencies! Don't leave it lying around to cause problems later.

PS: portupgrade is one tool for upgrading ports. portmaster is a different one.
 
I reinstalled gmake (make deinstall && make install clean) which was giving trouble, and finally it managed to go through!

Ok so I'll let freebsd go free, this one's for me; but next time, freebsd is out. I didn't do anything critical to yield such issue.
 
wblock said:
You probably have upgraded gettext and eliminated the old library.
I never told freebsd to specifically upgrade gettext, it decided by itself to do that task. It should not have broken dependencies. Hopefully this time it was an easy fix (after struggling).
 
BeastieBoy said:
I never told freebsd to specifically upgrade gettext, it decided by itself to do that task.

You told portmaster to upgrade all ports with -a. Incidentally, portmaster isn't part of FreeBSD, it's just another application. So is portupgrade.

It should not have broken dependencies. Hopefully this time it was an easy fix (after struggling).

portupgrade and portmaster do the best they can, but automated tools can't handle every situation. That's why users are told to always check /usr/ports/UPDATING before upgrading ports.

# pkg_info -R gettext\* will show you all the other ports that require gettext and may need to be rebuilt.
 
wblock said:
libintl.so.8 is part of gettext. You probably have upgraded gettext and eliminated the old library. That breaks things that depend on gettext.

The 20100530 entry in /usr/ports/UPDATING tells you how to rebuild all the ports that depend on gettext.

Other things may be broken, too, and searching on libintl.so.8 will find a lot of people recommending linking the new library as the old one.

In one of those threads I discovered a new method:

/////edit/
for those not using one of the major
upgrading tools (portmaster, portmanager, portupgrade)
/////end edit/

(works probably for major upgrades to curl, gettext,
png, jpeg, ...)
1... copy the .so. before removal of the (gettext) etc
to /usr/local/lib/compat
2... upgrade the port (gettext).
3.. take your time upgrading things, the non-upgraded-yet
still work (looking in /usr/local/lib/compat ) and the
already-upgraded ones look in the usual new place for the
newer .so. file...

So far just using it with gettext but it makes it a whole
lot easier than it has been for many years... (and
a installworld would probably be time to clear out
the old .so. unless I am ignorant of a more compelling
reason to do it sooner).
 
jb_fvwm2 said:
In one of those threads I discovered a new method:
(works probably for major upgrades to curl, gettext,
png, jpeg, ...)
1... copy the .so. before removal of the (gettext) etc
to /usr/local/lib/compat
2... upgrade the port (gettext).
3.. take your time upgrading things, the non-upgraded-yet
still work (looking in /usr/local/lib/compat ) and the
already-upgraded ones look in the usual new place for the
newer .so. file...

portupgrade does that automatically, putting the old libraries in /usr/local/lib/pkg.
 
BeastieBoy said:
I never told freebsd to specifically upgrade gettext, it decided by itself to do that task. It should not have broken dependencies. Hopefully this time it was an easy fix (after struggling).

Yes you did, with the original portmaster -a command. This is why I always recommend to never use -a.

Everytime you update the ports tree, be sure to read /usr/ports/UPDATING to see what issues there are (like the gettext, jpeg, and png updates) and how to do them properly.

Using $ pkg_version -vl '<' to see which of your installed apps have updates available, and only updating the ones you need, is much better than doing a blind -a.
 
Adding -w to the portmaster command will copy old libs to the compat directory, allowing apps to use the old lib until everything is recompiled using the new lib.

Reading the man page for an app is generally recommended before using it to update the system. :)
 
Howdy,

I'm the author of portmaster, and I'd like to provide what I hope is some helpful information regarding the various posts on this thread.

First, to BeastieBoy I'm not quite sure if you're building a new box, updating an existing system from a previous version of FreeBSD, or something else. Either way, if you're going to update your ports the first 2 steps you should ALWAYS perform are:
1. update your ports tree to the latest version, and
2. read /usr/ports/UPDATING

Second, if what you were doing was a major version upgrade of FreeBSD, especially if your ports tree and/or your installed ports were dramatically out of date, then 'portmaster -a' was not a good idea. In general, a better way to learn how a tool like portmaster works is to use the man page. :) If you ARE upgrading from FreeBSD 6 or 7 to 8.x then you'll want to read the portmaster man page and follow the instructions in the EXAMPLES section on doing a major version upgrade.

The gmake port had its PORTREVISION bumped when the gettext update was done, so chances are pretty good that if your ports tree had been up to date to start with this problem wouldn't have happened. wblock already mentioned the 20100530 UPDATING entry which has the right answer for the gettext situation.

In regards to 'portsclean -C' portmaster has a similar feature, --clean-distfiles[-all] which is described in more detail in the man page.

In regards to automatically saving the shared libs when a port is upgraded, you can use the -w option for portmaster to do that as well. If you'd like it to always be done then you can create a /usr/local/etc/portmaster.rc or ~/.portmasterrc file to do that for you. The procedure for doing so is in the man page.

I hope that this information is useful to everyone. I don't actively follow the forums so while I'm happy to respond here when I find out about a portmaster thread it's generally faster/easier to get a response on the freebsd-ports@FreeBSD.org mailing list.

hope this helps,

Doug
 
Woops. When trying to install Ruby1.9.1 which was giving me troubles, I reinstalled libiconv, and now most applications that are built against it are broken.

So how can I tell which applications depend on libiconv (or whatever lib) so that I can all fix them at once? And also that'll prevent me from running into such trouble in the future.

Thanks
 
check /usr/ports/lang/ruby19/work/ for
the /iconv/ still there. IF not, Make Build
again.
....
Then reinstall /usr/ports/converters/ruby-iconv
...
That might fix those broken ports. (might not...)
 
BeastieBoy said:
Woops. When trying to install Ruby1.9.1 which was giving me troubles, I reinstalled libiconv, and now most applications that are built against it are broken.

So how can I tell which applications depend on libiconv (or whatever lib) so that I can all fix them at once? And also that'll prevent me from running into such trouble in the future?

Post #14. But that only shows the ports dependencies, not missing libraries. If it were me, I'd first do the gettext rebuild as in UPDATING. Then upgrade all the other ports, then install sysutils/bsdadminscripts and run pkg_libchk to find any remaining problems.
 
Back
Top