Bug 251939 - math/eigen3: does it really need a GL dependency?
Summary: math/eigen3: does it really need a GL dependency?
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-kde (Team)
URL: https://svnweb.freebsd.org/ports/head...
Depends on:
Reported: 2020-12-18 12:53 UTC by Igor Pavlov
Modified: 2021-02-20 21:16 UTC (History)
5 users (show)

See Also:
bugzilla: maintainer-feedback? (kde)


Note You need to log in before you can comment on or make changes to this bug.
Description Igor Pavlov 2020-12-18 12:53:12 UTC
In the ports r557839 commit the explicit GL dependency has been introduced to the math/eigen3.
Is it really required there?
It's now impossible to build math/eigen3 port on a headless host without X11.
Comment 1 Thierry Thomas freebsd_committer 2020-12-18 18:25:54 UTC

GL is part of the option FULL. It is set by default, but can be deactivated: just run `make config' in the port directory.
Comment 2 Igor Pavlov 2020-12-18 19:21:30 UTC
Yep, it works, but it's rather unobvious what the FULL option means and why a lightweight math library consumes mesa-libs.
Comment 3 Igor Pavlov 2020-12-18 19:27:15 UTC
Shouldn't the FULL option be implemented as another package with dependencies on eigen3, mesa-libs and so on?
Comment 4 Alex S 2020-12-19 04:17:02 UTC
(In reply to Thierry Thomas from comment #1)

There is no reason for a bunch of _header_ files to depend on libGL.so (a shared library). That port's Makefile should either depend on the relevant _header_ files or this "feature" should be dropped altogether.
Comment 5 Alex S 2020-12-19 04:33:43 UTC
(In reply to Alex S from comment #4)

Oh, wait. Those are dependencies for the unit tests, which the port doesn't _not_ build. What's the point of this exactly?
Comment 6 Thierry Thomas freebsd_committer 2020-12-19 11:36:05 UTC
(In reply to Igor Pavlov from comment #3)
Yes, it is possible to have a slave port if needed, either eigen3-lite or eigen3-full.
Comment 7 Alex S 2020-12-29 16:46:06 UTC
(In reply to Alex S from comment #5)

> Those are dependencies for the unit tests, which the port doesn't _not_ build.

Comment 8 Adriaan de Groot freebsd_committer 2021-01-01 22:27:12 UTC
Looking at the code (cloned from gitlab), OpenGL is used in two places:

- unsupported/test
- demos/opengl

The first one is "unsupported" which just means it is not part of the core-community release of Eigen; it's a user contribution. The package isn't even used unless specifically the option EIGEN_TEST_OPENGL is **also** set (defaults OFF). When it is used, um .. as far as I can tell there is one extra test that is built. There is no other change.

The second one is a Qt4-based demo; there is no Qt4.

Neither of these are reasons to make math/eigen3 depend on OpenGL; one could argue that you want to test everything, but the current setup is not doing that.
If finding OpenGL in a dirty build environment is somehow a problem, that should be used as a reason to **possibly** make it a dependency, but a more likely thing to do is to suppress finding it: CMAKE_DISABLE_FIND_PACKAGE is the right thing to do there.

**Consumers** of math/eigen3 that can use OpenGL should enable OpenGL in their own ports.
Comment 9 commit-hook freebsd_committer 2021-02-20 20:38:51 UTC
A commit references this bug:

Author: adridg
Date: Sat Feb 20 20:38:25 UTC 2021
New revision: 566187
URL: https://svnweb.freebsd.org/changeset/ports/566187

  Update math/eigen3 to latest upstream release

  Release notes are at
  One of our patches was for issue 2011, which is resolved upstream,
  so that can go. The other patch is not needed anymore either.

  While here, drop the gl (USE=gl) dependency. This turned out to be
  needed for tests that aren't built anyway. I mini-exp-ran this by
  test-compiling all the things that showed fallout in the previous
  Eigen update.

  Referenced PR is about gl, not about updating Eigen.

  PR:		251939