aliBuild fails at ninja on ubuntu 18.04

Dear Experts,

I am trying to build O2 on Ubuntu 18.04 LTS.

I already had the O2 built on my laptop a few months ago and now when I am trying to build it again using aliBuild build O2 --defaults o2 command then it is giving an error at the time of building ninja
The log file /home/vivek/alice/sw/BUILD/ninja-latest/log turns out to be empty. I see exactly the same error when I am trying to build the QualityControl using the command aliBuild build QualityControl --defaults o2 -d. The last few lines of terminal-log when build using the debug mode is pasted below and the full log can be found at https://cernbox.cern.ch/index.php/s/6DYL1Fkt9ZomrgK

2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + cd /home/vivek/alice/sw/BUILD/e5b7892f35cc00ff976b5316df9f9e53ef70eed7 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + ln -snf e5b7892f35cc00ff976b5316df9f9e53ef70eed7 /home/vivek/alice/sw/BUILD/ninja-latest 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + [[ -n '' ]] 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + export GIT_REFERENCE=/home/vivek/alice/sw/MIRROR/ninja 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + GIT_REFERENCE=/home/vivek/alice/sw/MIRROR/ninja 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + export GIT_PARTIAL_CLONE_FILTER=--filter=blob:none 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + GIT_PARTIAL_CLONE_FILTER=--filter=blob:none 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + [[ ! https://github.com/Kitware/ninja == '' ]] 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + [[ h != \/ ]] 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + [[ ! -d /home/vivek/alice/sw/SOURCES/ninja/fortran-v1.8.2.g3b/v1.8.2.g3bbbe.kitware.dyndep-1.jobserver-1 ]] 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + cd /home/vivek/alice/sw/SOURCES/ninja/fortran-v1.8.2.g3b/v1.8.2.g3bbbe.kitware.dyndep-1.jobserver-1 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + git checkout v1.8.2.g3bbbe.kitware.dyndep-1.jobserver-1 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: fatal: not a git repository (or any parent up to mount point /) 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: + git fetch -f https://github.com/Kitware/ninja refs/tags/v1.8.2.g3bbbe.kitware.dyndep-1.jobserver-1:refs/tags/v1.8.2.g3bbbe.kitware.dyndep-1.jobserver-1 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: fatal: not a git repository (or any parent up to mount point /) 2021-10-01@15:42:57:DEBUG:QualityControl:ninja:0: Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). 2021-10-01@15:42:57:ERROR:QualityControl:ninja:0: Error while executing /home/vivek/alice/sw/SPECS/ubuntu1804_x86-64/ninja/fortran-v1.8.2.g3b-local2/build.sh on vivek’.
2021-10-01@15:42:57:ERROR:QualityControl:ninja:0: Log can be found in /home/vivek/alice/sw/BUILD/ninja-latest/log
2021-10-01@15:42:57:ERROR:QualityControl:ninja:0: Please upload it to CERNBox/Dropbox if you intend to request support.
2021-10-01@15:42:57:ERROR:QualityControl:ninja:0: Build directory is /home/vivek/alice/sw/BUILD/ninja-latest/ninja.`

I am not able to understand what is going wrong, can someone let me know how do I fix it?

Thanks in advance.

Sincerely
Vivek

Hello @vksingh

did you try to cd alidist; git pull --rebase and build everything again?
I’m not expert but I found for myself (ubuntu 20.04) that updating alidist helps in many unclear cases.
Also you have pretty old installation so I expect that building from the scratch will take similar amount of time as re-building existing installation. So my second suggestion is to remove everything and start with aliBuild init …

Best regards,
Sergey

Hello @sevdokim

Yes, I tried updating my alidist and my git version but I was facing the same issue. Now I have freshly built all the required packages.

Thanks and regards,
Vivek

Hi @vksingh, could you try removing /home/vivek/alice/sw/SOURCES/ninja/fortran-v1.8.2.g3b/v1.8.2.g3bbbe.kitware.dyndep-1.jobserver-1 (e.g. using rm -rf)? I suspect it somehow ended up as an empty directory, which confuses aliBuild.