Bug 221406

Summary: Mk/Scripts/qa.sh: proxydeps needs to treat lib/libGL-NVIDIA.so and 2 friends as part of GL
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed FIXED    
Severity: Affects Only Me CC: danfe, ports-bugs, rezny
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch matching 3 nvidia shared libraries none

Description Yuri Victorovich freebsd_committer freebsd_triage 2017-08-11 04:31:01 UTC
In the function proxydeps_suggest_uses, this line:

>        elif expr ${lib_file} : "${LOCALBASE}/lib/libGL.so.*$" > /dev/null; then
>                warn "you need USE_GL+=gl"
should be amended with
>        elif expr ${lib_file} : "${LOCALBASE}/lib/libGL-NVIDIA.so.*$" > /dev/null; then
>                warn "you need USE_GL+=gl"

On systems where OpenGL is implemented via the NVidia driver, stage-qa fails to print this warning:
> Warning: you need USE_GL+=gl
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2017-08-11 05:31:56 UTC
Scratch the previous message.

Here is the patch: https://reviews.freebsd.org/D11977
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2017-08-18 10:30:01 UTC
Add rezny@ here, he's the one who worked on libgl things of late. And danfe@, he maintains the nvidia thing.

As the nvidia thing only works by tricking the linker to use its shared libraries with a libmap configuration file, I fail to see how this could possibly be needed in a clean slate build test environment like poudriere.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2017-08-18 18:15:36 UTC
(In reply to Mathieu Arnold from comment #2)


> As the nvidia thing only works by tricking the linker to use its shared libraries with a libmap configuration file, I fail to see how this could possibly be needed in a clean slate build test environment like poudriere.

True that in poudriere this isn't needed. But it is very much needed for people who have nvidia-driver installed while working on ports.

The only thing this does is switches one library to another. It will not practically affect any port in poudriere at all, as nothing depends on nvidia-driver.
Comment 4 Matthew Rezny freebsd_committer freebsd_triage 2017-08-20 11:19:58 UTC
Mat is correct that this is not needed for poudriere. Yuri is correct that this is useful for people who are working on ports on a system with nvidia-driver present. While this addition may only benefit a minority, I see no harm in it and it should be a net positive for ports quality. However, to be complete it should also handle libEGL-NVIDIA.so and libGLESv2-NVIDIA.so in a similar fashion.
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2017-08-20 23:09:40 UTC
Created attachment 185618 [details]
patch matching 3 nvidia shared libraries

(In reply to Matthew Rezny from comment #4)

Thanks Matthew!

I updated the patch.

It looks like expr(1) doesn't support regular expressions with alternation, so I wrote them in separate lines.

Yuri
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-12-15 15:57:00 UTC
A commit references this bug:

Author: mat
Date: Fri Dec 15 15:56:09 UTC 2017
New revision: 456405
URL: https://svnweb.freebsd.org/changeset/ports/456405

Log:
  Fix qa lib dependency checks when using libmap.conf.

  This happens, for instance, if x11/nvidia-driver is installed.

  PR:		221406
  Submitted by:	tobik
  Approved by:	bapt
  Sponsored by:	Absolight
  Differential Revision:	https://reviews.freebsd.org/D11977

Changes:
  head/Mk/Scripts/qa.sh