cmake and make check?

I have not done cmake builds for a while.

I did a :

cmake /source tree
make

and all seems okay

but then many tests fail when i do a

make check

I'm using pristine tip of the llvm tree.

Ideas?

TIA.

Reed

Hi Reed,

but then many tests fail when i do a "make check"

That's not normal (all tests pass for me on Linux and OS X). Is this
on your build machine, or a MIPS board with some odd
cross-compilation? The latter is more likely to have weird CMake
issues (I know AArch64 does if you're not careful).

Ideas?

Only the usual: pick a (preferably simple) test and try to work out
what's going on; "llvm-lit -v /path/to/test" is useful to save time
when you want to see if you've fixed an individual test; run the
command it prints out and see if you can see why it's failing...

One of the "make check" failure outputs (from a single test) might be
recognised by someone if you can post it. (For crashes llvm-lit often
only reports something about there being no output though. Obviously
that's useless).

Cheers.

Tim.

Do you use a -G on the cmake?

And if so which one.

Tia.

Reed

Do you use a -G on the cmake?

And if so which one.

I use "-G Ninja" these days. I'm not actually convinced it's
significantly better than the default, but some weird habit I suppose.

But both work the same for me (I've just checked without).

Cheers.

Tim.

I'm just running this on x86 ubuntu.

after

cd $build_dir
cmake $src_root
make

The first strange this is that if I go into build_dir/test and type "make", it does nothing.

In $build_dir, with "make check", I get errors like:

/home/rkotler/llvmc/build/test/Analysis/CostModel/X86/Output/uitofp.ll.script: line 1: /home/rkotler//home/rkotler/llvmc/build/./bin/llvmc/build/./bin/llc: No such file or directory

Certainly, ./bin/llc exists

rkotler@mipssw006:~/llvmc/build$ ls ./bin/llc
./bin/llc

It would go better if you didn't work on the directory "llvmc".

See llvm/test/lit.cfg. There are many kluges...

The first strange this is that if I go into build_dir/test and type "make",
it does nothing.

I don't think there is a rule in CMake to "make" inside test. You
should use make check.

/home/rkotler/llvmc/build/test/Analysis/CostModel/X86/Output/uitofp.ll.script:
line 1: /home/rkotler//home/rkotler/llvmc/build/./bin/llvmc/build/./bin/llc:
No such file or directory

/home/rkotler//home/rkotler/ looks wrong.

--renato

It would go better if you didn't work on the directory "llvmc".

> See llvm/test/lit.cfg. There are many kluges...
>

That is really crazy.I think kluge needs a capital K here.

Changing the directory name from /home/rkotler/llvmc/build to /home/rkotler/compmc/build fixed the problem.

Lol.

Scanning dependencies of target check-llvm
[100%] Running the LLVM regression tests
Testing Time: 55.94s
   Expected Passes : 9548
   Expected Failures : 50
   Unsupported Tests : 148
[100%] Built target check-llvm
Scanning dependencies of target check
[100%] Built target check
rkotler@mipssw006:~/compmc/build$

Thanks.

Reed