No more Makefile for building?

Dear experts,

so far I always used “make install” to compile changes in my code, going into sw/BUILD/O2-latest/O2 or in the subdirectory where I actually made the change (the same for QualityControl).
Recently I made a pull from git and in the BUILD directory there is no more the Makefile, so that using “make” seems impossible. I know that ninja is an alternative (and a “build.ninja” file is actually present) but…

  1. The build.ninja file is only in the parent directory and not in (for example) O2/Detectrors/*… etc… (not a big issue, but strange to me)

  2. Building with ninja fails probably because of the gcc library GLIBCXX_3.4.26 (line 5 of the linked file) (I’m on Ubuntu 18.04)

Do I really need to use ninja to build?

If this is the case, do you have any hint on how to solve the problem at point 2? On this file I pasted the output of the command “sudo ninja install -v” executed in “sw/BUILD/O2-latest/latest” without having modified the code with respect to that cloned (yesterday) from the git dev branch and built with aliBuild.

Thanks a lot in advance.
Nicolò

Can you check if:

cmake --build . --target install  

solves your issues? In principle you should not need to know what is being used by CMake to do the actual build.

Hi Giulio,

thanks. It launches the building but it doesn’t solve the library problem. This is the output:

nvalle2@fedora:~/alice/sw/BUILD/O2-latest/O2$ sudo cmake --build . --target install
[1/3090] Linking CXX shared library stage/lib/libO2GPUCommon.so
FAILED: version/libversion.a
: && /home/nvalle2/alice/sw/ubuntu1804_x86-64/CMake/v3.19.2-local1/bin/cmake -E rm -f version/libversion.a && /home/nvalle2/alice/sw/ubuntu1804_x86-64/GCC-Toolchain/v10.2.0-alice2-local1/bin/ar qc version/libversion.a version/CMakeFiles/version.dir/O2Version.cxx.o && /home/nvalle2/alice/sw/ubuntu1804_x86-64/GCC-Toolchain/v10.2.0-alice2-local1/bin/ranlib version/libversion.a && :
/home/nvalle2/alice/sw/ubuntu1804_x86-64/CMake/v3.19.2-local1/bin/cmake: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26’ not found (required by /home/nvalle2/alice/sw/ubuntu1804_x86-64/CMake/v3.19.2-local1/bin/cmake)
[10/3090] Building CXX object DataFormats/Headers/CMakeFiles/O2test-headers-DataHeader.dir/test/testDataHeader.cxx.o
ninja: build stopped: subcommand failed.

Nicolò

Do you use direnv to setup your build environment?

What happens here is that CMake was compiled with a different C++ than the one you are using to compile, and the environment seems to be picking up the system version of libstdc++.

Well… I would say no. At least, I don’t do anything more than loading the environment with
“alienv enter O2/latest” before truing to build.

Could you try with:

WORK_DIR=$PWD/sw . $WORK_DIR/osx_x86-64/O2/latest/etc/profile.d/init.sh

where $PWD/sw is your alibuild work directory?

The init.sh is executed without problem, But then when trying to build I get the same the same as before…

Hi Giulio,

basically, I have the same problem! Before I could compile typing “make -j install”! What should I do now?! If I compile using aliBuild it takes a lot of time.

Thanks,

Giacomo.

Hi Giulio,

in QualityControl/ModulesDevelopment.md at master · AliceO2Group/QualityControl · GitHub
it is recommended to use make -j8 install for development, but it does not work.
I am not an expert and using alibiuld is quite slow. Is there a solition that gives the functionallity of the previous make -j8 install?
thanks

Hi,

You should use ninja. I will update the doc.

Cheers,
Barth

Dear Barth

thanks for the prompt response. When I try to use ninja I get
zsh: command not found: ninja
how do I install ninja?

have a nice day
guillermo

Dear Guillermo,

It is probably safer to try

cmake --build . --target install  

as it would simply reuse ninja as it was used when running aliBuild.

Actually you should follow these instructions: 🛠 Build the packages · ALICE Analysis Tutorial