#65068 closed defect (wontfix)
cmake requires curl
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.2 |
Keywords: | Cc: | mascguy (Christopher Nielsen) | |
Port: | cmake |
Description
Why does cmake require curl? This means that curl can't depend on anything that requires cmake, such as brotli. See #65065.
Change History (6)
comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 3 years ago by michaelld (Michael Dickens)
Looking into this, as it's a -very- good question. I'm guessing I can move the curl
dependency to test
from depends
(or just remove it since we don't have tests setup in the Portfile)
comment:3 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
cmake binaries link with curl:
$ otool -L /opt/local/bin/{ccmake,cmake,cpack,ctest}|egrep '^/|curl' /opt/local/bin/ccmake: /opt/local/lib/libcurl.4.dylib (compatibility version 12.0.0, current version 12.0.0) /opt/local/bin/cmake: /opt/local/lib/libcurl.4.dylib (compatibility version 12.0.0, current version 12.0.0) /opt/local/bin/cpack: /opt/local/lib/libcurl.4.dylib (compatibility version 12.0.0, current version 12.0.0) /opt/local/bin/ctest: /opt/local/lib/libcurl.4.dylib (compatibility version 12.0.0, current version 12.0.0)
So you can't just remove the dependency from depends_lib
. You would also have to tell the build system not to link with MacPorts curl even if it is installed. But I don't know if that's the right thing to do.
cmake was made to use MacPorts curl to resolve #43133, in which cmake was trying to fetch a file but couldn't, because previously cmake was using a bundled copy of curl which didn't support https. Certainly I agree with the general preference for using MacPorts libraries over potentially out-of-date bundled libraries.
I don't know how important it is for cmake itself to be able to fetch content. In MacPorts ports of course we would prefer that that not happen, but users may also use MacPorts cmake for their own non-MacPorts projects, and they might expect this functionality to exist.
Therefore it's probably best for cmake to continue to link with MacPorts curl and for a different resolution to the circular dependency to be found.
comment:4 Changed 3 years ago by michaelld (Michael Dickens)
Thanks for the background; I'd forgotten about some parts there.
My search indeed shows that we use an externally provided curl & that is part of the core cmake codebase. Based on the reasoning you note, I agree with you that it's wiser for us to continue using the externally provided curl & fix the circular dependency in some other way.
comment:5 Changed 3 years ago by kencu (Ken)
cmake-bootstrap is new enough to build brotli and has no deps, so that might be a simple fix
comment:6 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
If it is important that cmake continue to use curl, then another solution is for brotli to stop using cmake (#65069).