# Problems with ports.



## eeluve (Jun 26, 2012)

I'm sorry, but again can't handle one problem. Got 9.0, about a week since update now, done *portmaster -Raf* which did stop on:

```
===>>> The security/ssh2-nox11 port has been deleted: Has expired: abandoned upstream
===>>> Aborting update

Terminated
Terminated
Terminated
```
Then sysutils/qzeitgeist, had to twice *make clean*, only then was able to *make install clean* (also once rejoining ../qzeitgeist directory started the install ??) which stops on:

```
'staticMetaObjectExtraData' was not declared in this scope
```
which in its place, again I believe somehow doesn't like my version of qt4-moc? Deinstall/reinstall compiles and installs exactly the same version of it (qt4).

I had qt3-"something", *pkg_delete*'d it, now *pkg_info qt** shows only 4th utilities.


----------



## kpa (Jun 26, 2012)

`# pkg_delete -x ssh2-nox11` Stop using obsolete ports that have equivalent functionality in the base system.

"Port expired on 2010-10-15":
http://www.freshports.org/search.php?stype=name&method=match&query=ssh2&num=10&deleted=includedeleted&orderby=category&orderbyupdown=asc&search=Search

ssh(1), sshd(8)


----------



## eeluve (Jun 26, 2012)

Ok, that helped. But after relaunching portmaster stuck on automake19, which has no Makefile.


----------



## SirDice (Jun 26, 2012)

You seem to have an extremely old ports tree installed. The devel/automake19 port was deleted in October 2010.

Combined with the other port from 2010 it means you haven't updated in quite a while. It might be simpler just to *pkg_delete -a* and start over.


----------



## eeluve (Jun 26, 2012)

Excuse me, just to clarify what *I* got to do is --> delete /usr/ports, then [cmd=]portsnap extract fetch update[/cmd] then [cmd=]portmaster -Raf[/cmd] Right?


----------



## SirDice (Jun 26, 2012)

There's no need to remove the existing ports tree. Just updating it is fine.

Don't run *portmaster -Raf*, it's not going to work. There are too many changes and order is important.

`# pkg_delete -a` and start over.


----------



## eeluve (Jun 26, 2012)

Oh this is scary, the system I'm doing it at the moment is somewhat of a test one, only serves as a secondary gateway for if something happens. But if I get the same problem on the main gateway which is also a mail server and a-lot-of-server, that would be such pain in the well-known place to reinstall/reconfigure everything there, when start thinking of all the shared objects that needed symlinks for previous versions to work with different utilities of MTA and stuff. Of course I might save configurations and hope for the best, but honestly will I indeed have to?


----------



## SirDice (Jun 26, 2012)

It's possible to do by hand but I can pretty much guarantee you will have a lot of problems. That's why it's just simpler to start over.

If you remove all packages their configuration files are kept. Symlinks shouldn't be needed (they are never needed actually) as everything will be build with the correct dependencies on a clean system. I'd also suggest building packages from everything yourself, you can use those packages on the other server. So you'll only have to build from source once.


----------



## eeluve (Jun 26, 2012)

So, I've done the [cmd=]pkg_delete -a[/cmd] then started [cmd=]make install clean[/cmd] in /usr/ports/x11/kde4 right away. What did scare me now is that I had to [cmd=]make clean[/cmd] 2ce twice and then [cmd=]make install clean[/cmd] the ../devel/dbus-qt4 manually again. Normal thing to happen?


----------



## SirDice (Jun 26, 2012)

I think you have a lot of stuff left over from (failed) previous builds. This should clean everything out:
`# rm -rf /usr/ports/*/*/work`

That's assuming you haven't set WRKDIRPREFIX.


----------



## eeluve (Jul 2, 2012)

Since I've done 
`# rm -rf /usr/ports/*/*/work`
everything seem to build fine. But when I tried to install Tomcat7 it once again said 
	
	



```
dont know how to make install
```
 I still don't get it, sometimes enough is to make clean once, sometimes twice, sometimes `# make clean` -->leave the directory --> rejoin and then `# make install` Could someone of you explain why is this happening?


----------



## wblock@ (Jul 2, 2012)

SirDice said:
			
		

> Symlinks shouldn't be needed (they are never needed actually) as everything will be build with the correct dependencies on a clean system.



But it's even better than that.  Old symlinks will cause problems in the future, and should be removed.  But how do you keep track?  The -w option to portmaster(8) at least puts the old libraries in a different directory which can be cleared.  Even so, they should not be needed because everything that depends on them should be rebuilt to use the current version.


----------



## eeluve (Jul 3, 2012)

Thank you for these useful tips, but this doesn't actually answear my question.


----------



## SirDice (Jul 3, 2012)

Post #2 answered it.


----------



## robbak (Jul 3, 2012)

Running '*make clean*' in a /usr/ports/category/package/ directory will delete the work/ directory, so running it a second time will do nothing. *cd*'ing out and in will also do nothing.

So, if you are doing that, it's voodoo and superstition. Just stop and look elsewhere.

If you get "don't know how to make install" you are not in a port directory, or it is an old directory that has been emptied during an update (which shouldn't happen(R)). Could happen if you had a user-generated file in there.

Are you trying to install from /usr/ports/www/tomcat7? If so, what files are in that directory?


----------



## eeluve (Jul 3, 2012)

I have successfully installed it long ago. Tomcat was only an example. And the "voodoo" is exactly the reason I keep this thread. I swear once again, different of these solutions help. In the end I always get the port installed, pkg_version then shows it's up to date(for the curiosity reason I also check over Internet the official FreeBSD ftp, assuming something still wrong with my ports tree). I don't use obsolete packages anymore, since have deleted all the work directories.


----------



## robbak (Jul 3, 2012)

In that case, it is sounding like dodgy hardware to me. If you are doing the same thing and getting different results, then think hardware.

Edit: Unless, perhaps - Are you doing something strange with the filesystem that your ports tree is on - memory disks or similar? NFS? Or are you using WRKDIRPREFIX? If a partition is remounted it can cause glitches that are fixed by *cd*'ing out and in. Or if the directly is *rm*'d and recreated, you'd need to *cd* out and in.
Can't think of anything that the ports structure might do, but, well, nothing is impossible.


----------



## eeluve (Jul 4, 2012)

Ok, thank you all. I got it!

```
portmaster -wRaf
cd /usr/src
yes | make delete-old
yes | make delete-old-libs
```
And now everything is OK.


----------

