ibmruntimes / node

This repository is moving to: https://github.com/ibmruntimes/node-zos
69 stars 24 forks source link

"npm install ref" fails on z/OS compiler error CNJ5200 option "-fno-omit-frame-pointer" not supported #118

Open mmueller-sag opened 5 years ago

mmueller-sag commented 5 years ago

When trying to install package 'ffi' the package 'ref' comes as a prerequisite.

Is this some problem of the z/OS runtime? How can it be fixed?

Here is the more detailed output

ref@1.3.5 install /u/mm/p/node-v6.14.4-os390-s390x/bin/node_modules/ref node-gyp rebuild

make: Entering directory '/u/mm/p/node-v6.14.4-os390-s390x/bin/node_modules/ref/build' CXX(target) Release/obj.target/binding/src/binding.o error: CNJ5200 The option "-fno-omit-frame-pointer" is not supported. error: CNJ5200 The option "-fno-omit-frame-pointer" is not supported. ../src/binding_temp.cc:325:42: warning: data argument not used by format string [-Wformat-extra-args] snprintf(strbuf, 128, "\x25" PRId64, val);


../src/binding_temp.cc:412:42: warning: data argument not used by format string [-Wformat-extra-args]
    snprintf(strbuf, 128, "\x25" PRIu64, val);
                          ~~~~~~~~~~~~~  ^
../src/binding_temp.cc:640:8: warning: 'ForceSet' is deprecated [-Wdeprecated-declarations]
  Nan::ForceSet(target, Nan::New<v8::String>("\x65\x6e\x64\x69\x61\x6e\x6e\x65\x73\x73").ToLocalChecked(), Nan::New<v8::String>(CheckEndia...
       ^
../../nan/nan_maybe_43_inl_temp.h:130:35: note: 'ForceSet' has been explicitly marked deprecated here
NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                  ^
../src/binding_temp.cc:641:8: warning: 'ForceSet' is deprecated [-Wdeprecated-declarations]
  Nan::ForceSet(target, Nan::New<v8::String>("\x4e\x55\x4c\x4c").ToLocalChecked(), WrapNullPointer(), static_cast<PropertyAttribute>(ReadO...
       ^
../../nan/nan_maybe_43_inl_temp.h:130:35: note: 'ForceSet' has been explicitly marked deprecated here
NAN_DEPRECATED inline Maybe<bool> ForceSet(
                                  ^
4 warnings and 1 error generated.
Error while processing ../src/binding_temp.cc.
CNJ0793(I) Compilation failed for file ../src/binding_temp.cc.  Object file not created.
binding.target.mk:88: recipe for target 'Release/obj.target/binding/src/binding.o' failed
make: *** [Release/obj.target/binding/src/binding.o] Error 12
make: Leaving directory '/u/mm/p/node-v6.14.4-os390-s390x/bin/node_modules/ref/build'
joransiu commented 5 years ago

@mmueller-sag : Did you install a different version of npm or node-gyp? I suspect that the option error is related to using a node-gyp level that is not "zOS" aware.

Can you confirm with the specific versions of npm and/or node-gyp you are currently using?

bnoordhuis commented 5 years ago

I'm reasonably sure (say 95%) that -fno-omit-framepointer is inherited from node's common.gypi. node-gyp includes that file when it builds an add-on.

That switch is currently enabled on all platforms except windows and macos. Perhaps z/os should be added to the list as well?

richardlau commented 5 years ago

I'm reasonably sure (say 95%) that -fno-omit-framepointer is inherited from node's common.gypi. node-gyp includes that file when it builds an add-on.

That switch is currently enabled on all platforms except windows and macos. Perhaps z/os should be added to the list as well?

It is on the copy of common.gypi in this repository https://github.com/ibmruntimes/node/blob/0b5af754618ac0f7585de52550b77aa92c94b4e7/common.gypi#L146-L148 but I think node-gyp uses the one from the headers tarball unless --nodedir is used?

bnoordhuis commented 5 years ago

but I think node-gyp uses the one from the headers tarball unless --nodedir is used?

Correct.