root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.62k stars 1.25k forks source link

Build failure in Ubuntu 22.04 due to OpenSSL 3.0 #10518

Closed ezradlesser closed 2 years ago

ezradlesser commented 2 years ago

Describe the bug

ROOT v6.24.06 is currently failing to build in Ubuntu 22.04. This appears to be due to an upgrade to OpenSSL 3.0 with this new LTS release; you can see for example a similar issue here. The specific build error happens while building XROOTD. (I apologize in advance if this is not the correct place to report the issue.)

Expected behavior

ROOT builds without error using latest OpenSSL.

To Reproduce

1) Clean install of Ubuntu 22.04 2) sudo apt update, followed by sudo apt upgrade and sudo apt install the required libraries for building ROOT 3) Download ROOT source code and unzip 4) Configure & build (using system Python 3.10)

Setup

ROOT version: v6-24-06 Operating system: Ubuntu 22.04 LTS (on Windows Subsystem for Linux / WSL2) How you obtained ROOT: building from source

Additional context

root-v6-24-06/src/ROOT-build/XROOTD-prefix/src/XROOTD-stamp/XROOTD-build-*.log files are attached: XROOTD-build-out.log XROOTD-build-err.log

The specific error from XROOTD-build-err.log: root-v6-24-06/src/ROOT-build/XROOTD-prefix/src/XROOTD/src/XrdCrypto/XrdCryptosslgsiAux.cc:901:32: error: invalid conversion from ‘const rsa_st*’ to ‘RSA*’ {aka ‘rsa_st*’} [-fpermissive]

Finally, if it is helpful, the build script being used is here, with the only modification to the script being the root_version variable: root_version=6-24-06

ferdymercury commented 2 years ago

Can you try with most recent master? See https://github.com/root-project/root/issues/10496 And also https://github.com/root-project/root/pull/10322

ezradlesser commented 2 years ago

Thank you, @ferdymercury -- somehow I missed those previous issues... sorry about that.

Just to share here, I also tried with v6-22-08 from source and received the same XROOTD build error (but fewer warnings): XROOTD-build-out.log XROOTD-build-err.log

I then tried

$ cd ~
$ git clone https://github.com/root-project/root.git
$ mkdir root_build
$ cd root_build
$ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=$(which gcc) -DCMAKE_CXX_COMPILER=$(which g++) -DCMAKE_Fortran_COMPILER=$(which gfortran) -S ../root -B ./
$ cmake --build .

and XROOTD seems to have built successfully, but there seems to be some other errors. The configure step said that the ROOT version is 6-27-01. build_out.log build_err.log

ferdymercury commented 2 years ago

and XROOTD seems to have built successfully, but there seems to be some other errors. The configure step said that the ROOT version is 6-27-01. build_out.log build_err.log

@eguiraud seems similar to https://root-forum.cern.ch/t/error-for-installing-root-source-in-ubuntu-22-04/49803/21

ferdymercury commented 2 years ago

"bits" error also appears on https://lcgapp-services.cern.ch/root-jenkins/view/ROOT/job/root-makedoc-master/2679/parsed_console/

couet commented 2 years ago

"bits" error also appears on https://lcgapp-services.cern.ch/root-jenkins/view/ROOT/job/root-makedoc-master/2679/parsed_console/

Yes I am aware. The doc build is blocked because of that.

eguiraud commented 2 years ago

That's a problem with current master that should be fixed soon, a workaround is configuring the build with -Druntime_cxxmodules=OFF. See also https://github.com/root-project/root/pull/10498#issuecomment-1117088808

eguiraud commented 2 years ago

About the original issue. @ezradlesser why are you building ROOT from source? You can use one of the pre-compiled binaries for Ubuntu in WSL, or use the conda package. See https://root.cern/install .

ezradlesser commented 2 years ago

Hi @eguiraud -- as far as I know there are not any pre-compiled binaries yet for Ubuntu 22?

I am trying to build ROOT as part of a project that builds several useful HEP packages together with proper Python bindings for running python scripts. I have not checked in awhile but I remember pre-built ROOT binaries being built only with Python 2, which will not suit our purposes. Even pre-built with Python3, having to install extra Python distributions is a shame, and then extra package managers on top of that can make things pretty messy (and conflicts commonplace).

There are work-arounds of course like installing a VM or different Ubuntu distribution, but I think this just postpones solving the problem...

ferdymercury commented 2 years ago

There are Ubuntu 22 binaries for https://root.cern/releases/release-62602/ but not for 6.24/06

eguiraud commented 2 years ago

..and they are built for Python 3

eguiraud commented 2 years ago

The bits/utility compilation error has been fixed in latest master by @hahnjo

ezradlesser commented 2 years ago

Ah! I missed that there was a binary available for Ubuntu 22 of v6-26-02. Many thanks @ferdymercury for pointing this out, and also @eguiraud for clarifying that it is built for Python 3. So far it "just works" :) Please feel free to close this issue at your discretion (assuming there is no intent to adding Ubuntu 22 support previous minor versions).

eguiraud commented 2 years ago

Closing this as v6.24.06 is not tested/released for Ubuntu 22, and @ezradlesser is happy with our pre-compiled binaries for v6.26. I am not completely sure whether a future v6.24.08 will support Ubuntu 22 or not, but that's a different issue.