Problem building cmake-core on newly upgraded system

Jason E. Hale jhale at freebsd.org
Sat Jul 20 05:11:56 BST 2024


On Thu, Jul 18, 2024 at 7:52 AM Olivier <Olivier.Nicole at cs.ait.ac.th> wrote:
>
> Hi,
>
> I recently upgraded an old system from 13.2 to 13.3 and now 14.1.
>
> When I tried to rebuild cmake-core, it failed with an error about libuv
> being 1.16 when 1.38 is expected.
>
> I did make sure that libuv is the most recent 1.48
>
> uname -a
> FreeBSD fbsd35.cs.ait.ac.th 14.1-RELEASE-p2 FreeBSD 14.1-RELEASE-p2 releng/14.1-n267685-dcdea9e8623e GENERIC amd64
>
> pkg info | grep libuv
> libuv-1.48.0                   Multi-platform support library with a focus on asynchronous I/O
>
> The error is:
> -- Could NOT find LibUV: Found unsuitable version "1.16.1", but required is at least "1.28.0" (found /usr/local/lib/libuv.so)
> CMake Error at Source/Modules/CMakeBuildUtilities.cmake:334 (message):
>   CMAKE_USE_SYSTEM_LIBUV is ON but a libuv is not found!
> Call Stack (most recent call first):
>   CMakeLists.txt:442 (include)
>
> It was triggered by
> work/cmake-3.29.6/Source/Modules/CMakeBuildUtilities.cmake line 331
>     find_package(LibUV 1.28.0)
>
> Best regards,
>
> Olivier
>

You asked this same question on this list a little over a month ago,
but since you never responded to my solution, I'll repeat it here with
some more context:

This looks like bug 272895 [1].

You probably still have some leftover bits from an old libuv
installation on your system. If you have any
${LOCALBASE}/include/uv-\*.h files, please remove them manually. The
headers are now supposed to be in the ${LOCALBASE}/include/uv
directory. There should still be a ${LOCALBASE}/include/uv.h, however.

Having these leftover includes is problem because FindLibUV.cmake
first checks for ${LibUV_INCLUDE_DIR}/uv-version.h and then for
${LibUV_INCLUDE_DIR}/uv/version.h to determine the version of libuv,
where ${LibUV_INCLUDE_DIR} is normally ${LOCALBASE}/include. The
former is the older format and it would probably make more sense to
first check for the newer format. I'll probably patch FindLibUV.cmake
to do just that with CMake 3.30.1, since this seems to be a recurring
problem with some users who don't build in a clean environment, but
those old files really shouldn't be there.

[1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272895

- Jason


More information about the kde-freebsd mailing list