# Recompiling all ports



## xy16644 (Aug 11, 2012)

In the past when I have upgraded from FreeBSD 7.2 to 8.0 and then from 8.0 to 9.0 I have recompiled all my ports. This usually takes many hours to complete.

When upgrading from (say) FreeBSD 9.0 to 9.1 is it necessary to recompile all your ports for a minor upgrade? Or do you *always* have to recompile all your ports after upgrading FreeBSD?


----------



## jb_fvwm2 (Aug 11, 2012)

If you have the COMPAT_FREEBSD7 (etc) in your kernel, and the /usr/ports/misc/compat* ports installed, a good chance ports will work even when upgrading, say, v8 to v9.  (YMMV).  [I don't believe this was the case in recent FreeBSD history, though].


----------



## vermaden (Aug 11, 2012)

I do it that way and compile only things that are not available as packages:
http://forums.freebsd.org/showthread.php?t=26140

... also, if You want to recompile everything more then once, then look into CCACHE (Compiler CACHE).


----------



## wblock@ (Aug 12, 2012)

xy16644 said:
			
		

> In the past when I have upgraded from FreeBSD 7.2 to 8.0 and then from 8.0 to 9.0 I have recompiled all my ports. This usually takes many hours to complete.
> 
> When upgrading from (say) FreeBSD 9.0 to 9.1 is it necessary to recompile all your ports for a minor upgrade? Or do you *always* have to recompile all your ports after upgrading FreeBSD?



No, ports do not need to be recompiled unless you have upgraded from one major version (FreeBSD 8.x) to the next (FreeBSD 9.x).

Ports compiled on FreeBSD 9.0 will still run on 9.1.  See That Word Does Not Mean What You Think It Means.


----------



## kpa (Aug 12, 2012)

Upgrading one major version without recompiling installed ports is possible if you install a compat package that matches the version you're upgrading from. For example if you upgrade from 8.2 to 9.0  and all your installed ports are compiled on 8.2 you can avoid the recompilation by installing misc/compat8x.


----------



## xy16644 (Aug 12, 2012)

Thank you all for the posts. Since it takes almost a day to recompile ALL my ports I shall choose not to recompile all my ports after I have upgraded to 9.1...unless theres an issue with one. 

I am running RELEASE at the moment and don't have any plans to move over to STABLE yet!


----------

