Post-Upgrade Questions 7.2 to 8.0

I recently upgraded my system using freebsd-update from 7.2 to 8.0. Along the way I also ran portupgrade -afc to upgrade all my ports. After a final reboot, I noticed a bunch of things failed to start. For example, Apache complained about missing libcrypt.so.4.

I updated my ports tree with portsnap, ran pkgdb -F and pkgdb -fu. And then again ran portupgrade -afc. Another reboot, and Apache was still complaining about the missing library file.

As a workaround, I symlinked libcrypt.so.5 to libcrypt.so.4. I am pretty sure this isn't the best way to do this. What else should I do here to ensure that my programs continue to function? Thank you in advance for any help you can offer.
 
An easy way to debug this: $ pkg_info -r apache*, this should give you a list of the packages your Apache installation ("software package") depends on. For example, this is what it looks like on FreeBSD 9.1:

Code:
$ pkg_info -r apache*
Information for apache22-2.2.24:

Depends on:
Dependency: expat-2.0.1_2
Dependency: perl-5.14.2_3
Dependency: pcre-8.32
Dependency: gdbm-1.9.1
Dependency: db42-4.2.52_5
Dependency: libiconv-1.14_1
Dependency: apr-1.4.6.1.4.1_3
Then all you need to do is check if those packages are actually (properly) installed.

Another thing to keep in mind is that Apache has a modular setup. You can extend it with modules, and each of those modules will have dependencies of their own. You mentioned libcrypt.so.4, that makes me think about SSL support (mod_ssl). So you might also want to check for Apache modules which you manually installed.

Finally, thinking while writing (and checking things for myself). OpenSSL is part of the base system in FreeBSD 9.1. Now, I know you mentioned 8.0 (I think you need to upgrade to 8.3, 8.0 has reached the EOL mark), and I'm not familiar with 8.0 myself. So you'll need to verify the stuff I mention here.

But since Apache on FreeBSD 9.1 relies on some libraries in the base system I think it's obvious that should you ever upgrade the base system (thus also OpenSSL for example) you'll need to re-build Apache as well so that it can utilize the new library.

Either that or maybe install security/openssl and configure ports such as Apache to rely on that instead.

Hope this can help.
 
Thank you for the replies.

@ShelLuser: I thought that when you rebuild your ports, it automatically rebuilds your libraries. Or each time that I upgrade I will need to check dependencies and install/reinstall?

Additionally, when I check the dependencies for stunnel I see openssl. I have deinstalled/reinstalled both openssl and stunnel, however I still receive an error about libz.so.4. Shouldn't this have been resolved?

@kpa: Is there any downside to install the compatibility package? Will this need to be done after every upgrade?

Thank you again.
 
Last edited by a moderator:
Please keep in mind that FreeBSD 8.0 has been end-of-life since November 2010. Please use 8.3 instead.
 
The compatibility package is a stopgap measure to keep the installed programs running without changing anything else. You should recompile all installed ports and when you're sure that no port needs the compatibility libraries you can then uninstall the compat package.
 
The reason I asked was because after the upgrade, stunnel wasn't working because of libz.so.4. I ran pkg_info -r stunnel, and deinstall/reinstalled the dependency openssl, as well as stunnel. It still complained about the missing library.

Once the 8.3 upgrade completes, I will give it a go with portmaster. Thank you again.
 
After the update to 8.3, the only thing that failed to start was apache. I ran portmaster -r apache. It successfully rebuilds apache, however it fails when rebuilding php5. Here is the output:

Code:
Configuring extensions
checking size of long... (cached) 4
checking size of int... (cached) 4
checking for int32_t... yes
checking for uint32_t... yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... yes
checking for atoll... yes
checking for strftime... (cached) yes
checking which regex library to use... php
checking whether to enable LIBXML support... yes
checking libxml2 install dir... /usr/local
checking for xml2-config path... /usr/local/bin/xml2-config
checking whether libxml build works... no
configure: error: build test failed.  Please check the config.log for details.
===>  Script "configure" failed unexpectedly.
Please report the problem to ale@FreeBSD.org [maintainer] and attach the
"/usr/ports/lang/php5/work/php-5.4.15/config.log" including the output of the
failure of your make command. Also, it might be a good idea to provide an
overview of all packages installed on your system (e.g. a /usr/sbin/pkg_info
-Ea).
*** Error code 1

Stop in /usr/ports/lang/php5.
*** Error code 1

Stop in /usr/ports/lang/php5.

===>>> make failed for lang/php5
===>>> Aborting update

===>>> Update for lang/php5 failed
===>>> Aborting update

===>>> Update for php5-fileinfo-5.4.15 failed
===>>> Aborting update
 
It's a bit of a weird error (for me) because the real dependency of lang/php5 is libxml2, as can be seen here:

Code:
root@smtp2:/usr/ports/lang/php5 # make build-depends-list
/usr/ports/devel/autoconf
/usr/ports/devel/pcre
[B]/usr/ports/textproc/libxml2[/B]
/usr/ports/www/apache22
However, if you check the Makefile then you'll clearly see: --enable-libxml and --with-libxml-dir=${LOCALBASE}, even though later in that same file it points to libxml2 again: USE_GNOME= libxml2.

Might be worth checking out. Oh, in case you're wondering; ${LOCALBASE} points to where your Ports gets installed to, normally /usr/local (Source:ports(7)).

Even so; the first thing I'd do to rule out any possible oddities would be running this first (as root):

Code:
make clean
make build
Optionally you could also consider to remove /usr/ports/distfiles/php-5.4.15.tar.bz2 so that you can be sure that your system is really using the latest tarball.

Note: this is all assuming that you're using an up to date ports collection. The current revision at the time of writing is 308183 (or close enough, I haven't ran any updates today). You can see this for yourself by using # svn info inside the Port collection.

Hope this helps.
 
Thank you for the reply @ShelLuser. Earlier I did uninstall/reinstall libxml2 to no avail.

I deleted the php-5.4.15.tar.bz2 file, and ran the
Code:
make clean
make build
commands as you suggested. It does proceed to download the .tar.bz2 file, but again fails at the same point. So I am still dead in the water with php right now.
 
Last edited by a moderator:
Then we need to do as the manual says ;)

Check /usr/ports/lang/php5/work/php-5.4.15/config.log. Don't paste the whole thing here, that's really a waste of resources, but instead paste the first section (everything above the "platform" box).

Next I'd like you to execute $ less /usr/ports/lang/php5/work/php-5.4.15/config.log, then press /XML (mind CAPITAL letters!) and press enter. Now you should see something similar like this:

Code:
configure:21628: checking whether to enable LIBXML support
configure:21663: result: yes
configure:21673: checking libxml2 install dir
configure:21688: result: /usr/local
Paste that stuff, go as far as including the lines mentioning OpenSSL support, they should be somewhat lower than that. If you want you can include a few lines above this as well (you can use the cursor keys to move around, or use 'p' to go up, and 'space' to go down), just don't overdo it.

I can't promise that this will lead to an answer, but I do hope it sheds some more light on this.

When all else fails you should e-mail this file to the maintainer. But maybe we can figure this one out without bothering him just yet.
 
Thank you again for your reply @ShelLuser. I actually ended up reverting my snapshot back to the pre 8.3 upgrade. I was going to give it a fresh go again tomorrow morning.

Also, here is my upgrade path. Any tips or tricks you can share?
Code:
freebsd-update -r 8.3-RELEASE upgrade
freebsd-update install
shutdown -r now
freebsd-update install
portupgrade -f ruby\* && rm /var/db/pkg/pkgdb.db
portupgrade -afc
freebsd-update install
shutdown -r now

Essentially these are the upgrade steps that I've gathered from different postings. Thanks again.
 
Last edited by a moderator:
Back
Top