Opened 3 months ago

Closed 8 weeks ago

#69449 closed enhancement (fixed)

cmake, cmake-devel: Remove libuv dependency

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mascguy (Christopher Nielsen), kencu (Ken), Dave-Allured (Dave Allured)
Port: cmake, cmake-devel

Description

Can the libuv dependency be removed from cmake and cmake-devel?

The developers of libuv do not support version of macOS that are no longer supported by Apple, and they actively remove support for older OS versions and do not accept patches to fix problems affecting older OS versions. See #69248. This makes libuv unsuitable for use by software like cmake that we want to have working on older OS versions.

Change History (10)

comment:1 Changed 3 months ago by kencu (Ken)

cmake requires libuv, but they do include a bundled version that is slightly older than the current libuv release, so more compatible to older systems.

comment:2 Changed 3 months ago by ryandesign (Ryan Carsten Schmidt)

I trust a bundled copy of libuv even less. If it's older, then it may have bugs or security issues. And the developers of cmake are likely to update the bundled library to a newer version eventually at which point the new OS version requirements of that new libuv version would take effect, likely without whoever updates the cmake port to that version noticing.

I don't know if this is still accurate but a mailing list thread from 2016 says libuv is only used for server mode which can be disabled with -DCMake_ENABLE_SERVER_MODE=OFF or -DCMAKE_USE_LIBUV=OFF.

comment:3 Changed 3 months ago by kencu (Ken)

They moved to use it everywhere soon after, and turning it off no longer exists as an option

https://github.com/Kitware/CMake/commit/88c9878af9d6d4b8cd3c7358bfdd12206c8aadb4

So -- no, there is no way to build cmake without libuv.

comment:4 in reply to:  2 Changed 2 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign:

I trust a bundled copy of libuv even less.

After having a conversation with the CMake developer about this, I've changed my mind. They appear to be completely aware that newer libuv versions do not guarantee support with older OS versions and are for that reason maintaining a fork of an older version of libuv in which they routinely backport fixes from the current version. As such, the cmake and cmake-devel ports should absolutely switch to using the bundled libuv as soon as possible to guard against updates of the libuv port breaking cmake on older systems (since—don't forget—all recent clang ports require cmake; breaking cmake breaks clang which breaks everything).

comment:5 Changed 2 months ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed

In 42e31dbc70a29d53551d460a4c59146139f8f770/macports-ports (master):

cmake-devel: use bundled libuv

this is more controllable for a core port like cmake.

it will require some patching at times to support older
systems

closes: #69449

comment:6 Changed 8 weeks ago by ryandesign (Ryan Carsten Schmidt)

Cc: kencu added
Resolution: fixed
Status: closedreopened

The revision needs to be increased.

Let's leave this open until the cmake port is fixed as well.

comment:7 Changed 8 weeks ago by kencu (Ken)

date-version of cmake-devel was increased in a subsequent related commit

https://github.com/macports/macports-ports/commit/dd96b2abf7bbb862f4bebc02722111bf993c85b1

cmake update PR here building away on the CI system.

https://github.com/macports/macports-ports/pull/23228

comment:8 Changed 8 weeks ago by kencu (Ken)

dozens of cmake and cmake devel tickets will all be closed and reclosed once that PR lands. I'll do them all separately as there are frankly too many to go through right now.

https://trac.macports.org/query?0_port=cmake&0_port_mode=%7E&0_status=%21closed&col=id&col=summary&col=port&col=status&col=owner&col=type&col=priority&col=time&col=changetime

and they can likely almost all be closed now

comment:9 Changed 8 weeks ago by Dave-Allured (Dave Allured)

Cc: Dave-Allured added

comment:10 Changed 8 weeks ago by kencu (Ken)

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.