Open Nevensky opened 9 years ago
Apollo:librethinkdbxx-master Nevensky$ make mkdir -p build/gen python3 reql/gen.py reql/ql2.proto > build/gen/protocol_defs.h c++ -o build/obj/net.o -std=c++11 -I'build/gen' -Wall -pthread -fPIC -c src/net.cc -MP -MQ build/obj/net.o -MD -MF build/dep/net.d In file included from src/net.cc:9: src/error.h:26:46: error: use of undeclared identifier 'errno' return Error("%s: %s", str, strerror(errno)); ^ src/net.cc:273:61: warning: format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] if (debug_net > 0) fprintf(stderr, "[%zu] << %s\n", token_got, write_datum(d... ~~~ ^~~~~~~~~ %llu src/net.cc:319:57: warning: format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] if (debug_net > 0) fprintf(stderr, "[%zu] >> %s\n", token, query.c_str()); ~~~ ^~~~~ %llu 2 warnings and 1 error generated. make: *** [build/obj/net.o] Error 1
I added #include for errno.h to error.h but that only caused more errors
Apollo:librethinkdbxx-master Nevensky$ make c++ -o build/obj/net.o -std=c++11 -I'build/gen' -Wall -pthread -fPIC -c src/net.cc -MP -MQ build/obj/net.o -MD -MF build/dep/net.d src/net.cc:273:61: warning: format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] if (debug_net > 0) fprintf(stderr, "[%zu] << %s\n", token_got, write_datum(d... ~~~ ^~~~~~~~~ %llu src/net.cc:319:57: warning: format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'uint64_t' (aka 'unsigned long long') [-Wformat] if (debug_net > 0) fprintf(stderr, "[%zu] >> %s\n", token, query.c_str()); ~~~ ^~~~~ %llu 2 warnings generated. c++ -o build/obj/datum.o -std=c++11 -I'build/gen' -Wall -pthread -fPIC -c src/datum.cc -MP -MQ build/obj/datum.o -MD -MF build/dep/datum.d c++ -o build/obj/json.o -std=c++11 -I'build/gen' -Wall -pthread -fPIC -c src/json.cc -MP -MQ build/obj/json.o -MD -MF build/dep/json.d src/json.cc:166:1: error: unknown type name 'locale_t' locale_t locale_c() { ^ src/json.cc:167:12: error: unknown type name 'locale_t' static locale_t ret = nullptr; ^ src/json.cc:170:25: error: use of undeclared identifier 'LC_ALL_MASK' ret = newlocale(LC_ALL_MASK, "C", nullptr); ^ src/json.cc:195:21: error: use of undeclared identifier 'strtod_l'; did you mean 'strtok_r'? double number = strtod_l(buf, &end, locale_c()); ^~~~~~~~ strtok_r /usr/include/string.h:104:7: note: 'strtok_r' declared here char *strtok_r(char *, const char *, char **); ^ src/json.cc:195:35: error: cannot initialize a parameter of type 'const char *' with an rvalue of type 'char **' double number = strtod_l(buf, &end, locale_c()); ^~~~ /usr/include/string.h:104:36: note: passing argument to parameter here char *strtok_r(char *, const char *, char **); ^ 5 errors generated. make: *** [build/obj/json.o] Error 1
I'll see if I can fix that.
There's a possible fix in the osx branch (102323ed212b131ac8ec5d50a1d3535ed8a1e5c1)
I added #include for errno.h to error.h but that only caused more errors