Ports broken after major upgrade from 9.1 to 10.0 and 10.1

Around a month ago, after upgrading my ports tree, most of my X-related applications were broken. I soon learned that I should have read /usr/ports/UPDATING before doing all the recompilation, because the old Xorg version (7) was decided to not be supported. Back then I was using FreeBSD 9.1 RELEASE (on a i386 platform).

I soon decided that the best to solve my problem was to upgrade my base to 10.0-RELEASE. In the process of upgrading, after using freebsd-update upgrade -r 10.0-RELEASE I did freebsd-update install and then reboot to do it again; and as usual I was instructed to rebulid all the ports. I somehow decided to delete all the third-party packages on my system first, and then I did freebsd-update install again to finish.

But after that I found that all the port-building was unsuccessful. Some sort of library linking problem I supposed.

Recently I upgraded from 10.0-RELEASE to 10.1-RELEASE again. But the problem of ports not building persists. I wonder if anyone here knows how to fix it.
Let me describe the problem I have a little bit further:

After deleting all the third-party packages on 10.0-RELEASE, I did freebsd-update upgrade -r 10.1-RELEASE followed by three times of freebsd-update install Then to starting building all the ports I wanted, I tried to build ports-mgmt/pkg, and the relevant part of the message I got was
Code:
checking for gmtime_r... yes
checking for strerror_r... (cached) yes
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for git... no

checking for library containing lzma_version_string... no
configure: error: unable to find the liblzma

And for many of the other ports, I had got library linking problems too. For example, for mail/mutt, the relevant part of the message was:
Code:
libtool: link: c++ -shared -nostdlib  ....(some codes here).....  -Wl,-soname -Wl,libaspell.so.15 -o .libs/libaspell.so.15.1.5
/usr/bin/ld: .libs/libaspell.so.15.1.5: version node not found for symbol _malloc_op
tions@FBSD_1.0
/usr/bin/ld: failed to set dynamic section sizes: Bad value
c++: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:1014: recipe for target 'libaspell.la' failed
gmake[5]: *** [libaspell.la] Error 1
gmake[5]: *** Waiting for unfinished jobs....

And for another example, for graphics/mupdf, I got:
Code:
libtool: link: cc -shared  .libs/jbig2.o .libs/jbig2_arith.o .libs/jbig2_arith_int.o
.libs/jbig2_arith_iaid.o .libs/jbig2_huffman.o .libs/jbig2_segment.o .libs/jbig2_pa
ge.o .libs/jbig2_symbol_dict.o .libs/jbig2_text.o .libs/jbig2_generic.o .libs/jbig2_
refinement.o .libs/jbig2_mmr.o .libs/jbig2_halftone.o .libs/jbig2_image.o .libs/jbig
2_image_pbm.o .libs/jbig2_metadata.o   -L/usr/local/lib -lpng -lz    -Wl,-soname -Wl
,libjbig2dec.so.0 -o .libs/libjbig2dec.so.0.0.0
/usr/bin/ld: .libs/libjbig2dec.so.0.0.0: version node not found for symbol _malloc_o
ptions@FBSD_1.0
/usr/bin/ld: failed to set dynamic section sizes: Bad value
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [libjbig2dec.la] Error code 1

Could someone help? Thanks!
 
After upgrading from 9.1 to 10.0, did you rebuild all ports?
I in fact didn't, instead I deleted all the third-party packages, and then I did freebsd-update install. But I guess the removal was not clean?

I was hoping that another upgrade from 10.0 to 10.1 might help, but I guess not.
 
freebsd-update(8) does not deal with ports or packages at all, only with the base system. After a major version upgrade, all installed ports must be updated, either with pkg or by building from ports. The portmaster(8) man page shows an outdated procedure. A patch to update that is in PR 191166.
 
Oh, and there was a note about .la errors in /usr/ports/UPDATING recently which might be relevant.

I noticed that.

I more or less followed the new procedure you proposed in the corrected man page of portmaster, up to Step 8 (before installing ports-mgmt/pkg), while still on 10.0. So up to this point, my /usr/local and /var/db/pkg were empty. Then I upgraded to 10.1. But in trying to follow Step 9 (installing ports-mgmt/pkg and so on), I encountered the problem I described above.

Now I can only use pkg install ... to use all the binary packages. Most of the building in ports will fail.
 
I ran into this problem over the weekend, when upgrading FreeBSD from 9.3 to 10.1 - something went wrong and the system was left in unusable state. When I got it back to work I ran into the problem you describe - ports wouldn't compile, complaining about the _malloc_options@FBSD_1.0 symbol.

The solution that worked for me was doing a manual install of 10.1 base (extracted from base.txz for 10.1-RELEASE). I copied all the libraries, base system again, includes and everything that wouldn't break my system further - ports started compiling fine.
 
I strongly suggest a buildworld/installworld of the operating system after that kind of binary hackery, just to make sure everything is consistent and nothing was missed.
 
I strongly suggest a buildworld/installworld of the operating system after that kind of binary hackery, just to make sure everything is consistent and nothing was missed.

Followed by mergemaster and make delete-old delete-old-libs, without these you might have some leftovers from the old version of the OS lying on disk confusing ports building.
 
Well, several weeks ago, I got impatient and just wiped out my old system and installed a new 10.1-RELEASE. Things are much cleaner now.

For someone who is thinking of doing a binary upgrade from FreeBSD 9 to FreeBSD 10 and stumbled upon this thread, be warned that the upgrade will be quite possible to be unsuccessful (something wrong with freebsd-update, I suppose).
 
If you stick with binary updates, a freebsd-update IDS would be a good way to go. Realistically you should only see stuff in /etc in what is shown and if there is more than that then something didn't go right other with the update or something is wrong with the system.
 
Back
Top