graphics/mesa-libs and python

Hello,

on a recently installed FreeBSD 12.0-STABLE r342671 system I'm trying to build and install graphics/mesa-libs as a dependency of dns/unbound. However, I get the error:

Bash:
# make install clean
===>   unbound-1.8.3 depends on package: autoconf>=2.69 - found
===>   unbound-1.8.3 depends on package: automake>=1.16.1 - found
===>   unbound-1.8.3 depends on executable: libtoolize - found
===>   unbound-1.8.3 depends on package: pkgconf>=1.3.0_1 - found
===>   unbound-1.8.3 depends on shared library: libexpat.so - found (/usr/local/lib/libexpat.so)
===>   unbound-1.8.3 depends on shared library: libldns.so - found (/usr/local/lib/libldns.so)
===>   unbound-1.8.3 depends on shared library: libfstrm.so - found (/usr/local/lib/libfstrm.so)
===>   unbound-1.8.3 depends on shared library: libprotobuf-c.so - not found

[...]

===>   cairo-1.15.12,2 depends on file: /usr/local/libdata/pkgconfig/xcb-renderutil.pc - found
===>   cairo-1.15.12,2 depends on package: pkgconf>=1.3.0_1 - found
===>   cairo-1.15.12,2 depends on package: xorgproto>=0 - found
===>   cairo-1.15.12,2 depends on package: xorgproto>=0 - found
===>   cairo-1.15.12,2 depends on file: /usr/local/libdata/pkgconfig/pixman-1.pc - found
===>   cairo-1.15.12,2 depends on file: /usr/local/libdata/pkgconfig/x11.pc - found
===>   cairo-1.15.12,2 depends on file: /usr/local/libdata/pkgconfig/xext.pc - found
===>   cairo-1.15.12,2 depends on file: /usr/local/libdata/pkgconfig/xrender.pc - found
===>   cairo-1.15.12,2 depends on file: /usr/local/libdata/pkgconfig/xcb.pc - found
===>   cairo-1.15.12,2 depends on shared library: libfreetype.so - found (/usr/local/lib/libfreetype.so)
===>   cairo-1.15.12,2 depends on shared library: libpng.so - found (/usr/local/lib/libpng.so)
===>   cairo-1.15.12,2 depends on shared library: libfontconfig.so - found (/usr/local/lib/libfontconfig.so)
===>   cairo-1.15.12,2 depends on shared library: libglib-2.0.so - found (/usr/local/lib/libglib-2.0.so)
===>   cairo-1.15.12,2 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>   cairo-1.15.12,2 depends on shared library: libintl.so - found (/usr/local/lib/libintl.so)
===>   cairo-1.15.12,2 depends on shared library: libGL.so - not found
===>  mesa-libs-18.1.9_4 needs Python 2.7 at most, but 3.6 was specified.
*** Error code 1

Stop.
make[18]: stopped in /usr/ports/graphics/mesa-libs
*** Error code 1

lang/python27 is installed:

Bash:
# portversion -v | grep python
[Reading data from pkg(8) ... - 147 packages found - done]
python27-2.7.15             =  up-to-date with port

How can I make graphics/mesa-libs use the installed lang/python27 port?
 
Why would a 3D graphics library be a dependency of a DNS server?

I'm wondering about that myself. The only change I made in build options was
Code:
DNSTAP=on
.

Apparently you changed the DEFAULT_VERSION of Python in /etc/make.conf. If you tell it to use 3.6 by default, ports that require 2.7 are going to fail.

I have not:

Bash:
# cat /etc/make.conf
cat: /etc/make.conf: No such file or directory

Also:

Bash:
# cat /usr/ports/Mk/bsd.default-versions.mk | grep -i python
    LINUX LUA MYSQL PERL5 PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY SSL TCLTK
PYTHON_DEFAULT?=    2.7
PYTHON2_DEFAULT?=    2.7
PYTHON3_DEFAULT?=    3.6

Also, I was able to build other ports which depend on lang/python27 with no errors:

Bash:
# portversion -vr python27-2.7.15
[Reading data from pkg(8) ... - 147 packages found - done]
glib-2.56.3_2,1             =  up-to-date with port
ninja-1.8.2_1,2             =  up-to-date with port
py27-Babel-2.6.0            =  up-to-date with port
py27-Jinja2-2.10            =  up-to-date with port
py27-MarkupSafe-1.0         =  up-to-date with port
py27-alabaster-0.7.6        =  up-to-date with port
[...]
py27-setuptools-40.6.2      =  up-to-date with port
py27-setuptools_scm-1.17.0  =  up-to-date with port
py27-six-1.12.0             =  up-to-date with port
py27-snowballstemmer-1.2.0_1  =  up-to-date with port
py27-sphinx-1.6.5_1,1       =  up-to-date with port
py27-sphinx_rtd_theme-0.4.2  =  up-to-date with port
py27-sphinxcontrib-websupport-1.0.1  =  up-to-date with port
py27-typing-3.6.4           =  up-to-date with port
py27-urllib3-1.22,1         =  up-to-date with port
python27-2.7.15             =  up-to-date with port
scons-3.0.1                 =  up-to-date with port
xcb-proto-1.13              =  up-to-date with port

Should DEFAULT_VERSION] of Python in /etc/make.conf set explicitly even if it's already set in /usr/ports/Mk/bsd.default-versions.mk?
 
Should DEFAULT_VERSION] of Python in /etc/make.conf set explicitly even if it's already set in /usr/ports/Mk/bsd.default-versions.mk?
No, definitely not. You use DEFAULT_VERSIONS to overrule whatever is set in bsd.default-versions.mk.
 
Oh, I think I understand why it's pulling in Mesa. The DNSTAP option pulls in devel/protobuf-c. This port has DOXYGEN enabled by default and this is what's pulling in a plethora of X and QT libraries. If you turn that option off the build dependencies should be significantly reduced.
 
Not a solution, but a kludge. Install devel/meson before trying to build mesa-libs.
I had installed llvm80 first but after checking the mesa3d.org site it seems meson is needed,
 
Back
Top