Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run build/run tests #1

Closed
triss opened this issue Jun 18, 2016 · 3 comments
Closed

Unable to run build/run tests #1

triss opened this issue Jun 18, 2016 · 3 comments

Comments

@triss
Copy link

triss commented Jun 18, 2016

On 64bit Linux - Ubuntu 16.04:

make config=debug_sse test && bin/debug/test fails with:

==== Building lib (release_sse) ====
Creating bin/release
Creating obj/sse/release/lib
adjacency.c
In file included from src/data/adjacency.c:6:0:
src/math/math.h: In function ‘ct_clz8’:
src/math/math.h:60:6: error: #elif with no expression
 #elif
      ^
lib.make:202: recipe for target 'obj/sse/release/lib/adjacency.o' failed
make[1]: *** [obj/sse/release/lib/adjacency.o] Error 1
Makefile:56: recipe for target 'lib' failed
make: *** [lib] Error 2

changing line 60 in math.h from #elif to #else clears the above issue.

After making this fix tests still won't build and following issue is reported:

==== Building test (debug_sse) ====
object.c
In file included from src/common/dbg.h:6:0,
                 from src/data/object.c:5:
src/data/object.c: In function ‘ct_object_tostring’:
src/config.h:27:21: error: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 6 has type ‘int’ [-Werror=format=]
 #define CT_ANSI_RED "\x1b[31;1m"
                     ^
src/common/dbg.h:26:11: note: in expansion of macro ‘CT_ANSI_RED’
           CT_ANSI_RED "[ERROR] (%s:%d, err: %s) " M CT_ANSI_RESET "\n", \
           ^~~~~~~~~~~
src/common/dbg.h:52:5: note: in expansion of macro ‘CT_ERROR’
     CT_ERROR(M, ##__VA_ARGS__); \
     ^~~~~~~~
src/data/object.c:86:3: note: in expansion of macro ‘CT_CHECK’
   CT_CHECK(__impls_itostring[o->tag.type].tostring != NULL,
   ^~~~~~~~
cc1: all warnings being treated as errors
test.make:237: recipe for target 'obj/sse/debug/test/object.o' failed
make[1]: *** [obj/sse/debug/test/object.o] Error 1
Makefile:50: recipe for target 'test' failed
make: *** [test] Error 2
@postspectacular
Copy link
Member

just pushed an update, can you please check once more? (thx for your help)

@triss
Copy link
Author

triss commented Jun 18, 2016

That's cleared the above issue...

New problem in hashfn.c now though:

src/math/hashfn.c: In function ‘ct_murmur3_32’:
src/math/hashfn.c:33:50: error: dereferencing ‘void *’ pointer [-Werror]
   const uint8_t *tail    = (const uint8_t *)&data[numBlocks << 2];
                                                  ^
cc1: all warnings being treated as errors
test.make:270: recipe for target 'obj/sse/debug/test/hashfn.o' failed
make[1]: *** [obj/sse/debug/test/hashfn.o] Error 1
Makefile:50: recipe for target 'test' failed
make: *** [test] Error 2

@postspectacular
Copy link
Member

Oki, fixed some more minor things and update build scripts managed to test w/ gcc:

gcc-6 -v
# gcc version 6.1.1 20160511 (Ubuntu 6.1.1-3ubuntu11~14.04.1)

CC=gcc-6
export CC

rm -rf bin/ obj/

# IMPORTANT! regenerate make files
premake5 gmake

make config=release_sse test
bin/release/test
[INFO] (test/main.c:96) ----- RUN TESTS: all_tests -----
[INFO] (test/main.c:47) using SSE...
[INFO] (test/main.c:50) using SSE2...
[INFO] (test/main.c:53) using SSE3...
[INFO] (test/main.c:56) using SSE4...
....
[INFO] (test/main.c:96) Tests run: 27, total asserts: 292
[SUCCESS] (test/main.c:96) ALL TESTS PASSED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants