Closed inpefess closed 9 months ago
Is this definitely failing while linking the main Vampire executable? Test code shouldn't be linked to that, so this is very surprising! Let's fix this first and go back to #518.
If you run make VERBOSE=1
, what do you get?
So, to reproduce (on Cygwin):
git clone https://github.com/vprover/vampire
cd vampire
mkdir test_build
cd test_build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make -j11 VERBOSE=1 > build.log 2>&1
@joe-hauns - sorry to disturb with IJCAR/LPAR coming up, but do you know how this works?
I'm not actually sure how this compiles on my machine/CI. There's a template for Pretty<T>
, specialised to various things, including Pretty<Literal *>
(I think this one's redundant with respect to the existing T *
specialisation), Pretty<Literal>
, and Pretty<Clause>
.
These last three are declared and defined in TestUtils.cpp
, but are probably also used elsewhere (?). I think they probably want to get at least declared in the header file.
Yeah so the issue is definitely that the test code is being compiled into the main binary.
I think i fixed this one issue (try compiling the branch cygwin-test-fix
), but as compiling the tests into main is not expected there might be other issues coming up from time to time, e.g. if someone uses the same function names in multiple tests (e.g. test01
or other informative names ;) ), so test functions should not be compiled into main after all.
Yeah so the issue is definitely that the test code is being compiled into the main binary.
Ah, sorry, I forgot to mention that - it isn't, just looks like it because of the multicore build output. Looking at the build log the failed command links vtest.exe
...but it sounds like you expect each test to be a separate binary?
Oh well actually you're right there. The tests are really one binary. I forgot that the TEST_FUN
macro appends a prefix to every test function to prevent the error with test01
i was hinting at. So everything sould be fine if we merge cygwin-test-fix
(given this actually fixes the issue for that compiler).
I confirm that cygwin-test-fix
builds under Cygwin and all the tests pass. @joe-hauns thank you!
Merged directly, thanks @joe-hauns !
I followed instruction from wiki https://github.com/vprover/vampire/wiki/Cygwin
cmake ..
and thenmake
builds with no errors.But after
cmake .. -DCMAKE_BUILD_TYPE=Debug
,make
fails with the following errors: