root icon indicating copy to clipboard operation
root copied to clipboard

Missing clad dependency.

Open pcanal opened this issue 1 year ago • 1 comments

Check duplicate issues.

  • [ ] Checked for duplicates

Description

After updating to the lastest master I got the following error:

 && /cvmfs/cms.cern.ch/el9_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/bin/c++ -fdiagnostics-color=always -Wno-implicit-fallthrough -Wno-noexcept-type -pipe  -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -O3 -DNDEBUG -rdynamic core/testsupport/CMakeFiles/TestSupport.dir/src/TestSupport.cxx.o core/base/test/CMakeFiles/CoreBaseTests.dir/TNamedTests.cxx.o core/base/test/CMakeFiles/CoreBaseTests.dir/TQObjectTests.cxx.o core/base/test/CMakeFiles/CoreBaseTests.dir/TExceptionHandlerTests.cxx.o core/base/test/CMakeFiles/CoreBaseTests.dir/TStringTest.cxx.o core/base/test/CMakeFiles/CoreBaseTests.dir/TBitsTests.cxx.o -o core/base/test/CoreBaseTests  -Wl,-rpath,/home/pcanal/root_working/build/quick-devel/lib  lib/libCling.so  -ldl  lib/libRIO.so  googletest-prefix/src/googletest-build/lib//libgtest_main.a  googletest-prefix/src/googletest-build/lib//libgmock.a  googletest-prefix/src/googletest-build/lib//libgmock_main.a  -Wl,--unresolved-symbols=ignore-in-object-files  lib/libThread.so  lib/libCore.so  googletest-prefix/src/googletest-build/lib//libgtest.a && :
/cvmfs/cms.cern.ch/el9_amd64_gcc11/external/gcc/11.4.1-30ebdc301ebd200f2ae0e3d880258e65/bin/../lib/gcc/x86_64-redhat-linux-gnu/11.4.1/../../../../x86_64-redhat-linux-gnu/bin/ld: lib/libCling.so: undefined reference to `clang::CXXMethodDecl::getThisObjectType() const'

and indeed:

./lib/libCling.so:                 U clang::CXXMethodDecl::getThisObjectType() const
./interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-build/lib/libcladDifferentiator.a:BaseForwardModeVisitor.cpp.o:                 U clang::CXXMethodDecl::getThisObjectType() const
./interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-build/lib/libcladDifferentiator.a:HessianModeVisitor.cpp.o:                 U clang::CXXMethodDecl::getThisObjectType() const
./interpreter/llvm-project/llvm/lib/libclangAST.a:DeclCXX.cpp.o:0000000000000000 t getThisObjectType(clang::ASTContext&, clang::FunctionProtoType const*, clang::CXXRecordDecl const*)
./interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-build/lib/Differentiator/CMakeFiles/cladDifferentiator.dir/BaseForwardModeVisitor.cpp.o:                 U clang::CXXMethodDecl::getThisObjectType() const
./interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-build/lib/Differentiator/CMakeFiles/cladDifferentiator.dir/HessianModeVisitor.cpp.o:                 U clang::CXXMethodDecl::getThisObjectType() const
./interpreter/llvm-project/llvm/tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/DeclCXX.cpp.o:0000000000000000 t getThisObjectType(clang::ASTContext&, clang::FunctionProtoType const*, clang::CXXRecordDecl const*)

and

rw-r--r--. 1 pcanal us_cms     68864 Oct  4 22:51 ./interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-build/lib/Differentiator/CMakeFiles/cladDifferentiator.dir/HessianModeVisitor.cpp.o
-rw-r--r--. 1 pcanal us_cms    205896 Oct  4 22:51 ./interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-build/lib/Differentiator/CMakeFiles/cladDifferentiator.dir/BaseForwardModeVisitor.cpp.o
-rw-r--r--. 1 pcanal us_cms   3673354 Oct  4 22:52 ./interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-build/lib/libcladDifferentiator.a
-rw-r--r--. 1 pcanal us_cms    340264 Oct 12 15:46 ./interpreter/llvm-project/llvm/tools/clang/lib/AST/CMakeFiles/obj.clangAST.dir/DeclCXX.cpp.o
-rw-r--r--. 1 pcanal us_cms  22259030 Oct 12 15:47 ./interpreter/llvm-project/llvm/lib/libclangAST.a
-rwxr-xr-x. 1 pcanal us_cms 127774184 Oct 12 15:49 ./lib/libCling.so

i.e. the issue that getThisObjectType recently changed in Clang but the newly updated header files did not lead to a rebuild of clad.

Reproducer

(Most likely) To reproduce build with 3e03f7891c and then rebuild the same directory commit 7f006742bb (llvm 18)

ROOT version

master-ish

Installation method

local build

Operating system

Linux

Additional context

No response

pcanal avatar Oct 12 '24 20:10 pcanal

To fix a broken build one has to remove both:

rw-r--r--. 1 pcanal us_cms     68864 Oct  4 22:51 ./interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-build/lib/Differentiator/CMakeFiles/cladDifferentiator.dir/HessianModeVisitor.cpp.o
-rw-r--r--. 1 pcanal us_cms    205896 Oct  4 22:51 ./interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-build/lib/Differentiator/CMakeFiles/cladDifferentiator.dir/BaseForwardModeVisitor.cpp.o

and

-rw-r--r--. 1 pcanal us_cms   3673354 Oct  4 22:52 ./interpreter/cling/tools/plugins/clad/clad-prefix/src/clad-build/lib/libcladDifferentiator.a

pcanal avatar Oct 14 '24 13:10 pcanal

@vgvassilev could you have a look please?

dpiparo avatar Oct 21 '24 04:10 dpiparo

(Most likely) To reproduce build with https://github.com/root-project/root/commit/3e03f7891c07828b32cf7efe4382202ecdca1a79 and then rebuild the same directory commit https://github.com/root-project/root/commit/7f006742bb1d1786d2a8c7c06e4e20cf8900e777 (llvm 18)

Incremental rebuilds across LLVM upgrades are (intentionally) not supported - too many things move around. This has always been clearly communicated and I propose to close this issue as "not planned" (and I misclicked)

hahnjo avatar Oct 28 '24 07:10 hahnjo