Closed erthink closed 8 years ago
@BohuTANG, could you test the devel-branch right now?
Also, please take a look to https://github.com/pmwkaa/ioarena/issues/3
Now the issues are(devel branch):
github/ioarena/src/ia_histogram.c: In function 'ia_histogram_print':
github/ioarena/src/ia_histogram.c:377:3: error: format '%zu' expects argument of type 'size_t', but argument 3 has type 'uint64_t' [-Werror=format=]
printf("\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> %s(%zu)\n", name, h->acc.n);
^
github/ioarena/src/ia_histogram.c:377:3: error: format '%zu' expects argument of type 'size_t', but argument 3 has type 'uint64_t' [-Werror=format=]
github/ioarena/src/ia_histogram.c:403:4: error: format '%zu' expects argument of type 'size_t', but argument 6 has type 'uint64_t' [-Werror=format=]
s += snprintf(s, line + sizeof(line) - s,
^
github/ioarena/src/ia_histogram.c:415:6: error: format '%zu' expects argument of type 'size_t', but argument 5 has type 'uint64_t' [-Werror=format=]
);
^
github/ioarena/src/ia_histogram.c:415:6: error: format '%zu' expects argument of type 'size_t', but argument 5 has type 'uint64_t' [-Werror=format=]
github/ioarena/src/ia_histogram.c:420:3: error: format '%zu' expects argument of type 'size_t', but argument 3 has type 'uint64_t' [-Werror=format=]
printf("total:%16s %16zu%7.2f%%\n", line, n, n * 1e2 / h->acc.n);
^
github/ioarena/src/ia_histogram.c:420:3: error: format '%zu' expects argument of type 'size_t', but argument 3 has type 'uint64_t' [-Werror=format=]
github/ioarena/src/ia_histogram.c: In function 'ia_histogram_rusage':
github/ioarena/src/ia_histogram.c:459:3: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'long long unsigned int' [-Werror=format=]
);
^
github/ioarena/src/ia_histogram.c:459:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'long long unsigned int' [-Werror=format=]
github/ioarena/src/ia_histogram.c:459:3: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'long long unsigned int' [-Werror=format=]
github/ioarena/src/ia_histogram.c:459:3: error: format '%ld' expects argument of type 'long int', but argument 2 has type 'long long unsigned int' [-Werror=format=]
github/ioarena/src/ia_histogram.c:459:3: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'long long unsigned int' [-Werror=format=]
github/ioarena/src/ia_histogram.c:459:3: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'long long unsigned int' [-Werror=format=]
github/ioarena/src/ia_histogram.c:489:4: error: format '%zu' expects argument of type 'size_t', but argument 3 has type 'long long unsigned int' [-Werror=format=]
);
^
github/ioarena/src/ia_histogram.c:489:4: error: format '%zu' expects argument of type 'size_t', but argument 4 has type 'long long unsigned int' [-Werror=format=]
github/ioarena/src/ia_histogram.c:489:4: error: format '%zu' expects argument of type 'size_t', but argument 5 has type 'long long unsigned int' [-Werror=format=]
github/ioarena/src/ia_histogram.c:489:4: error: format '%zu' expects argument of type 'size_t', but argument 3 has type 'long long unsigned int' [-Werror=format=]
github/ioarena/src/ia_histogram.c:489:4: error: format '%zu' expects argument of type 'size_t', but argument 4 has type 'long long unsigned int' [-Werror=format=]
github/ioarena/src/ia_histogram.c:489:4: error: format '%zu' expects argument of type 'size_t', but argument 5 has type 'long long unsigned int' [-Werror=format=]
cc1: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/ioarena.dir/ia_histogram.c.o] Error 1
make[1]: *** [src/CMakeFiles/ioarena.dir/all] Error 2
make: *** [all] Error 2
Oh, yeah. I have never compiled it on a 32-bit platform. No problem, will fix when I get a free time.
osx&gcc version:
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
$ uname -a
Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64
@BohuTANG, I fixed the clang-warnings a few days ago. Please check devel-branch again.
Hello, There still some issues (devel):
ioarena/src/ia.c:60:2: error: implicit declaration of function 'pthread_yield' [-Werror=implicit-function-declaration]
pthread_yield();
^
cc1: all warnings being treated as errors
make[2]: *** [src/CMakeFiles/ioarena.dir/ia.c.o] Error 1
make[1]: *** [src/CMakeFiles/ioarena.dir/all] Error 2
@BohuTANG, done one more ;)
Please try make -k
to collect the all errors/warnings.
@leo-yuriev
--- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt -target_link_libraries(${ia_binary} ${ia_libraries} m rt pthread) +target_link_libraries(${ia_binary} ${ia_libraries} m)
with this fix it's ok to me on OSX now.
@BohuTANG , I generalize your patch through the use of cmake. Please verify and close this issue.
@leo-yuriev Great work, it works on OSX now.
@BohuTANG , thank you.
Please, verify also the https://github.com/pmwkaa/ioarena/issues/3
Rhetorical question - does OSX conform to SUSv2 and/or POSIX.1-2001?