# portmaster -af



## talsamon (Dec 12, 2014)

It's an unrealistic thing. You always have ports that exit the compilation. If you restart portmaster with the remaining programs it compiles programs again, which it compiled just before. It's a "Sisyphos-work". (Notice: the second time I start not with `portmaster -af`. I am starting with `portmaster "list-of-ports"`).

There are still ports clang can't compile (and other problems)
(the ports are: graphics/libcdr, print/libmspub*, textproc/libwps*, devel/boost-libs, graphics/libgltf, java/openjdk7, security/gnupg, graphics/goom - as far I know). I had in /etc/make.conf set to gcc48. Either portmaster makes nonsense or clang. This ports compiles in the port with gcc48 fine (or even with the change in /etc/make.conf, but not with portmaster (or clang).


----------



## wblock@ (Dec 12, 2014)

In general, this type of problem is self-inflicted.  Most of those ports are installed here and had no problems.  The first step is to not set a compiler in /etc/make.conf.  Ports that need a specific compiler will use it automatically.


----------



## talsamon (Dec 12, 2014)

Yes, the ports, but it seems portmaster not. I think, there was a time portmaster was a good tool. Now it seems it is too old and should be rewritten.


----------



## wblock@ (Dec 12, 2014)

portmaster(8) works here.


----------



## talsamon (Dec 13, 2014)

Man never explained anything. Man is a lexicon of parameters - not more.

A "new" error:



> configure: error: Could not find the flags to link with Boost unit_test_framework



Portmaster can't compile devel/boost and boost-related ports. This is nothing new, but this error message I have never seen. But works in the port with explicit 
	
	



```
CC=gcc48 CXX=g++48 CPP=cpp48
```
.


----------



## wblock@ (Dec 13, 2014)

Compiling is all from the ports system.  portmaster only tells it which ports to build.  The specifics come from the files in /usr/ports/mk/, the port's own Makefile, and /etc/make.conf.  If you have to set specific compilers, it means something else is broken.


----------



## talsamon (Dec 13, 2014)

I don't understand this. `Portmaster -af` recompiled boost-libs, all related ports, then exits with portmaster. Now I recompiled in the port and all related ports compiled fine. It's a portmaster problem. (I commented out gcc48 for this ports in /etc/make.conf).
Last time I compiled this port with portmaster the boost-libraries caused an endless loop and I can compile it only with gcc48. That's the reason I write it in the /etc/make.conf. Sometime this way, next another way?


----------



## wblock@ (Dec 13, 2014)

Except you may have built other ports with mixtures of compiler settings or odd library settings or any of numerous other inconsistencies, and that could be causing this breakage.  Messing with various build settings and being cavalier about fixing weird and mysterious errors just causes more of them.

If it were me, I'd clear out /etc/make.conf except for normal settings--no overriding cc, for example.  Then back up everything, and use portmaster(8) to rebuild all ports like this:

1. `portmaster --list-origins > ~/installed-port-list`
2. Update the ports tree
3. `portmaster -ty --clean-distfiles`
4. `portmaster -Faf`
5. `pkg delete -afy`
6. `rm -rf /usr/local/lib/compat/pkg`
7. Back up any files in /usr/local you wish to save, such as configuration files in /usr/local/etc
8. Manually check /usr/local and /var/db/pkg to make sure that they are really empty
9. Install ports-mgmt/pkg and then ports-mgmt/portmaster.  Remove both from ~/installed-port-list.
10. `portmaster --no-confirm `cat ~/installed-port-list``


----------



## talsamon (Dec 13, 2014)

Thanks for suggestions. (I will try it next if the errors appear - in the moment I don't want do again all). But these problems with boost are not the first time, I had it with 9.2, 9.3, 10.0 and now on 10.1 (if I remember right only on amd64). And try the changes in /etc/make.conf only in the last time.
(So I guess it's a problem between portmaster and clang).
`pkg delete -afy` seems senseless. If I do this, I am faster with a new install.

(By the way

```
ls /usr/local/lib/compat/pkg
ls: /usr/local/lib/compat/pkg: No such file or directory
```


----------



## wblock@ (Dec 13, 2014)

One more time: portmaster does not use any specific compiler.  It just tells the ports system to build a port.  The compiler is picked by the ports system, unless it has been overridden by the user in /etc/make.conf.

/usr/local/lib/compat/pkg is where portmaster saves outdated libraries so old programs can still run.


----------



## talsamon (Dec 13, 2014)

In the moment it seems to work. But I don't trust them (or that ?). I will see it at next update of the specific ports.


> /usr/local/lib/compat/pkg is where portmaster saves outdated libraries so old programs can still run.



It's the question, why it does not exist? Now I've created one. But don't know if that make sense.


----------



## wblock@ (Dec 13, 2014)

The directory is created if -w is used.  See portmaster(8).


----------

