Snapchat / djinni

A tool for generating cross-language type declarations and interface bindings. Djinni's new home is in the Snapchat org.
Apache License 2.0
166 stars 44 forks source link

Djinni build issue #146

Closed nmtitov closed 1 year ago

nmtitov commented 1 year ago

Hi guys, could you please take a look: PR https://github.com/Snapchat/djinni/pull/145

this fixed the following build error:

ERROR: /Users/hello/Developer/bazel/third_party/zlib/BUILD:39:19: Compiling third_party/zlib/gzlib.c [for tool] failed: (Exit 1): wrapped_clang failed: error executing command (from target //third_party/zlib:zlib_checked_in) external/local_config_cc/wrapped_clang ‘-D_FORTIFY_SOURCE=1’ -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 -DNDEBUG ‘-DNS_BLOCK_ASSERTIONS=1’ ... (remaining 34 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
third_party/zlib/gzlib.c:254:9: error: call to undeclared function ‘lseek’; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        LSEEK(state->fd, 0, SEEK_END);  /* so gzoffset() is correct */
        ^
third_party/zlib/gzlib.c:14:17: note: expanded from macro ‘LSEEK’
#  define LSEEK lseek
                ^
third_party/zlib/gzlib.c:254:9: note: did you mean ‘fseek’?
third_party/zlib/gzlib.c:14:17: note: expanded from macro ‘LSEEK’
#  define LSEEK lseek
                ^
/Applications/Xcode-14.3.0-RC2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/include/stdio.h:162:6: note: ‘fseek’ declared here
int      fseek(FILE *, long, int);
         ^
third_party/zlib/gzlib.c:260:24: error: call to undeclared function ‘lseek’; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        state->start = LSEEK(state->fd, 0, SEEK_CUR);
                       ^
third_party/zlib/gzlib.c:14:17: note: expanded from macro ‘LSEEK’
#  define LSEEK lseek
                ^
third_party/zlib/gzlib.c:361:9: error: call to undeclared function ‘lseek’; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    if (LSEEK(state->fd, state->start, SEEK_SET) == -1)
        ^
third_party/zlib/gzlib.c:14:17: note: expanded from macro ‘LSEEK’
#  define LSEEK lseek
                ^
third_party/zlib/gzlib.c:402:15: error: call to undeclared function ‘lseek’; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
        ret = LSEEK(state->fd, offset - (z_off64_t)state->x.have, SEEK_CUR);
              ^
third_party/zlib/gzlib.c:14:17: note: expanded from macro ‘LSEEK’
#  define LSEEK lseek
                ^
third_party/zlib/gzlib.c:498:14: error: call to undeclared function ‘lseek’; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    offset = LSEEK(state->fd, 0, SEEK_CUR);
             ^
third_party/zlib/gzlib.c:14:17: note: expanded from macro ‘LSEEK’
#  define LSEEK lseek
                ^
5 errors generated.