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

error: implicit declaration of function 'lseek' is invalid in C99 #29

Open
erick785 opened this issue Aug 12, 2021 · 0 comments
Open

error: implicit declaration of function 'lseek' is invalid in C99 #29

erick785 opened this issue Aug 12, 2021 · 0 comments

Comments

@erick785
Copy link

macos 10.15.7

node v8.17.0

npm v6.13.4

33 warnings generated.
  CC(target) Release/obj.target/phash/deps/pHash/phcomplex.o

  LIBTOOL-STATIC Release/phash.a
  CC(target) Release/obj.target/zlib/deps/zlib/adler32.o
  CC(target) Release/obj.target/zlib/deps/zlib/compress.o
  CC(target) Release/obj.target/zlib/deps/zlib/crc32.o
  CC(target) Release/obj.target/zlib/deps/zlib/deflate.o
  CC(target) Release/obj.target/zlib/deps/zlib/gzclose.o
  CC(target) Release/obj.target/zlib/deps/zlib/gzlib.o
../deps/zlib/gzlib.c:256:24: error: implicit declaration of function 'lseek' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        state->start = LSEEK(state->fd, 0, SEEK_CUR);
                       ^
../deps/zlib/gzlib.c:14:17: note: expanded from macro 'LSEEK'
#  define LSEEK lseek
                ^
../deps/zlib/gzlib.c:256:24: note: did you mean 'fseek'?
../deps/zlib/gzlib.c:14:17: note: expanded from macro 'LSEEK'
#  define LSEEK lseek
                ^
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:162:6: note: 'fseek' declared here
int      fseek(FILE *, long, int);
         ^
../deps/zlib/gzlib.c:355:9: error: implicit declaration of function 'lseek' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    if (LSEEK(state->fd, state->start, SEEK_SET) == -1)
        ^
../deps/zlib/gzlib.c:14:17: note: expanded from macro 'LSEEK'
#  define LSEEK lseek
                ^
../deps/zlib/gzlib.c:396:15: error: implicit declaration of function 'lseek' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR);
              ^
../deps/zlib/gzlib.c:14:17: note: expanded from macro 'LSEEK'
#  define LSEEK lseek
                ^
../deps/zlib/gzlib.c:492:14: error: implicit declaration of function 'lseek' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    offset = LSEEK(state->fd, 0, SEEK_CUR);
             ^
../deps/zlib/gzlib.c:14:17: note: expanded from macro 'LSEEK'
#  define LSEEK lseek
                ^
4 errors generated.
make: *** [Release/obj.target/zlib/deps/zlib/gzlib.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/yanchenxu/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/Users/yanchenxu/.nvm/versions/node/v8.17.0/bin/node" "/Users/yanchenxu/.nvm/versions/node/v8.17.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/yanchenxu/go/src/github.com/blockchain-experiment/实验3 版权/hyperledger-digital-rights/digital_rights/node_modules/phash
gyp ERR! node -v v8.17.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/yanchenxu/.npm/_logs/2021-08-12T08_50_09_295Z-debug.log
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

1 participant