Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to compile aliroot/aliphysics with ninja #1272

Merged
merged 4 commits into from
Oct 4, 2018
Merged

Conversation

dstocco
Copy link
Contributor

@dstocco dstocco commented Aug 28, 2018

This PR introduces the possibility to compile aliroot/aliphysics with ninja.
Ninja is used only if the dedicated default (defaults-root6-ninja) is used. Otherwise, make will be used as default.
I tested that this PR has no impact whatsoever on the current workflow, unless the new default is explicitly called.

@dstocco dstocco requested a review from a team as a code owner August 28, 2018 11:50
@dstocco
Copy link
Contributor Author

dstocco commented Sep 11, 2018

@brinick , @dberzano , @ktf , @pzhristov ,
do you have any comments on this PR?

Thanks in advance,
best regards,
Diego

@dstocco
Copy link
Contributor Author

dstocco commented Oct 4, 2018

Dear all,
I guess that the use of ninja to build is a "frozen" topic.
However, this PR does not switch to ninja. It simply allows to do it if explicitly required.
Otherwise, the compilation is performed with make, as usual.

Given this precondition, does any of you see any drawback in the PR?
Thanks in advance,
Best regards,
Diego

@dberzano
Copy link
Contributor

dberzano commented Oct 4, 2018

@dstocco not at all. It's fine since it does not affect production.

Can you just please align all the updated defaults, and rebase? I believe the AliRoot/AliPhysics versions changed in the meanwhile. Since there was a big PR pending for a while (#1293) we wanted to wait for it to be merged before proceeding.

@dstocco
Copy link
Contributor Author

dstocco commented Oct 4, 2018

Hi Dario,
done,
Please notice that I added:
version: "%(tag_basename)s"
in defaluts-root6-ninja.sh

I have to say that I do not recall why: probably it was done to avoid overwriting the ROOT6 version that I used for O2...but since the root version is different I guess that there is no conflict.
Should I remove it?

Thanks,
Cheers,
Diego

@dberzano
Copy link
Contributor

dberzano commented Oct 4, 2018

With my fixes, the diff between the original root6 default and yours follows:

--- defaults-root6.sh	2018-10-04 09:37:14.000000000 +0200
+++ defaults-root6-ninja.sh	2018-10-04 17:15:55.000000000 +0200
@@ -1,9 +1,10 @@
-package: defaults-root6
+package: defaults-root6-ninja
 version: v1
 env:
   CXXFLAGS: "-fPIC -g -O2 -std=c++11"
   CFLAGS: "-fPIC -g -O2"
   CMAKE_BUILD_TYPE: "RELWITHDEBINFO"
+  CMAKE_GENERATOR: "Ninja"
 overrides:
   CMake:
     version: "%(tag_basename)s"
@@ -16,6 +17,15 @@ overrides:
       set -e
       which gfortran || { echo "gfortran missing"; exit 1; }
       which cc && test -f $(dirname $(which cc))/c++ && printf "#define GCCVER ((__GNUC__ << 16)+(__GNUC_MINOR__ << 8)+(__GNUC_PATCHLEVEL__))\n#if (GCCVER < 0x070300)\n#error \"System's GCC cannot be used: we need at least GCC 7.X. We are going to compile our own version.\"\n#endif\n" | cc -xc++ - -c -o /dev/null
+  XRootD:
+    build_requires:
+      - CMake
+      - "OpenSSL:(?!osx)"
+      - "osx-system-openssl:(osx.*)"
+      - ApMon-CPP
+      - libxml2
+      - "GCC-Toolchain:(?!osx)"
+      - ninja
   ROOT:
     tag: "v6-10-08"
     source: https://github.com/root-mirror/root
@@ -29,15 +39,27 @@ overrides:
       - "GCC-Toolchain:(?!osx)"
       - libpng
       - lzma
+    build_requires:
+      - CMake
+      - "Xcode:(osx.*)"
+      - ninja
   GSL:
     prefer_system_check: |
       printf "#include \"gsl/gsl_version.h\"\n#define GSL_V GSL_MAJOR_VERSION * 100 + GSL_MINOR_VERSION\n# if (GSL_V < 116)\n#error \"Cannot use system's gsl. Notice we only support versions from 1.16 (included)\"\n#endif\nint main(){}" | gcc  -I$(brew --prefix gsl)/include -xc++ - -o /dev/null
   AliRoot:
     version: "%(commit_hash)s_ROOT6"
     tag: v5-09-38
+    build_requires:
+      - CMake
+      - "Xcode:(osx.*)"
+      - AliTPCCommon
+      - ninja
   AliPhysics:
     version: "%(commit_hash)s_ROOT6"
     tag: v5-09-38-01
+    build-requires:
+      - "Xcode:(osx.*)"
+      - ninja
   GEANT4:
     tag: v10.3.3
     source: https://gitlab.cern.ch/geant4/geant4.git

@dberzano dberzano merged commit 1353afa into alisw:master Oct 4, 2018
@dstocco dstocco deleted the ninja branch October 4, 2018 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants