MultiArchCross.cmake breaks ubuntuBSD

Bug #1589223 reported by Jon Boden on 2016-06-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cmake (Ubuntu)
Medium
Unassigned

Bug Description

debian/MultiArchCross.cmake attempts to set CMAKE_SYSTEM_NAME if it wasn't already:

  if(NOT DEFINED CMAKE_SYSTEM_NAME)
    if(CMAKE_DEB_HOST_ARCH_OS STREQUAL "linux-gnu")
      SET(CMAKE_SYSTEM_NAME Linux)
    endif()

    if(CMAKE_DEB_HOST_ARCH_OS STREQUAL "kfreebsd")
      SET(CMAKE_SYSTEM_NAME GNU/kFreeBSD)
    endif()
  endif()

However on Linux CMAKE_SYSTEM_NAME is not actually set because DEB_HOST_ARCH_OS equals linux (not linux-gnu), and the STREQUAL comparison fails. So no problem there :-)

On ubuntuBSD the comparison succeeds and this breaks things because setting CMAKE_SYSTEM_NAME forces cmake into cross-compiling mode (see how CMAKE_CROSSCOMPILING is enabled in CMakeDetermineSystem.cmake). The resulting package fails to build other packages that need native compilation (like mysql-5.7).

So could you just remove the whole thing? You can use patch below:

https://bazaar.launchpad.net/~ubuntubsd/ubuntubsd/patches-xenial/download/jon%40ubuntubsd.org-20160605103927-6bgexfj2rria1b4v/cmake.diff-20160426081048-uj0038tten98r2t3-6/cmake.diff

patch attached.
thanks!

Changed in cmake (Ubuntu):
importance: Undecided → Medium
Changed in cmake (Ubuntu):
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cmake - 3.5.2-2ubuntu1

---------------
cmake (3.5.2-2ubuntu1) yakkety; urgency=low

  * Merge from Debian unstable (LP: #1597272). Remaining changes:
    - debian/cmake-data.install
      debian/MultiArchCross.cmake
      debian/patches/ubuntu_cmake-crosscompile.patch:
      help cmake to find libraries in multiarch path
      xnox says this is not yet ready to go upstream but he will work on it
    - debian/patches/ubuntu_boost-multiarch.patch
      find boost and python in multiarch path
      this is a candidate for removal but needs rdepend testing
    [ Jon Boden ]
    * tweak and simplify debian/MultiArchCross.cmake, to avoid breaking
      ubuntuBSD builds (LP: #1589223)

cmake (3.5.2-2) unstable; urgency=medium

  * Make FindLibArchive compatible with libarchive 3.2. (Closes: #828092)
    - Add FindLibArchive_Support_libarchive_3.2.patch
  * Backport patch to make file(GLOB) order deterministic. (Closes: #824263)
    - Add file_Sort_GLOB_results_to_make_it_deterministic.patch

 -- Gianfranco Costamagna <email address hidden> Wed, 29 Jun 2016 12:32:22 +0200

Changed in cmake (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Patches