FLAVORS and make install

I tried to run
cd /usr/ports/net-mgmt/unifi6 && make install
and hit
==> py37-yaml-5.3.1_1 FLAVOR is defined (to py37) while this port does not have FLAVORS.
but when I try to set a flavor I get
sudo make FLAVOR=py37 install
===> unifi6-6.0.45 FLAVOR is defined (to py37) while this port does not have FLAVORS.

How in the world did the ports system wind up in a state where a basic "make install" doesn't work out of the box? What do I need to do to get ports to install now??

I've been using FreeBSD for almost 20 years (I for a while even used CTM to pull source and ports) and this is the first time I've been outright upset and not just frustrated or confused for a bit.
 
jonathans make install works out of the box when you use it right. Did you run the required other makes beforehand? Like make config etc?
make install automatically calls any prerequisite make commands, including make config if there is anything to configure.

In this case, I suspect there is something in /etc/make.conf that causes the failure, or maybe something in the environment that is picked up by the ports framework.
 
and hit
==> py37-yaml-5.3.1_1 FLAVOR is defined (to py37) while this port does not have FLAVORS.
Everything with USES= python has flavors, they are defined by Mk/Uses/python.mk. So, something seems broken in your ports tree. Try to update it.
 
Hello,

what is in your /etc/make.conf ?
There was a
Code:
DEFAULT_VERSIONS=python=3.4 python3=3.4
in my make.config. After commenting that out things seem to be working now. Somehow I either missed any comments about cleaning make.config in all my searching last night or it is very sparsely mentioned and I couldn't find any.
 
In my experience, my own mistakes are not documented anywhere. ;)

But seriously … When building something breaks in mysterious ways, the first thing to do is to check /etc/make.conf for outdated entries. Especially when updating the OS, it is a good idea to have a look at that file.
 
Although the mistake is pretty obvious here (you should double-check your DEFAULT_VERSIONS from time to time) – it's remarkable that the error message given is pretty misleading…
 
Yeah, it's somewhat confusing, what it was trying to say is that it failed to build the given default flavor because it doesn't exist any more. The OP's make.conf was pointing to lang/python34, which got removed almost two years ago. I'm a little surprised he's running into this issue now.
 
Yeah, it's somewhat confusing, what it was trying to say is that it failed to build the given default flavor because it doesn't exist any more. The OP's make.conf was pointing to lang/python34, which got removed almost two years ago. I'm a little surprised he's running into this issue now.
Most of my ports are installed from the pre-built packages and this was the first one that I was building from source that actually ran into flavor issues. I have a few ports that use custom options but until now those hadn't been affected by the python make file variable and flavors.
 
I have been using FreeBSD for decades, and the flavor change in ports seems a backwards move to me, I have tried to find documentation on it that is not tucked away in changelogs and not aimed at developers, and I am struggling to understand how its better than the old system.


This part of the handbook explains the Makefile but nothing about command line syntax for simple things like.

How to know which ports use flavors.
How to know which flavors a port has.
How to know how to manage flavors.
Any make.conf syntax for automatic management of flavors.
 
Yes, you're right.
I noticed this once - the documentation addresses the port maintainers and shows them how to use flavors. It does not address systems managers.
The main use-case for flavors seems to fine-grain prerequistes from other ports.
How to know which ports use flavors.
How to know which flavors a port has.
What you can do to display supported flavors:

Code:
$ cd /usr/ports/editors/emacs
$ make -V FLAVORS
full canna nox
$ cd /usr/ports/devel/git
$ make -V FLAVORS
default gui lite tiny

How to know how to manage flavors.
Any make.conf syntax for automatic management of flavors.
That one seems to work to build/install a specific flavor of a port:
Code:
cd /usr/ports/devel/git
FLAVOR=tiny make install

In make.conf then something like this might work:
Code:
.if ${.CURDIR:C/.*\/devel\/git//} == ""
FLAVOR=tiny
.endif

Also helpful:
Code:
$ cd /usr/ports/security/py-bcrypt
$ make -DDEPENDS_SHOW_FLAVOR FLAVOR=py36 all-depends-list
/usr/ports/devel/py-cffi@py36
/usr/ports/devel/py-setuptools@py36
/usr/ports/lang/python36
[...]

hth
 
Back
Top