_ROOT Version: 6.14/04
Platform: linux
Compiler: gcc 8.2.0
It occured to me that root headers are nowadays in
${CMAKE_INSTALL_PREFIX}/include/root
and not anymore in
${CMAKE_INSTALL_PREFIX}/include
, while still being included as #include "TF1.h"
and not #include "root/TF1.h"
. Now that’s fine, and root-config --cflags
prints out a -I
flag with the trailing root
.
But, when one installs VecCore along with root, these do end up in
${CMAKE_INSTALL_PREFIX}/include
, which may not be in any standard -I path.
MWE:
-
build and install root with
-Dbuiltin_veccore=ON -Dveccore=ON -DCMAKE_INSTALL_PREFIX=/home/pseyfert/root-install-and-nothing-else
. -
create a tiny c++ file
echo '#include "TF1.h"' > main.cpp
. -
set up a build environment
export CPPFLAGS=$(root-config --cflags); export CXX=$(root-config --cxx)
(linkage not needed). -
use gnu make builtin rules to compile
make main.o
(results inc++ -pthread -std=c++1z -m64 -fdiagnostics-color -march=native -O3 -g -Wextra -Wall -Wshadow -I/home/pseyfert/root-install-and-nothing-else/include/root -c -o main.o main.cpp
for me)
the compilation then fails because of
In file included from /home/pseyfert/root-install-and-nothing-else/include/root/TFormula.h:24,
from /home/pseyfert/root-install-and-nothing-else/include/root/TF1.h:27,
from main.cpp:1:
/home/pseyfert/root-install-and-nothing-else/include/root/Math/Types.h:22:10: fatal error: VecCore/VecCore: No such file or directory
#include <VecCore/VecCore>
^~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: main.o] Error 1
Not overly happy with this, but unsure if I should file that under ‘unfortunate corner case’, ‘bug’, ‘new-version-migration-task’ or something else.
(root_numpy
doesn’t build for me atm because of this :/)