Bug 1444563

Summary: FindGLUT.cmake claims it needs libXi-devel, freeglut-devel does not
Product: [Fedora] Fedora Reporter: Ed Beroset <beroset>
Component: cmakeAssignee: Orion Poplawski <orion>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 25CC: besser82, extras-qa, helio, jreznik, logans, ltinkl, mnewsome, orion, rdieter, tsmetana
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: https://gitlab.kitware.com/cmake/cmake/issues/14060
Whiteboard:
Fixed In Version: cmake-3.8.0-3.fc26 cmake-3.8.0-3.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1207045 Environment:
Last Closed: 2017-05-12 14:11:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
minimal test case
none
patch to include libXi and libXmu only if found none

Description Ed Beroset 2017-04-22 21:04:44 UTC
+++ This bug was initially created as a clone of Bug #1207045 +++

Description of problem:
FindGLUT.cmake (provided by the cmake package) looks for libXi, and adds it to GLUT_LIBRARIES. The freeglut-devel package does not depend on libXi, and it does not appear to be needed to link against libglut.so.

Version-Release number of selected component (if applicable):
cmake-2.8.12.2-2.fc20

How reproducible: 100%

Steps to Reproduce:
1. Install cmake and freeglut-devel
2. Ensure libXi-devel is not installed
3. cmake the attached CMakeLists.txt

Actual results:
GLUT_LIBRARIES: /usr/lib64/libglut.so;/usr/lib64/libXmu.so;GLUT_Xi_LIBRARY-NOTFOUND

Expected results:
Either libXi is excluded, or, cmake or freeglut-devel claim a "Requires:" on it.

Additional info:
It doesn't seem right to expect a package which needs libglut.so to claim a "BuildRequires:" on libXi-devel as well. I won't say for sure that cmake needs to change, but something should...

--- Additional comment from Orion Poplawski on 2015-03-30 11:35:51 EDT ---

Added link to upstream report.

--- Additional comment from Fedora End Of Life on 2015-05-29 09:46:31 EDT ---

This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

--- Additional comment from Fedora End Of Life on 2015-06-29 21:21:27 EDT ---

Fedora 20 changed to end-of-life (EOL) status on 2015-06-23. Fedora 20 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 1 Ed Beroset 2017-04-23 12:28:43 UTC
Created attachment 1273458 [details]
minimal test case

Comment 2 Ed Beroset 2017-04-23 12:30:23 UTC
Created attachment 1273459 [details]
patch to include libXi and libXmu only if found

Comment 3 Ed Beroset 2017-04-23 12:36:47 UTC
The test case may be run by running "cmake ." in the same directory.  On my Fedora 25 machine, the output includes:

-- GLUT_LIBRARIES:  /usr/lib64/libglut.so;GLUT_Xmu_LIBRARY-NOTFOUND;/usr/lib64/libXi.so

That's faulty because the Xmu and Xi libraries are actually optional, so if either is not found, they should be omitted from the GLUT_LIBRARIES list.  Any program actually needing features from either library can still explicitly require them.

The patched version of LibGLUT.cmake omits libXi or libXmu if not found.  With the patch applied, the output on my machine is:

-- GLUT_LIBRARIES:  /usr/lib64/libglut.so;/usr/lib64/libXi.so

Comment 4 Orion Poplawski 2017-04-26 02:52:07 UTC
Please work with upstream on this.  I've updated the upstream report url.

Comment 5 Fedora Update System 2017-05-05 22:35:31 UTC
cmake-3.8.0-3.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-bc3e5b4fdd

Comment 6 Fedora Update System 2017-05-05 22:35:42 UTC
cmake-3.8.0-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-106f864275

Comment 7 Fedora Update System 2017-05-07 03:30:17 UTC
cmake-3.8.0-3.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-bc3e5b4fdd

Comment 8 Fedora Update System 2017-05-07 05:08:00 UTC
cmake-3.8.0-3.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-106f864275

Comment 9 Fedora Update System 2017-05-12 14:11:49 UTC
cmake-3.8.0-3.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2017-05-16 21:56:52 UTC
cmake-3.8.0-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2017-05-17 06:02:18 UTC
cmake-3.8.0-3.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.