Skip to content

[civetweb] download from GIT instead of bundle, bump from 1.16+ to latest master, and define proper CMake target - #22731

Merged
linev merged 5 commits into
root-project:masterfrom
ferdymercury:bcivetclean
Aug 6, 2026
Merged

[civetweb] download from GIT instead of bundle, bump from 1.16+ to latest master, and define proper CMake target#22731
linev merged 5 commits into
root-project:masterfrom
ferdymercury:bcivetclean

Conversation

@ferdymercury

Copy link
Copy Markdown
Collaborator

Cleaned-up version of #21947

@dpiparo

dpiparo commented Jun 30, 2026

Copy link
Copy Markdown
Member

thanks for this sizable effort!

@dpiparo

dpiparo commented Jun 30, 2026

Copy link
Copy Markdown
Member

If everything works, and we go with this solution, we should perhaps move the source tarball to the LCG Packages, as all the others.

@ferdymercury

Copy link
Copy Markdown
Collaborator Author

If everything works, and we go with this solution, we should perhaps move the source tarball to the LCG Packages, as all the others.

Sounds good to me. In that case, it should be downloaded from commit civetweb/civetweb@588860e (no tagged version) and I guess upload it to LCG with name:

civetweb-1.16-588860.tar.gz

Comment thread net/http/src/TCivetweb.cxx Outdated
@github-actions

github-actions Bot commented Jun 30, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 19h 15m 40s ⏱️
 3 853 tests  3 851 ✅ 0 💤 2 ❌
78 505 runs  78 502 ✅ 0 💤 3 ❌

For more details on these failures, see this check.

Results for commit e74a118.

♻️ This comment has been updated with latest results.

@linev linev closed this Jun 30, 2026
@linev linev reopened this Jun 30, 2026
@ferdymercury
ferdymercury force-pushed the bcivetclean branch 2 times, most recently from 2c4bfc4 to a53e137 Compare June 30, 2026 16:16
@ferdymercury ferdymercury added skip ci Skip the full builds on the actions runners and removed clean build Ask CI to do non-incremental build on PR labels Jul 2, 2026
@ferdymercury
ferdymercury marked this pull request as draft July 2, 2026 10:33
@ferdymercury ferdymercury removed the skip ci Skip the full builds on the actions runners label Jul 2, 2026
@ferdymercury
ferdymercury force-pushed the bcivetclean branch 2 times, most recently from 7542242 to e7453b3 Compare August 3, 2026 16:19
@ferdymercury
ferdymercury marked this pull request as ready for review August 3, 2026 21:22
Comment thread cmake/modules/RootBuildOptions.cmake Outdated
Comment thread .github/workflows/root-ci-config/buildconfig/ubuntu2604.txt
@ferdymercury

Copy link
Copy Markdown
Collaborator Author

@linev It seems opensuse16 machine is missing one of the packages ? I tried here: root-project/root-ci-images#141

  CMake Error at /usr/lib64/cmake/civetweb/civetweb-targets.cmake:106 (message):
    The imported target "civetweb::server" references the file
       "/usr/bin/civetweb"
    but this file does not exist.  Possible reasons include:
    * The file was deleted, renamed, or moved to another location.
    * An install or uninstall procedure did not complete successfully.
    * The installation package was faulty and contained
       "/usr/lib64/cmake/civetweb/civetweb-targets.cmake"
    but not all the files it references.
  Call Stack (most recent call first):
    /usr/lib64/cmake/civetweb/civetweb-config.cmake:57 (include)
    cmake/modules/SearchInstalledSoftware.cmake:539 (find_package)
    CMakeLists.txt:136 (include)

@ferdymercury
ferdymercury requested a review from linev August 4, 2026 17:39

@linev linev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me PR looks ready now!

Lets wait until new opensuse image produced and one can see its proper usage

@ferdymercury

Copy link
Copy Markdown
Collaborator Author

It seems it's still failing but in another place: can you reproduce locally on opensuse16? Or is it a clean-build issue?

Maybe it's complaining here?
get_target_property(CIVETWEB_IMPORTED_LOCATION civetweb::civetweb IMPORTED_LOCATION_NONE)

Could it be that the version of civetweb 1.15 (instead of 1.16) does not have this target property ? Can you check if it's done differently in 1.15 civetwebconfig.cmake ?

@linev

linev commented Aug 5, 2026

Copy link
Copy Markdown
Member

get_target_property(CIVETWEB_IMPORTED_LOCATION civetweb::civetweb IMPORTED_LOCATION_NONE)

I got error:

-- Found civetweb version 1.16.0
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CIVETWEB_IMPORTED_LOCATION
    linked by target "cmTC_385e9" in directory /home/linev/build/ddd/CMakeFiles/CMakeScratch/TryCompile-1kfjh1

CMake Error at cmake/modules/SearchInstalledSoftware.cmake:550 (try_compile):
  Failed to generate test project build system.
Call Stack (most recent call first):
  CMakeLists.txt:136 (include)

As you can see - it is civetweb 1.16.

And here is content of civetweb-config.cmake:

####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
####### Any changes to this file will be overwritten by the next CMake run ####
####### The input file was civetweb-config.cmake.in                            ########

get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)

# Use original install prefix when loaded through a "/usr move"
# cross-prefix symbolic link such as /lib -> /usr/lib.
get_filename_component(_realCurr "${CMAKE_CURRENT_LIST_DIR}" REALPATH)
get_filename_component(_realOrig "/usr/lib64/cmake/civetweb" REALPATH)
if(_realCurr STREQUAL _realOrig)
  set(PACKAGE_PREFIX_DIR "/usr")
endif()
unset(_realOrig)
unset(_realCurr)

macro(set_and_check _var _file)
  set(${_var} "${_file}")
  if(NOT EXISTS "${_file}")
    message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
  endif()
endmacro()

####################################################################################
include(CMakeFindDependencyMacro)

set_and_check(civetweb_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")
set_and_check(civetweb_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include")
set_and_check(civetweb_LIBRARY_DIRS "${PACKAGE_PREFIX_DIR}/lib64")
set(civetweb_LIBRARIES civetweb)

if(ON)
  set(civetweb-cpp_LIBRARIES civetweb-cpp)
endif()

find_dependency(Threads)

set(CIVETWEB_SAVED_MODULE_PATH ${CMAKE_MODULE_PATH})
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})

if(FALSE)
  find_dependency(LibDl)
endif()

if(TRUE)
  find_dependency(LibRt)
endif()

if(FALSE)
  find_dependency(WinSock)
endif()

set(CMAKE_MODULE_PATH ${CIVETWEB_SAVED_MODULE_PATH})
unset(CIVETWEB_SAVED_MODULE_PATH)

include("${CMAKE_CURRENT_LIST_DIR}/civetweb-targets.cmake")

@ferdymercury

Copy link
Copy Markdown
Collaborator Author

Thanks!

Could you check if adding this below get_target_property would help?

if(NOT CIVETWEB_IMPORTED_LOCATION OR CIVETWEB_IMPORTED_LOCATION MATCHES "NOTFOUND")
  get_target_property(CIVETWEB_IMPORTED_LOCATION civetweb::civetweb IMPORTED_LOCATION_RELEASE)
  if(NOT CIVETWEB_IMPORTED_LOCATION OR CIVETWEB_IMPORTED_LOCATION MATCHES "NOTFOUND")
    get_target_property(CIVETWEB_IMPORTED_LOCATION civetweb::civetweb IMPORTED_LOCATION_RELWITHDEBINFO)
  endif()
endif()

It could also be it's called NOCONFIG or DEBUG or ...

Maybe there is more info in this file:
("${CMAKE_CURRENT_LIST_DIR}/civetweb-targets.cmake")

@linev

linev commented Aug 5, 2026

Copy link
Copy Markdown
Member

Yes, with your addition cmake works.
It is IMPORTED_LOCATION_RELWITHDEBINFO

…e target, and bump from 1.16+ to latest master

and define proper CMake target

[ci] explicit enable in alma10clang-ninja even if it was getting on implicitly

fixes for SSL
disable SSL dynamic loading

fix openssl include
fix builtin ssl name

rename builtin name
and copy-paste additional variables from xrootd to civetweb

avoid cache vars

[net] document civetweb builtin mechanism and version link

[civetweb] add patches after 1.16 that solve several CVE

detect if websockets component is part of systemwide civetweb

[cmake] do not error out if build dir is git dir

from willcern

Create civetweb-marker.diff

xdom socket missing in ubu packages

see root-project/root-ci-images#116 (comment)

enable builtin civetweb on mac and windows since no system version
…actively enable builtin_civetweb if http is requested

as suggested by linev
…nable builtin_civetweb

This purposely ignores the fail-on-missing-flag since we are moving away from that model
as suggested by linev
opensuse16 comes with civetweb 1.15, allow it
@ferdymercury

Copy link
Copy Markdown
Collaborator Author

Test failures seem unrelated.

@linev

linev commented Aug 5, 2026

Copy link
Copy Markdown
Member

It is sensitive PR, therefore I close and open PR to start from clean build

@linev linev added the clean build Ask CI to do non-incremental build on PR label Aug 5, 2026
@linev linev closed this Aug 5, 2026
@linev linev reopened this Aug 5, 2026
@ferdymercury

Copy link
Copy Markdown
Collaborator Author

Looking green :)

@guitargeek guitargeek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much!

  • ROOT downloads civetweb from the internet now instead of containing its source, which is alighted with the overall direction we go into for dependencies
  • Build system behavior changes like defaulting to builtin_civetweb=OFF were requested by Sergey, who already approved the PR
  • builtin_civetweb=OFF is exercised in the CI on opensuse16

Comment thread cmake/modules/SearchInstalledSoftware.cmake
@linev
linev merged commit 92bed4e into root-project:master Aug 6, 2026
48 of 71 checks passed
@ferdymercury
ferdymercury deleted the bcivetclean branch August 6, 2026 08:32
@hahnjo

hahnjo commented Aug 6, 2026

Copy link
Copy Markdown
Member

On my system, I get looads of output during building and installing civetweb - can this be quieted as for other builtins?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR skip code analysis Skip the code analysis CI steps for this PR, including verifying clang-formatting and running Ruff.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants