Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 658898 - dev-util/cmake fails with >=dev-libs/libuv-1.21.0
Summary: dev-util/cmake fails with >=dev-libs/libuv-1.21.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL: https://gitlab.kitware.com/cmake/cmak...
Whiteboard:
Keywords: PATCH
: 658914 658922 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-06-24 00:05 UTC by tdr
Modified: 2018-08-24 05:44 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tdr 2018-06-24 00:05:46 UTC
having libuv-1.21.0 causes cmake to not find uv.h header

Reproducible: Always

Steps to Reproduce:
1. emerge -va1 =libuv-1.21.0
2. emerge -va1 cmake

Actual Results:  
-- Could NOT find LibUV: Found unsuitable version "", but required is at least "1.10.0" (found /usr/lib/libuv.so)

Expected Results:  
find the header as per normal

cmake fails to find uv.h with libuv-1.21.0.

uv.h header is for 1.21.0 is found at /usr/include while the other headers from it are at /usr/include/uv


downgrading to any version before libuv-1.21.0 allows cmake to configure


build error snippet:

-- Could NOT find LibUV: Found unsuitable version "", but required is at least "1.10.0" (found /usr/lib/libuv.so)
CMake Error at CMakeLists.txt:551 (message):
  CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!
Call Stack (most recent call first):
  CMakeLists.txt:682 (CMAKE_BUILD_UTILITIES)


box ~ # qlist -ICUv libuv
dev-libs/libuv-1.21.0 (abi_x86_64)
Comment 1 tdr 2018-06-24 00:18:10 UTC
# cat  /usr/lib64/pkgconfig/libuv.pc
prefix=/usr
exec_prefix=${prefix}
libdir=/usr/lib64
includedir=${prefix}/include

Name: libuv
Version: 1.21.0
Description: multi-platform support library with a focus on asynchronous I/O.
URL: http://libuv.org/

Libs: -L${libdir} -luv -lr


------------

/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake(56):  find_path(LibUV_INCLUDE_DIR NAMES uv.h )
   Called from: [3]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake
                [2]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
                [1]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake(59):  mark_as_advanced(LibUV_INCLUDE_DIR )
   Called from: [3]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake
                [2]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
                [1]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake(63):  set(_LibUV_H_REGEX #[ 	]*define[ 	]+UV_VERSION_(MAJOR|MINOR|PATCH)[ 	]+[0-9]+ )
   Called from: [3]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake
                [2]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
                [1]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake(64):  if(LibUV_INCLUDE_DIR AND EXISTS /usr/include/uv-version.h )
   Called from: [3]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake
                [2]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
                [1]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake(66):  elseif(LibUV_INCLUDE_DIR AND EXISTS /usr/include/uv.h )
   Called from: [3]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake
                [2]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
                [1]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake(67):  file(STRINGS /usr/include/uv.h _LibUV_H REGEX #[ 	]*define[ 	]+UV_VERSION_(MAJOR|MINOR|PATCH)[ 	]+[0-9]+ )
   Called from: [3]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake
                [2]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
                [1]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake(71):  foreach(c MAJOR MINOR PATCH )
   Called from: [3]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake
                [2]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
                [1]	/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/CMakeLists.txt
/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4/Source/Modules/FindLibUV.cmake(72):  if(_LibUV_H MATCHES #[ 	]*define[ 	]+UV_VERSION_MAJOR[ 	]+([0-9]+) )

------------


So it appears it doesn't like the libuv headers being split between /usr/include and /usr/include/uv :


box /usr/include/uv # qlist libuv
/usr/lib64/pkgconfig/libuv.pc
/usr/lib64/libuv.so.1
/usr/lib64/libuv.so
/usr/lib64/libuv.so.1.0.0
/usr/include/uv/errno.h
/usr/include/uv/threadpool.h
/usr/include/uv/version.h
/usr/include/uv/unix.h
/usr/include/uv/linux.h
/usr/include/uv.h
/usr/share/doc/libuv-1.21.0/AUTHORS.bz2
/usr/share/doc/libuv-1.21.0/ChangeLog.bz2
/usr/share/doc/libuv-1.21.0/README.md.bz2
Comment 2 tdr 2018-06-24 00:19:29 UTC
libuv header renamed from uv-version.h to version.h too
Comment 3 Thomas Deutschmann (RETIRED) gentoo-dev 2018-06-24 01:53:29 UTC
-- Using system-installed BZIP2
-- Using system-installed CURL
-- Using system-installed EXPAT
-- Using system-installed FORM
-- Using system-installed LIBARCHIVE
-- Using system-installed LIBLZMA
-- Using system-installed LIBRHASH
-- Using system-installed LIBUV
-- Using system-installed ZLIB
-- Found LibRHash: /usr/lib/librhash.so
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.11")
-- Found CURL: /usr/lib/libcurl.so (found version "7.60.0")
-- Found EXPAT: /usr/lib/libexpat.so (found version "2.2.5")
-- Found LibArchive: /usr/lib/libarchive.so (found suitable version "3.3.2", minimum required is "3.0.0")
-- Could NOT find LibUV: Found unsuitable version "", but required is at least "1.10.0" (found /usr/lib/libuv.so)
CMake Error at CMakeLists.txt:551 (message):
  CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!
Call Stack (most recent call first):
  CMakeLists.txt:682 (CMAKE_BUILD_UTILITIES)


-- Configuring incomplete, errors occurred!
See also "/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4_build/CMakeFiles/CMakeOutput.log".
See also "/var/tmp/portage/dev-util/cmake-3.11.4/work/cmake-3.11.4_build/CMakeFiles/CMakeError.log".
 * ERROR: dev-util/cmake-3.11.4::gentoo failed (configure phase):
 *   cmake failed
Comment 4 Andreas Sturmlechner gentoo-dev 2018-06-24 09:21:37 UTC
*** Bug 658914 has been marked as a duplicate of this bug. ***
Comment 5 Larry the Git Cow gentoo-dev 2018-06-24 09:34:43 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71da15f49a47695ddcb668170a7fbacae924e49b

commit 71da15f49a47695ddcb668170a7fbacae924e49b
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2018-06-24 09:33:04 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2018-06-24 09:34:30 +0000

    dev-util/cmake: Fix src_configure with >=libuv-1.21
    
    Thanks-to: Thomas Deutschmann <whissi@gentoo.org>
    Closes: https://bugs.gentoo.org/658898
    Package-Manager: Portage-2.3.40, Repoman-2.3.9

 dev-util/cmake/cmake-3.11.4.ebuild                 |  1 +
 dev-util/cmake/cmake-3.12.0_rc1.ebuild             |  1 +
 dev-util/cmake/files/cmake-3.11.4-libuv-1.21.patch | 28 ++++++++++++++++++++++
 3 files changed, 30 insertions(+)
Comment 6 Andreas Sturmlechner gentoo-dev 2018-06-24 09:53:59 UTC
*** Bug 658922 has been marked as a duplicate of this bug. ***
Comment 7 Sergey 'L29Ah' Alirzaev 2018-08-02 03:50:40 UTC
Still reproduces with dev-util/cmake-3.10.3
Comment 8 Michael Deakin 2018-08-24 05:44:09 UTC
cmake-3.9.6 (the current version merged without a package.keyword entry) also reproduces this issue.