Cling results for ninja check-cling, FreeBSD 12-stable, llvm10, git HEAD

Hi,
I couldn’t get a build of ROOT pushed through, though I am quite far. I decided to first try to get cling up. After burning quite a bit of carbon I have cling and the tests built. However I am getting some failures for the check-cling target:


Testing Time: 146.84s


Failing Tests (23):
Cling :: CodeGeneration/RecursiveInit.C
Cling :: ErrorRecovery/Diagnostics.C
Cling :: ErrorRecovery/SubsequentDecls.C
Cling :: Extensions/Lookup/Arrays.C
Cling :: Extensions/Lookup/ControlFlow.C
Cling :: Extensions/Lookup/LifetimeHandler.C
Cling :: Extensions/Lookup/Simple.C
Cling :: Extensions/Lookup/SimpleDynamicExprs.C
Cling :: Extensions/Lookup/StillError.C
Cling :: Interfaces/address.C
Cling :: Interfaces/compileFunc.C
Cling :: Interfaces/transactionReuse.C
Cling :: Lookup/args.C
Cling :: Lookup/data.C
Cling :: Lookup/func.C
Cling :: Lookup/named.C
Cling :: Lookup/scope.C
Cling :: Lookup/tag.C
Cling :: Lookup/template.C
Cling :: Lookup/type.C
Cling :: Pragmas/opt.C
Cling :: Prompt/globalinit.C
Cling :: Utils/Transform.C

Expected Passes : 102
Expected Failures : 13
Unsupported Tests : 12
Unexpected Failures: 23
FAILED: tools/cling/test/CMakeFiles/check-cling

My cmake CL args are:
std::vectorstd::string config_vec{
“-DCMAKE_INSTALL_PREFIX=/usr/local/pkg/cling”,
“-DLLVM_ENABLE_CXX1Y=ON”,
“-DLLVM_ENABLE_CXX1Z=ON”,
“-DCMAKE_C_COMPILER=clang10”,
“-DCMAKE_CXX_COMPILER=clang++10”,
“-DCMAKE_CXX_STANDARD=14”,
“-DCLING_CXX_HEADERS=/usr/local/llvm10/include”,
“-DCLING_INCLUDE_PATHS=/usr/local/llvm10/include”,
“-DCLING_INCLUDE_TESTS=ON”,
“-G”,
“Ninja”,
“…/src”
};

First, is the newbie category appropriate (I’m definitely a newbie).
Second, any suggestions on how to diagnose the failures would be appreciated.

Many thanks.

Hi Russell,
I think we might need a few background details in order to better help:

  • what operating system are you on?
  • what ROOT version are you trying to compile?
  • what’s the exact cmake invocation you use to compiler ROOT?
  • do you get any errors or warnings (and which)?

@Axel or @vvassilev might be able to comment on cling’s test failures.

Cheers,
Enrico

What’s the test output for cat ../tools/cling/test/Lookup/named.C | ./bin/cling -fno-rtti?

Greetings,

Hi Russell,
I think we might need a few background details in order to better help:

  • what operating system are you on?

FreeBSD 12-stable, i.e. FreeBSD 12 kept up to date with the
source repo. I tried both llvm90 and llvm10. Doesn’t
appear to make a difference.

  • what ROOT version are you trying to compile?

The version obtained by following the cling build instructions
here:

https://root.cern.ch/cling-build-instructions

git log reports commit e0b472e46eb5861570497c2b9efabf96f2d4a485
is HEAD.

  • what’s the exact cmake invocation you use to compiler ROOT?

I use ‘ ninja'. To run the tests, ' ninja check-cling’

I figured this out by examining the python packaging script.

  • do you get any errors or warnings (and which)?

Yes, here’s the first:

[0/1] Running the Cling regression tests
lit.py:
/usr/local/pkg/repo/jupyter/cling/src/tools/cling/test/lit.cfg:269:
note: using cling: ‘/usr/local/pkg/repo/jupyter/cling/build/./bin/cling’
lit.py:
/usr/local/pkg/repo/jupyter/cling/src/tools/cling/test/lit.cfg:280:
note: Running tests from build tree
– Testing: 150 tests, 8 threads –
Testing: 0 … 10
FAIL: Cling :: CodeGeneration/RecursiveInit.C (19 of 150)
******************** TEST ‘Cling :: CodeGeneration/RecursiveInit.C’
FAILED ********************
Script:

Greetings:

What’s the test output for |cat …/tools/cling/test/Lookup/named.C |
./bin/cling -fno-rtti|?

Below, the ‘build/’ directory holds a freshly built cling, and the
‘src/’ is what is obtained from

https://root.cern.ch/cling-build-instructions

(.venv) rcarter@bruno> ls
build/ src/ test.out
(.venv) rcarter@bruno> cd build
(.venv) rcarter@bruno> ls
bin/ CPackConfig.cmake libexec/
share/
build.ninja CPackSourceConfig.cmake llvm.spec
test/
cmake/ docs/ LLVMBuild.cmake
tools/
cmake_install.cmake DummyConfigureOutput man/
unittests/
CMakeCache.txt examples/ projects/
utils/
CMakeFiles/ include/ rules.ninja
compile_commands.json lib/ runtimes/
(.venv) rcarter@bruno> cat …/src/tools/cling/test/Lookup/named.C |
./bin/cling -fno-rtti
ERROR in cling::CIFactory::createCI():
resource directory …/lib/clang/5.0.0 not found!

****************** CLING ******************

  • Type C++ code and press enter to run it *
  •         Type .q to exit             *
    

resource directory …/lib/clang/5.0.0

sounds very weird. Did you build the install target? Make sure you install into say …/install - no sudo needed for that.

Axel.

O, and IIRC we had a problem with one of FreeBSD’s system APIs - putenv or similar… Again IIRC it prevented cling from finding its directories back. Now - I won’t get to look at this over the weekend; please ping me next week should you not hear back from me!

O, and IIRC we had a problem with one of FreeBSD’s system APIs -

putenv> or similar… Again IIRC it prevented cling from finding its
directories back. Now - I won’t get to look at this over the weekend;
please ping me next week should you not hear back from me!

So I’ve now got the build installed and cling up and running,
(rpaths work, glad I didn’t have to work through that) and yes, it
is having trouble finding its llvm directories. I at least have
something to look for now.

Thank you,
Russell

These might be relevant:
https://sft.its.cern.ch/jira/browse/ROOT-9498
https://sft.its.cern.ch/jira/browse/ROOT-9484

These might be relevant:
Loading...
Loading...


Thanks for the pointers. I suspect I will need to insert
tools/cling/lib/Interpreter/CIFactory.cpp into my brain in order to
fix this.

However, I was able to make some progress with the ‘ninja cling-test’
(or check-cling, doesn’t seem to matter) failures. I was able to make
a few of tests work by replacing the ‘lit’ generated -I include. For
instance ninja cling-test produces this sort of output:

FAIL: Cling :: Extensions/Lookup/ControlFlow.C (119 of 150)
******************** TEST ‘Cling :: Extensions/Lookup/ControlFlow.C’
FAILED ********************
Script:

cat
/usr/local/pkg/repo/jupyter/cling/src/tools/cling/test/Extensions/Lookup/ControlFlow.C

/usr/local/pkg/repo/jupyter/cling/build/./bin/cling --nologo
-I/usr/local/pkg/repo/jupyter/cling/build/tools/clang/include
-I/usr/local/pkg/repo/jupyter/cling/src/tools/cling/test/Extensions/Lookup
/usr/local/pkg/repo/jupyter/cling/build/./bin/FileCheck
/usr/local/pkg/repo/jupyter/cling/src/tools/cling/test/Extensions/Lookup/ControlFlow.C

Fails with that -I build include path, but it does work if I
substitute the installation include path, in my case,
/usr/local/pkg/cling/include. Reading the various ‘lit’ scripts, I
thought I might be able to fix this by exporting
INCLUDE=/usr/local/pkg/cling/include before running ninja cling-test,
but no luck. If you could point out where the lit test runner sets
it that might help me.

Thanks very much,
Russell