Closed nidhiag closed 4 years ago
That looks like one of the dependencies is somehow getting the wrong version installed or referenced. Perhaps an older version is cached while still matching compatibility rules. npm ls
might be helpful to see which versions are being used. This is the top of the output from my system - node-addon-api
seems to be the module that's actually throwing the error.
`-- ibmmq@0.9.14
+-- ffi-napi@3.0.1
| +-- debug@4.1.1
| | `-- ms@2.1.2
| +-- get-uv-event-loop-napi-h@1.0.6
| | `-- get-symbol-from-current-process-h@1.0.2 deduped
| +-- node-addon-api@2.0.1
| +-- node-gyp-build@4.2.2
| +-- ref-napi@2.0.2 deduped
| `-- ref-struct-di@1.1.0 deduped
That looks like one of the dependencies is somehow getting the wrong version installed or referenced. Perhaps an older version is cached while still matching compatibility rules.
npm ls
might be helpful to see which versions are being used. This is the top of the output from my system -node-addon-api
seems to be the module that's actually throwing the error.`-- ibmmq@0.9.14 +-- ffi-napi@3.0.1 | +-- debug@4.1.1 | | `-- ms@2.1.2 | +-- get-uv-event-loop-napi-h@1.0.6 | | `-- get-symbol-from-current-process-h@1.0.2 deduped | +-- node-addon-api@2.0.1 | +-- node-gyp-build@4.2.2 | +-- ref-napi@2.0.2 deduped | `-- ref-struct-di@1.1.0 deduped
npm ls is showing : ├── UNMET DEPENDENCY ibmmq@^0.9.14
after clearing the cache also i am getting same errors.
I was hitting a very similar issue yesterday. It went away when I upgraded Node to the latest version (14.4.0). Previously, I was running Node v10. NPM is currently at 6.14.5.
Your idea about the caching is probably right. On other interesting thing I found was that I was able to run an old install and it installed node-addon-api at 1.6.1. The failing run was using version 2 of this package. Perhaps this crept in with the move from ibmmq 9.13 --> 9.14?
@creasman @ibmmqmet What is the plan to fix this for node10
@nidhiag I'm not a contributor to this project... just a user like you. I was simply commenting on how I was able to work around a similar issue to yours. The Node dependencies for this project have changed recently and that is having all sorts of downstream effects. For instance, I used to be able to install this package into Debian-slim / Node 12 container as is. When I ran the same install yesterday seems I now have to first install Python, make, gcc and g++ before the node-gyp-build pre-req will install.
I had the same issue and fixed it by upgrading to nodejs 10.21. It seems node 10.20 is the minimal now. Found it out by stumbling on this: https://stackoverflow.com/questions/62352382/how-to-use-ffi-napi-in-google-cloud-functions-at-node-v10
I saw the same link yesterday - it doesn't seem to be mentioned in ffi-napi issues and the dependencies listed in its package.json just say "node 10". I'll add a more specific minimum version of 10.20 in this package's dependency list and README next time I update it. My systems already had 10.21 installed so the compile error didn't show up.
I upgraded my node to v10.21 facing below issues now:
CC(target) Release/obj.target/nothing/../node-addon-api/src/nothing.o
LIBTOOL-STATIC Release/nothing.a
CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o
CC(target) Release/obj.target/ffi/deps/libffi/src/types.o
CC(target) Release/obj.target/ffi/deps/libffi/src/raw_api.o
CC(target) Release/obj.target/ffi/deps/libffi/src/java_raw_api.o
CC(target) Release/obj.target/ffi/deps/libffi/src/closures.o
In file included from ../deps/libffi/src/closures.c:210:
../deps/libffi/src/dlmalloc.c:2932:33: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
used = fp - (m->topsize + TOP_FOOT_SIZE);
^~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:2932:33: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
used = fp - (m->topsize + TOP_FOOT_SIZE);
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:3289:39: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE;
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:3289:39: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE;
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:3383:41: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:3383:41: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:3461:40: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
^
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:2143:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
^
../deps/libffi/src/dlmalloc.c:3461:40: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
^
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:2143:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
^
../deps/libffi/src/dlmalloc.c:3475:51: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
asize = granularity_align(nb - m->topsize + TOP_FOOT_SIZE + SIZE_T_ONE);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
^
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:2143:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
^
../deps/libffi/src/dlmalloc.c:3475:51: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
asize = granularity_align(nb - m->topsize + TOP_FOOT_SIZE + SIZE_T_ONE);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
^
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:2143:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
^
../deps/libffi/src/dlmalloc.c:3487:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) {
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:3487:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
asize < nb + TOP_FOOT_SIZE + SIZE_T_ONE) {
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:3488:49: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
size_t esize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE - asize);
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
^
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:2143:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
^
../deps/libffi/src/dlmalloc.c:3488:49: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
size_t esize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE - asize);
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
^
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:2143:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
^
../deps/libffi/src/dlmalloc.c:3512:23: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE;
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:3512:23: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
size_t req = nb + TOP_FOOT_SIZE + SIZE_T_ONE;
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:3525:43: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
size_t asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
^
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:2143:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
^
../deps/libffi/src/dlmalloc.c:3525:43: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
size_t asize = granularity_align(nb + TOP_FOOT_SIZE + SIZE_T_ONE);
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
^
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:2143:6: note: expanded from macro 'granularity_align'
(((S) + (mparams.granularity)) & ~(mparams.granularity - SIZE_T_ONE))
^
../deps/libffi/src/dlmalloc.c:3535:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
if (ssize > nb + TOP_FOOT_SIZE) {
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:3535:26: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
if (ssize > nb + TOP_FOOT_SIZE) {
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:3555:47: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:3555:47: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:3559:64: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE);
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:3559:64: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE);
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:3627:59: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
if (!cinuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:3627:59: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
if (!cinuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
../deps/libffi/src/dlmalloc.c:3658:12: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1275:14: note: expanded from macro 'align_offset'
((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
^
../deps/libffi/src/dlmalloc.c:3658:12: warning: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension
[-Wnull-pointer-arithmetic]
pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */
^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:2188:17: note: expanded from macro 'TOP_FOOT_SIZE'
(align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
~~~~~~~~~~~~~^~~~~~~~~~~~~
../deps/libffi/src/dlmalloc.c:1688:55: note: expanded from macro 'chunk2mem'
#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
^
../deps/libffi/src/dlmalloc.c:1276:34: note: expanded from macro 'align_offset'
((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
^
28 warnings generated.
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi.o
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/ffi64.o
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/darwin.o
CC(target) Release/obj.target/ffi/deps/libffi/src/x86/darwin64.o
LIBTOOL-STATIC Release/libffi.a
CXX(target) Release/obj.target/ffi_bindings/src/ffi.o
CXX(target) Release/obj.target/ffi_bindings/src/callback_info.o
CXX(target) Release/obj.target/ffi_bindings/src/threaded_callback_invokation.o
SOLINK_MODULE(target) Release/ffi_bindings.node
ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame
Below is My Dependency List :
├─┬ ibmmq@0.9.14 │ ├─┬ ffi-napi@3.0.1 │ │ ├─┬ debug@4.1.1 │ │ │ └── ms@2.1.2 │ │ ├─┬ get-uv-event-loop-napi-h@1.0.6 │ │ │ └── get-symbol-from-current-process-h@1.0.2 deduped │ │ ├── node-addon-api@2.0.1 │ │ ├── node-gyp-build@4.2.2 │ │ ├── ref-napi@2.0.3 deduped │ │ └── ref-struct-di@1.1.1 deduped
Got the same issue too
@CloudZazu check out this [https://github.com/ibm-messaging/mq-mqi-nodejs/issues/87](check 87)
The compiler warnings seem to be just that - the code appears to work fine. Hopefully a future version of ffi-napi/ref-napi will do something about them. But there's nothing I can do in the MQ code.
Please include the following information in your ticket.
node -v v10.9.0
npm -v 6.2.0
npm i
is failing with below error :