O2 build problems with ubuntu 20.04 in both xrootD and in O2 itself

Dear colleagues,
A happy new year 2023.
I am trying to build O2 from scratch after a long break. I started from scratch (removing everything in /sw, starting).
The compilation runs through surprisingly nearly through, it crashes in the end with XrootD. The log is in this cernbox folder named XrootD.txt : CERNBox

AliDoctor-log of ¨aliDoctor o2 --defaults o2 ¨ is given in the same cernbox folder: AliDoctor.txt
My operating system is ubuntu Ubuntu 20.04.5 LTS. aliDist is from yesterday (tried to solve the problem by modifying openssl version or xrootd version, same crash, I also reinstalled openssl with different versions, didn´t help, but also not worse).
If I try to compile without xrootD, the O2 compilation: aliBuild build O2 --defaults o2 --disable XRootD,JAliEn-ROOT -j 3
the compilation of O2 crashes with an error that I have not seen so far. It seems that it doesn´t recognise std::atomic. the corresponding library is installed on my laptop. The log is in the same cernbox folder: log_exclude.txt O2 is not exactly dev since I need to work on top of a PR that it is not yet merged, but I got the same problem with dev after 1st of January 2023.

I apologize in advance for my clumsiness presumably responsible that it doesn´t work. I am happy for any help.

In parallel, I will ask my institute to give me a completely blank machine installing ubuntu only to do O2 and continue to do detector code development without compilation :frowning: .
Where can I find the most appropriate instructions for O2 (not O2Physics) to be followed precisely line by line.

Best regards,

Hi Michael,

I am also using ubuntu 20.04 still and I disable by default the custom OpenSSL and curl builds. In your XrootD.txt log it seems there is a crash with system OpenSSL and the version used by aliBuild.
You can do this with
aliBuild build O2 --defaults o2 --disable OpenSSL,curl
I have added the following local patch to alidist to have this automatically:

diff --git a/defaults-o2.sh b/defaults-o2.sh
index 80b0a036..73126d99 100644
--- a/defaults-o2.sh
+++ b/defaults-o2.sh
@@ -9,6 +9,8 @@ env:
   - mesos
   - MySQL
+  - curl
+  - OpenSSL
     version: '%(commit_hash)s_O2'

The advantage is that I can load O2 and in a shell and still do ssh and git push with the environment loaded. With the aliBuild version of OpenSSL this does not work for me which is a bit annoying.

The disadvantage is that the (first) build process takes much longer, since you need to compile a lot more packages locally including clang, root, etc for which aliBuild would otherwise download precompiled packages.


Hi Ole,
a happy new year.
Thanks a lot !| I will try this morning and tell you if it works through.


@mwinn info about the problem can be seen here:

in principle you should not need custom openssl, as xrootd works even with openssl 3… so the system provided one should be ok… you can also try with alibuild build --no-system

but your problem is that you need json-c packages installed (including the dev package), notice:

-- Checking for module 'json-c'
--   No package 'json-c' found

and this is strictly required
i will bump up the fixing of xrootd recipe on my todo list to solve this once and for all

Hi Adrian,
thanks a lot!
The workaround from Ole was not sufficient, indeed.
I installed now sudo apt-get install libjson-c-doc and I am recompiling: I will let you know, if it goes through.

Hi @mwinn ! It should be libjson-c-dev not -doc

Yes, of course. I did install dev, but I made a mistake copying, since I installed -doc as well afterwards.

Hi @asevcenc,
thanks a lot for the suggestion.
Sorry for the delay in writing, I was at a workshop and my laptop could not be used to compile in a sufficient manner to test it properly.

I installed libjson-c-dev and I still have the same error in the xrootD compilation, when running without --no-system.
Without --no-system, I got the same error.

With --no-system, I am stuck at:

==> Building lz4@v1.9.3
==> lz4 is being built (use --debug for full output): failed
ERROR: Error while executing /home/mwinn/alice/sw/SPECS/ubuntu2004_x86-64/lz4/v1.9.3-1/build.sh on `dphnpcl107’.
ERROR: Log can be found in /home/mwinn/alice/sw/BUILD/lz4-latest/log
ERROR: Please upload it to CERNBox/Dropbox if you intend to request support.
ERROR: Build directory is /home/mwinn/alice/sw/BUILD/lz4-latest/lz4.
mwinn@dphnpcl107:~/alice$ less /home/mwinn/alice/sw/BUILD/lz4-latest/log
/home/mwinn/alice/sw/BUILD/lz4-latest/log: No such file or directory

Is there anything else that I can try?