Bug 1469093 - CMake config broken due to scoped targets
Summary: CMake config broken due to scoped targets
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: root
Version: epel7
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mattias Ellert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-10 11:44 UTC by Nima Saed-Samii
Modified: 2017-07-30 19:50 UTC (History)
1 user (show)

Fixed In Version: root-6.10.02-3.fc26 root-6.10.02-3.fc24 root-6.10.02-3.fc25 root-6.10.02-3.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-26 18:21:30 UTC
Type: Bug


Attachments (Terms of Use)

Description Nima Saed-Samii 2017-07-10 11:44:55 UTC
Description of problem:
Since 6.10.00 targets in the CMake config are scoped. This breaks
the sed scripts in the .spec file:

sed -e 's/ mathtext / /' -e /mathtext/d \
    -e 's/ minicern / /' -e /minicern/d \
    -e 's/ JupyROOT / /' -e /JupyROOT/d \
    -i %{buildroot}%{_datadir}/%{name}/cmake/ROOTConfig-targets.cmake
sed -e '/Import target "mathtext"/,/FILES_FOR_mathtext/d' -e 's/;mathtext//' \
    -e '/Import target "minicern"/,/FILES_FOR_minicern/d' -e 's/;minicern//' \
    -e '/Import target "JupyROOT"/,/FILES_FOR_JupyROOT/d' -e 's/;JupyROOT//' \
    -i %{buildroot}%{_datadir}/%{name}/cmake/ROOTConfig-targets-*.cmake

This approach is also broken, due to lines like

# Import target "ROOT::minicern" for configuration "RelWithDebInfo"
set_property(TARGET ROOT::minicern APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
set_target_properties(ROOT::minicern PROPERTIES
  IMPORTED_LINK_INTERFACE_LANGUAGES_RELWITHDEBINFO "C;Fortran"
  IMPORTED_LINK_INTERFACE_LIBRARIES_RELWITHDEBINFO "gfortran;m;quadmath;m;c"
  IMPORTED_LOCATION_RELWITHDEBINFO "/tmp/root-6.10.00-build/lib/libminicern.a"
  )

which leaves artifacts behind. What actual reason is there to remove mathtext,
minicern and JupyROOT in the first place?

Version-Release number of selected component (if applicable):
6.10.00-1

Comment 1 Fedora Update System 2017-07-11 11:21:05 UTC
root-6.10.02-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-901b82337e

Comment 2 Fedora Update System 2017-07-12 05:22:48 UTC
root-6.10.02-2.fc24 has been pushed to the Fedora 24 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-6719bfe6ce

Comment 3 Fedora Update System 2017-07-12 05:28:03 UTC
root-6.10.02-2.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-0bad35fdb1

Comment 4 Fedora Update System 2017-07-12 08:36:21 UTC
root-6.10.02-2.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-901b82337e

Comment 5 Fedora Update System 2017-07-12 09:24:09 UTC
root-6.10.02-2.el7 has been pushed to the Fedora EPEL 7 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-EPEL-2017-fb75475522

Comment 6 Nima Saed-Samii 2017-07-12 10:47:40 UTC
This is not fixed in 6.10.02-2

Minimal CMakeLists.txt:
FIND_PACKAGE(ROOT REQUIRED)

Expected Output:
-- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/test


Actual output:

-- The C compiler identification is GNU 6.3.1
-- The CXX compiler identification is GNU 6.3.1
-- Check for working C compiler: /usr/lib64/ccache/cc
-- Check for working C compiler: /usr/lib64/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/lib64/ccache/c++
-- Check for working CXX compiler: /usr/lib64/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/root/cmake/ROOTConfig-targets.cmake:508 (message):
  The imported target "ROOT::coreconttestUnit" references the file

     "/usr/bin/coreconttestUnit"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/usr/share/root/cmake/ROOTConfig-targets.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/share/root/cmake/ROOTConfig.cmake:81 (include)
  CMakeLists.txt:1 (FIND_PACKAGE)


CMake Warning (dev) in /usr/share/root/cmake/ROOTConfig-targets.cmake:
  Policy CMP0011 is not set: Included scripts do automatic cmake_policy PUSH
  and POP.  Run "cmake --help-policy CMP0011" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  The included script

    /usr/share/root/cmake/ROOTConfig-targets.cmake

  affects policy settings.  CMake is implying the NO_POLICY_SCOPE option for
  compatibility, so the effects are applied to the including context.
Call Stack (most recent call first):
  /usr/share/root/cmake/ROOTConfig.cmake:81 (include)
  CMakeLists.txt:1 (FIND_PACKAGE)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!
See also "/tmp/test/CMakeFiles/CMakeOutput.log".

Comment 7 Fedora Update System 2017-07-14 02:53:26 UTC
root-6.10.02-3.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-901b82337e

Comment 8 Fedora Update System 2017-07-14 18:50:40 UTC
root-6.10.02-3.el7 has been pushed to the Fedora EPEL 7 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-EPEL-2017-fb75475522

Comment 9 Fedora Update System 2017-07-14 19:52:38 UTC
root-6.10.02-3.fc24 has been pushed to the Fedora 24 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-6719bfe6ce

Comment 10 Fedora Update System 2017-07-14 20:26:21 UTC
root-6.10.02-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-0bad35fdb1

Comment 11 Fedora Update System 2017-07-14 22:54:39 UTC
root-6.10.02-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-901b82337e

Comment 12 Fedora Update System 2017-07-26 18:21:30 UTC
root-6.10.02-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 13 Fedora Update System 2017-07-26 21:18:34 UTC
root-6.10.02-3.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2017-07-26 22:52:07 UTC
root-6.10.02-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 15 Fedora Update System 2017-07-30 19:50:45 UTC
root-6.10.02-3.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.