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

compiling on mac fails. #6

Open
Nevensky opened this issue Sep 3, 2015 · 2 comments
Open

compiling on mac fails. #6

Nevensky opened this issue Sep 3, 2015 · 2 comments

Comments

@Nevensky
Copy link

Nevensky commented Sep 3, 2015

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
@AtnNn
Copy link
Owner

AtnNn commented Sep 4, 2015

I'll see if I can fix that.

@AtnNn
Copy link
Owner

AtnNn commented Sep 4, 2015

There's a possible fix in the osx branch (102323e)

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