discord / erlpack

High Performance Erlang Term Format Packer
MIT License
217 stars 64 forks source link

Fails to compile on Ubuntu #39

Closed ExperiBass closed 2 years ago

ExperiBass commented 3 years ago

Logs:

➜  Kamiyu pnpm i erlpack
Packages: +40
++++++++++++++++++++++++++++++++++++++++
node_modules/.pnpm/zlib-sync@0.1.7/node_modules/zlib-sync: Running install script...
node_modules/.pnpm/github.com+discord+erlpack@e27db8f82892bdb9b28a0547cc394d68b5d2242d/node_modules/erlpack: Running install scrinode_modules/.pnpm/github.com+discord+erlpack@e27db8f82892bdb9b28a0547cc394d68b5d2242d/node_modules/erlpack: Running install script, failed in 6.9s/bufferutil@4.0.3/node_modules/bufferutil: Running install script, done in 415ms
.../node_modules/erlpack install$ node-gyp rebuild
│ gyp info it worked if it ends with ok
│ gyp info using node-gyp@8.1.0
│ gyp info using node@16.4.0 | linux | x64
│ gyp info find Python using Python version 3.8.5 found at "/usr/bin/python3"
│ (node:4790) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
│ (Use `node --trace-deprecation ...` to show where the warning was created)
│ gyp info spawn /usr/bin/python3
│ gyp info spawn args [
│ gyp info spawn args   '/usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.9.1/node_modules/pnpm/dist/node_modules/node-gyp/gyp/gyp_
│ gyp info spawn args   'binding.gyp',
│ gyp info spawn args   '-f',
│ gyp info spawn args   'make',
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/home/gingkathfox/Kamiyu/node_modules/.pnpm/github.com+discord+erlpack@e27db8f82892bdb9b28a0547cc394d6
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.9.1/node_modules/pnpm/dist/node_modules/node-gyp/addon.gy
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/home/gingkathfox/.cache/node-gyp/16.4.0/include/node/common.gypi',
│ gyp info spawn args   '-Dlibrary=shared_library',
│ gyp info spawn args   '-Dvisibility=default',
│ gyp info spawn args   '-Dnode_root_dir=/home/gingkathfox/.cache/node-gyp/16.4.0',
│ gyp info spawn args   '-Dnode_gyp_dir=/usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.9.1/node_modules/pnpm/dist/node_modules/no
│ gyp info spawn args   '-Dnode_lib_file=/home/gingkathfox/.cache/node-gyp/16.4.0/<(target_arch)/node.lib',
│ gyp info spawn args   '-Dmodule_root_dir=/home/gingkathfox/Kamiyu/node_modules/.pnpm/github.com+discord+erlpack@e27db8f82892b
│ gyp info spawn args   '-Dnode_engine=v8',
│ gyp info spawn args   '--depth=.',
│ gyp info spawn args   '--no-parallel',
│ gyp info spawn args   '--generator-output',
│ gyp info spawn args   'build',
│ gyp info spawn args   '-Goutput_dir=.'
│ gyp info spawn args ]
│ gyp info spawn make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│ make: Entering directory '/home/gingkathfox/Kamiyu/node_modules/.pnpm/github.com+discord+erlpack@e27db8f82892bdb9b28a0547cc39
│   CC(target) Release/obj.target/zlib/vendor/zlib/adler32.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/compress.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/crc32.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/deflate.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/gzclose.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/gzlib.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/gzread.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/gzwrite.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/infback.o
│ ../vendor/zlib/infback.c: In function ‘inflateBack’:
│ ../vendor/zlib/infback.c:479:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│   479 |             state->mode = LEN;
│       |             ~~~~~~~~~~~~^~~~~
│ ../vendor/zlib/infback.c:481:9: note: here
│   481 |         case LEN:
│       |         ^~~~
│   CC(target) Release/obj.target/zlib/vendor/zlib/inffast.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/inflate.o
│ ../vendor/zlib/inflate.c: In function ‘inflateMark’:
│ ../vendor/zlib/inflate.c:1507:61: warning: left shift of negative value [-Wshift-negative-value]
│  1507 |     if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
│       |                                                             ^~
│ ../vendor/zlib/inflate.c: In function ‘inflate’:
│ ../vendor/zlib/inflate.c:720:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│   720 |             state->mode = EXLEN;
│       |             ~~~~~~~~~~~~^~~~~~~
│ ../vendor/zlib/inflate.c:721:9: note: here
│   721 |         case EXLEN:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:732:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│   732 |             state->mode = EXTRA;
│       |             ~~~~~~~~~~~~^~~~~~~
│ ../vendor/zlib/inflate.c:733:9: note: here
│   733 |         case EXTRA:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:754:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│   754 |             state->mode = NAME;
│       |             ~~~~~~~~~~~~^~~~~~
│ ../vendor/zlib/inflate.c:755:9: note: here
│   755 |         case NAME:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:775:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│   775 |             state->mode = COMMENT;
│       |             ~~~~~~~~~~~~^~~~~~~~~
│ ../vendor/zlib/inflate.c:776:9: note: here
│   776 |         case COMMENT:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:795:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│   795 |             state->mode = HCRC;
│       |             ~~~~~~~~~~~~^~~~~~
│ ../vendor/zlib/inflate.c:796:9: note: here
│   796 |         case HCRC:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:818:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│   818 |             state->mode = DICT;
│       |             ~~~~~~~~~~~~^~~~~~
│ ../vendor/zlib/inflate.c:819:9: note: here
│   819 |         case DICT:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:825:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│   825 |             state->mode = TYPE;
│       |             ~~~~~~~~~~~~^~~~~~
│ ../vendor/zlib/inflate.c:826:9: note: here
│   826 |         case TYPE:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:827:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
│   827 |             if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;
│       |                ^
│ ../vendor/zlib/inflate.c:828:9: note: here
│   828 |         case TYPEDO:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:877:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
│   877 |             if (flush == Z_TREES) goto inf_leave;
│       |                ^
│ ../vendor/zlib/inflate.c:878:9: note: here
│   878 |         case COPY_:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:879:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│   879 |             state->mode = COPY;
│       |             ~~~~~~~~~~~~^~~~~~
│ ../vendor/zlib/inflate.c:880:9: note: here
│   880 |         case COPY:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:1018:16: warning: this statement may fall through [-Wimplicit-fallthrough=]
│  1018 |             if (flush == Z_TREES) goto inf_leave;
│       |                ^
│ ../vendor/zlib/inflate.c:1019:9: note: here
│  1019 |         case LEN_:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:1020:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│  1020 |             state->mode = LEN;
│       |             ~~~~~~~~~~~~^~~~~
│ ../vendor/zlib/inflate.c:1021:9: note: here
│  1021 |         case LEN:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:1069:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│  1069 |             state->mode = LENEXT;
│       |             ~~~~~~~~~~~~^~~~~~~~
│ ../vendor/zlib/inflate.c:1070:9: note: here
│  1070 |         case LENEXT:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:1079:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│  1079 |             state->mode = DIST;
│       |             ~~~~~~~~~~~~^~~~~~
│ ../vendor/zlib/inflate.c:1080:9: note: here
│  1080 |         case DIST:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:1106:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│  1106 |             state->mode = DISTEXT;
│       |             ~~~~~~~~~~~~^~~~~~~~~
│ ../vendor/zlib/inflate.c:1107:9: note: here
│  1107 |         case DISTEXT:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:1122:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│  1122 |             state->mode = MATCH;
│       |             ~~~~~~~~~~~~^~~~~~~
│ ../vendor/zlib/inflate.c:1123:9: note: here
│  1123 |         case MATCH:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:1197:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│  1197 |             state->mode = LENGTH;
│       |             ~~~~~~~~~~~~^~~~~~~~
│ ../vendor/zlib/inflate.c:1198:9: note: here
│  1198 |         case LENGTH:
│       |         ^~~~
│ ../vendor/zlib/inflate.c:1210:25: warning: this statement may fall through [-Wimplicit-fallthrough=]
│  1210 |             state->mode = DONE;
│       |             ~~~~~~~~~~~~^~~~~~
│ ../vendor/zlib/inflate.c:1211:9: note: here
│  1211 |         case DONE:
│       |         ^~~~
│   CC(target) Release/obj.target/zlib/vendor/zlib/inftrees.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/trees.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/uncompr.o
│   CC(target) Release/obj.target/zlib/vendor/zlib/zutil.o
│   AR(target) Release/obj.target/vendor/zlib.a
│   COPY Release/zlib.a
│   CXX(target) Release/obj.target/erlpack/js/erlpack.o
│ In file included from /home/gingkathfox/.cache/node-gyp/16.4.0/include/node/v8.h:30,
│                  from /home/gingkathfox/.cache/node-gyp/16.4.0/include/node/node.h:63,
│                  from ../../../../nan@2.14.2/node_modules/nan/nan.h:56,
│                  from ../js/erlpack.cc:1:
│ /home/gingkathfox/.cache/node-gyp/16.4.0/include/node/v8-internal.h: In function ‘void v8::internal::PerformCastCheck(T*)’:
│ /home/gingkathfox/.cache/node-gyp/16.4.0/include/node/v8-internal.h:454:38: error: ‘remove_cv_t’ is not a member of ‘std’; di
│   454 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
│       |                                      ^~~~~~~~~~~
│       |                                      remove_cv
│ /home/gingkathfox/.cache/node-gyp/16.4.0/include/node/v8-internal.h:454:38: error: ‘remove_cv_t’ is not a member of ‘std’; di
│   454 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
│       |                                      ^~~~~~~~~~~
│       |                                      remove_cv
│ /home/gingkathfox/.cache/node-gyp/16.4.0/include/node/v8-internal.h:454:50: error: template argument 2 is invalid
│   454 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
│       |                                                  ^
│ /home/gingkathfox/.cache/node-gyp/16.4.0/include/node/v8-internal.h:454:63: error: ‘::Perform’ has not been declared
│   454 |             !std::is_same<Data, std::remove_cv_t<T>>::value>::Perform(data);
│       |                                                               ^~~~~~~
│ In file included from ../js/erlpack.cc:3:
│ ../js/decoder.h: In member function ‘v8::Local<v8::Value> Decoder::decodeBig(uint32_t)’:
│ ../js/decoder.h:260:62: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
│   260 |         const uint8_t length = static_cast<const uint8_t>(res);
│       |                                                              ^
│ In file included from ../../../../nan@2.14.2/node_modules/nan/nan.h:56,
│                  from ../js/erlpack.cc:1:
│ ../js/erlpack.cc: At global scope:
│ /home/gingkathfox/.cache/node-gyp/16.4.0/include/node/node.h:806:43: warning: cast between incompatible function types from ‘
│   806 |       (node::addon_register_func) (regfunc),                          \
│       |                                           ^
│ /home/gingkathfox/.cache/node-gyp/16.4.0/include/node/node.h:840:3: note: in expansion of macro ‘NODE_MODULE_X’
│   840 |   NODE_MODULE_X(modname, regfunc, NULL, 0)  // NOLINT (readability/null_usage)
│       |   ^~~~~~~~~~~~~
│ ../js/erlpack.cc:49:1: note: in expansion of macro ‘NODE_MODULE’
│    49 | NODE_MODULE(erlpack, Init);
│       | ^~~~~~~~~~~
│ make: *** [erlpack.target.mk:120: Release/obj.target/erlpack/js/erlpack.o] Error 1
│ gyp ERR! build error 
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack     at ChildProcess.onExit (/usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.9.1/node_modules/pnpm/dist/node_modul
│ gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
│ gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
│ gyp ERR! System Linux 5.8.0-1035-gcp
│ gyp ERR! command "/usr/bin/node" "/usr/pnpm-global/5/node_modules/.pnpm/pnpm@6.9.1/node_modules/pnpm/dist/node_modules/node-g
│ gyp ERR! cwd /home/gingkathfox/Kamiyu/node_modules/.pnpm/github.com+discord+erlpack@e27db8f82892bdb9b28a0547cc394d68b5d2242d/
│ gyp ERR! node -v v16.4.0
│ gyp ERR! node-gyp -v v8.1.0
│ gyp ERR! not ok 
│ make: Leaving directory '/home/gingkathfox/Kamiyu/node_modules/.pnpm/github.com+discord+erlpack@e27db8f82892bdb9b28a0547cc394
└─ Failed in 6.9s
node_modules/.pnpm/bufferutil@4.0.3/node_modules/bufferutil: Running install script, done in 415ms
node_modules/.pnpm/utf-8-validate@5.0.5/node_modules/utf-8-validate: Running install script, done in 459ms
Progress: resolved 40, reused 40, downloaded 0, added 0, done
 ERROR  Command failed with exit code 1.
schw3i commented 3 years ago

erlpack doesn't support node 16 yet

ExperiBass commented 3 years ago

erlpack doesn't support node 16 yet

Well shit

TheSupercomputer commented 2 years ago

And it still doesn't where else Discord.js requires Node16.

schw3i commented 2 years ago

And it still doesn't where else Discord.js requires Node16.

Sorry if I misunderstand what you are saying but doesn't discord.js v13.x require Node 16?

Numynum commented 2 years ago

@schwei23 image discord.js v13.x does require node 16 and erlpack supposedly supports node16 since august 7th (https://github.com/discord/erlpack/commit/797aca10a34da385685bc638f0290891fa761453) but because erlpack hasn't updated their version nr in 2 years (!!), anyone sitting with a cached v0.1.3 version will not see updates 😔