Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD 11, libuv found but ignored; is too old #1219

Closed
ghost opened this issue Mar 2, 2017 · 9 comments
Closed

FreeBSD 11, libuv found but ignored; is too old #1219

ghost opened this issue Mar 2, 2017 · 9 comments

Comments

@ghost
Copy link

ghost commented Mar 2, 2017

FreeBSD 11.0 comes with libuv version 1.10.1 . When we build h2o the build mentions "libuv found but ignored; is too old". I am assuming either the library file name or another check is triggering the version number failure?

-- Found Threads: TRUE
-- Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so (found version "1.0.2k")
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.8")
-- Found LIBUV: /usr/local/lib/libuv.so
-- libuv found but ignored; is too old
-- Could NOT find WSLAY (missing:  WSLAY_LIBRARIES WSLAY_INCLUDE_DIR)
-- Configuring done

Both the pkgconfig and package manager confirm lubuv 1.10.1 is installed.

# cat /usr/local/libdata/pkgconfig/libuv.pc
Name: libuv
Version: 1.10.1
Description: multi-platform support library with a focus on asynchronous I/O.
#  pkg search libuv
libuv-1.10.1  Multi-platform support library with a focus on asynchronous I/O
#  readelf -d /usr/local/lib/libuv.so | grep SONAME
 0x000000000000000e SONAME   Library soname: [libuv.so.1]
# find / -name libuv*
/usr/local/lib/libuv.so.1.0.0
/usr/local/lib/libuv.so.1
/usr/local/lib/libuv.so
/usr/local/lib/libuv.a
/usr/local/libdata/pkgconfig/libuv.pc
/usr/local/share/licenses/libuv-1.10.1

I am not sure if libuv is still used in h2o according to the post http://blog.kazuhooku.com/2014/09/the-reasons-why-i-stopped-using-libuv.html , but the build process does complain about the libuv version number so I wanted to report the issue.

@kazuho
Copy link
Member

kazuho commented Mar 3, 2017

Thank you for reporting the issue. Sounds like a CMake bug to me.

The relevant part of the build script is https://github.com/h2o/h2o/blob/v2.2.0-beta1/CMakeLists.txt#L115-L118 (see below), and it seems to me that VERSION_LESS is returning the wrong result.

    IF (LIBUV_FOUND AND LIBUV_VERSION VERSION_LESS "1.0.0")
        MESSAGE(STATUS "libuv found but ignored; is too old")
        UNSET(LIBUV_FOUND)
    ENDIF ()

@concatime
Copy link

concatime commented Aug 9, 2017

I also have this issue. I'm in Fedora 26, and I built libuv. Then I used this command: cmake -DCMAKE_INSTALL_PREFIX=/opt/h2o -DWITH_BUNDLED_SSL=on -DWITH_MRUBY=off -DLIBUV_LIBRARIES=../../libuv-1.13.1/out/Release -DLIBUV_INCLUDE_DIR=../../libuv-1.13.1/include ...
From LibUV:

git clone https://chromium.googlesource.com/external/gyp.git
cd gyp
python setup.py install
[…]
./gyp_uv.py -f ninja
ninja -C out/Release

I was able to fool CMake by adding -DLIBUV_VERSION=1.15.0.

-- Checking for module 'libuv>=1.0.0'
--   Package 'libuv', required by 'virtual:world', not found
-- Found LIBUV: /usr/local/lib/libuv.

@concatime
Copy link

See my updated comment above for a temporary fix.

@concatime
Copy link

Any news @Tintinabula?

@kazuho
Copy link
Member

kazuho commented Oct 12, 2017

Does updating CMake fix the issue?

Looking at https://cmake.org/cmake/help/v3.0/variable/CMAKE_VERSION.html it seems to me that VERSION_LESS has been intended to handle multi-digit components as early as version 3.0.2.

@jbergstroem
Copy link

Can't reproduce on my system:

$ uname -r
11.1-RELEASE-p1
$ git rev-parse HEAD
b808e2809377cf8ca34a491f3f9280c7a1815ce3
$ pkg info libuv | grep Version
Version        : 1.15.0
$ pkg info cmake | grep Version
Version        : 3.9.3
$ cmake . | grep libuv
-- Checking for module 'libuv>=1.0.0'
--   Found libuv, version 1.15.0

@concatime
Copy link

Yeah I know, this issue just get solved, at least on my side. I was just asking if Tintinabula had always this issue and If my trick worked for him.

@concatime
Copy link

I asked him, to also see If we can safely close this issue.

@ghost
Copy link
Author

ghost commented Oct 13, 2017

Yes, I believe we can safely close this ticket.

@ghost ghost closed this as completed Oct 13, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants