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

Node Error on AIX #784

Closed
a4amitava opened this issue Aug 18, 2017 · 23 comments
Closed

Node Error on AIX #784

a4amitava opened this issue Aug 18, 2017 · 23 comments

Comments

@a4amitava
Copy link

a4amitava commented Aug 18, 2017

The node command on AIX v7.1 is not working , getting the below error . Please help !

exec(): 0509-036 Cannot load program node because of the following errors:
0509-130 Symbol resolution failed for node because:
0509-136 Symbol ZNKSt9type_infoeqERKS (number 345) is not exported from
dependent module /opt/freeware/lib/pthread/ppc64/libstdc++.a[libstdc++.so.6].
0509-192 Examine .loader section symbols with the
'dump -Tv' command.

@shellberg
Copy link

All current LTS Node.js levels have a minimum dependency on the GNU 4.8.x c++ libraries, because the binaries are compiled with GNU compilers, not XLC.

Check that you have those 32-/64-bit libraries installed (it will install multiple libraries in a sub-directory structure under /opt/freeware/lib depending on where POSIX thread support is needed). If not you can obtain the needed libraries from the Bull Freeware site.

@a4amitava
Copy link
Author

Hi ,

I checked libstdc++.a is at location

/opt/freeware/lib/pthread/ppc64/

Also, executed

ldd node cmd

and all the dependency shown without error . However , getting the same below error when executing node - version . Please help .

node - v
exec(): 0509-036 Cannot load program node because of the following errors:
0509-130 Symbol resolution failed for node because:
0509-136 Symbol ZNKSt9type_infoeqERKS (number 345) is not exported from
dependent module /opt/freeware/lib/pthread/ppc64/libstdc++.a[libstdc++.so.6].
0509-192 Examine .loader section symbols with the
'dump -Tv' command.

_```
Note : g++ -version returns the below version
gcc version 6.3.0 (GCC)

@shellberg
Copy link

shellberg commented Aug 21, 2017

Can you provide the output of:

lslpp -Lq | grep c++

and

ls -l /opt/freeware/lib/pthread/ppc64/

(specifically check that the linked file(s) is(are) present, and thus that the libstdc++.a symbolic link is valid)

And, I suspect that you actually ran 'gcc --version', rather than 'g++ --version'?
gcc/g++ v6.x is later than the v4.8 minimum dependency, but it still should provide libstdc++.so.6 support.

I'll see if I can get an installation based on gcc/g++ v6.3 working... check re-creation. Which build of node are you trying to use?

@a4amitava
Copy link
Author

a4amitava commented Aug 21, 2017

Hi Stephen ,
I am using node node-v6.10.1-aix-ppc64 . and below details the run output .

lslpp -Lq | grep c++ is throwing error "error: incorrect format: unknown tag" .
So executed rpm -qa | grep c++ and returned below

libstdc++-devel-6.3.0-1.ppc
libstdc++-6.3.0-1.ppc
gcc-c++-6.3.0-1.ppc

The another cmd ls -l /opt/freeware/lib/pthread/ppc64/ returns -

abiswas@ttwfmp04> ls -l /opt/freeware/lib/pthread/ppc64/
total 0

lrwxrwxrwx 1 root system 64 Aug 18 03:04 libatomic.a -> ../../gcc/powerpc-ibm-aix7.1.0.0/6.3.0/pthread/ppc64/libatomic.a
lrwxrwxrwx 1 root system 63 Aug 18 03:04 libgcc_s.a -> ../../gcc/powerpc-ibm-aix7.1.0.0/6.3.0/pthread/ppc64/libgcc_s.a
lrwxrwxrwx 1 root system 64 Aug 18 03:04 libstdc++.a -> ../../gcc/powerpc-ibm-aix7.1.0.0/6.3.0/pthread/ppc64/libstdc++.a

@gireeshpunathil
Copy link
Member

I fear we may not have tested with this level of crt / c++rt.
@shellberg I can test and debug, can you please internally setup a system of this and ping me details? If you are already on it, ignore me and go ahead, thanks.

@shellberg
Copy link

Hi @gireeshpunathil : yeah, I'm already on it! I've currently had a clean AIX 7.1 instance provisioned remotely, and I'm just fighting through the issues of getting the pre-requisite RPMs installed given we know that trying to maintain two (non-native) sets of GCC compilers and toolchains present on the same server environment is fraught with issues (based on prior past experience) : this is UNIX, so its possible, but just not straightforward.
And, I suspect when this issue is verified that we will need some further WPAR instances with later GCC compilers and toolchains in our testing infrastructure... lets discuss that offline.

@shellberg
Copy link

@a4amitava : OK, I've successfully verified/recreated the issue. Looking at the range of symbols that are exported by libstdc++ v6, I'm not expecting this to have a workaround ; I suspect that this will need a re-built node binary by GCC / g++ v6 tooling. However, we'll continue to dig into this and discuss if there are any other options available.

@a4amitava
Copy link
Author

@shellberg, Thanks for confirming the issue with v6. Can you suggest which version of gcc/g++ we should install in AIX 7.1 for node v6.10.1+

@shellberg
Copy link

Yes, certainly!
Any of the GCC/g++ 4.8.x levels. I'm pretty sure that we have instances in use (build, test) that cover all the 4.8.x binary bundles that Bull Freeware host. And, I know that I've personally installed 4.8.4 GCC / g++ into our SVT test infrastructure, and those do work.

In terms of due diligence, I'll try and check other sources of freeware packages (perzl.org) and see if I can verify that its not just a badly built package from Bull Freeware...

@gibfahn
Copy link
Member

gibfahn commented Aug 22, 2017

@a4amitava okay, it looks like you've uncovered an issue with Node on AIX! Thanks a lot for the helpful info. Now that this is a confirmed bug I'll reopen nodejs/node#14785.

I'll leave this thread open until you confirm that you've got it working with gcc 4.8.x, feel free to close it when you feel that that is resolved.

@shellberg
Copy link

Conducted further investigation today.
The problem appears to be introduced with the libstdc++ v5.x support, which happens to coincide with the introduction of C++11 support via a Dual ABI as supported by dual namespaces. We can recreate the issue with a standalone test case : its OK if compiled and run with the 5.4.0 gcc / g++ / libstdc++ combination, but fails if compiled with 4.9.2 gcc / g++ tooling and running against 5.4.0 libstdc++. Quite simply, it would seem that the backwards compatibility is lost across these v5 (and later) Freeware runtime builds, which might constitute their build defect - we'll file a report for their investigation.

As threatened, I also looked at other sources of freeware binary packages. And, as far as I could determine neither Perlz.org or the AIX Toolkit actually host any gcc / g++ or libstdc++ support later than 4.8.x. It seems that the only build binary packages for later/current gcc/g++ tooling is currently via Bull Freeware, albeit potentially vulnerable to this apparent backward compatibility problem.

@gibfahn
Copy link
Member

gibfahn commented Aug 23, 2017

@shellberg could you post in nodejs/node#14785 instead?

@a4amitava
Copy link
Author

a4amitava commented Aug 24, 2017

Hi Team ,
Wanted to check with you , whether npm can install angular cli on AIX v7.1 .
Please check if the below npm command works on AIX .

> npm install -g @ angular/cli 

https://github.com/angular/angular-cli

@shellberg
Copy link

@a4amitava : Yes, I can install @angular/cli to build the ng binary on AIX 7.1.
However, your command has an extra space between the '@' and the scoped package name... it should be:

npm install -g @angular/cli

The node / npm aspects are fine... there were some issues (pre-requisite tooling in my clean environment) during the node-gyp installation of the native components, but they were not hard to solve. Specifically, I had to manually associate 'cc' to 'gcc' for the C compiler, but that was about it (and could also be achieved in varying ways).

( I used gcc / g++ / libstdc++ 4.9.2 from Bull Freeware )

@gibfahn
Copy link
Member

gibfahn commented Aug 24, 2017

You should be able to do:

export CC=`which gcc`
export CXX=`which g++`
npm install -g @angular/cli

as long as the gcc and g++ in your path are the Bull Freeware ones.

@Knighton910
Copy link
Contributor

@a4amitava Do you still need help with this issue Or is it solved?

@a4amitava
Copy link
Author

Hi ,
I am getting below 404 error and other errors while installing CLI on AIX . I am not behind any proxy . The 404 URL also not available . Please help !

acle@ttwdfd> npm install -g @angular/cli
/app/ng2/node/bin/ng -> /app/ng2/node/lib/node_modules/@angular/cli/bin/ng

node-sass@4.5.3 install /app/ng2/node/lib/node_modules/@angular/cli/node_modules/node-sass
node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v4.5.3/aix-ppc64-48_binding.node
Cannot download "https://github.com/sass/node-sass/releases/download/v4.5.3/aix-ppc64-48_binding.node":

HTTP error 404 Not Found

Hint: If github.com is not accessible in your location
try setting a proxy via HTTP_PROXY, e.g.

export HTTP_PROXY=http://example.com:1234
or configure npm proxy via

npm config set proxy http://example.com:8080
node-sass@4.5.3 postinstall /app/ng2/node/lib/node_modules/@angular/cli/node_modules/node-sass
node scripts/build.js
Building: /app/ng2/node/bin/node /app/ng2/node/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/app/ng2/node/bin/node',
gyp verb cli '/app/ng2/node/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp@3.6.2
gyp info using node@6.10.1 | aix | ppc64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which succeeded python2 /usr/bin/python2
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /usr/bin/python2 -c import platform; print(platform.python_version());
gyp ERR! stack Traceback (most recent call last):
gyp ERR! stack File "/usr/bin/../../opt/freeware/lib/python2.7/site.py", line 548, in
gyp ERR! stack main()
gyp ERR! stack File "/usr/bin/../../opt/freeware/lib/python2.7/site.py", line 530, in main
gyp ERR! stack known_paths = addusersitepackages(known_paths)
gyp ERR! stack File "/usr/bin/../../opt/freeware/lib/python2.7/site.py", line 266, in addusersitepackages
gyp ERR! stack user_site = getusersitepackages()
gyp ERR! stack File "/usr/bin/../../opt/freeware/lib/python2.7/site.py", line 241, in getusersitepackages
gyp ERR! stack user_base = getuserbase() # this will also set USER_BASE
gyp ERR! stack File "/usr/bin/../../opt/freeware/lib/python2.7/site.py", line 231, in getuserbase
gyp ERR! stack USER_BASE = get_config_var('userbase')
gyp ERR! stack File "/opt/freeware/lib/python2.7/sysconfig.py", line 521, in get_config_var
gyp ERR! stack return get_config_vars().get(name)
gyp ERR! stack File "/opt/freeware/lib/python2.7/sysconfig.py", line 473, in get_config_vars
gyp ERR! stack _init_posix(_CONFIG_VARS)
gyp ERR! stack File "/opt/freeware/lib/python2.7/sysconfig.py", line 357, in _init_posix
gyp ERR! stack from _sysconfigdata import build_time_vars
gyp ERR! stack ImportError: No module named _sysconfigdata
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:204:12)
gyp ERR! stack at emitTwo (events.js:106:13)
gyp ERR! stack at ChildProcess.emit (events.js:191:7)
gyp ERR! stack at maybeClose (internal/child_process.js:886:16)
gyp ERR! stack at Socket. (internal/child_process.js:342:11)
gyp ERR! stack at emitOne (events.js:96:13)
gyp ERR! stack at Socket.emit (events.js:188:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:501:12)
gyp ERR! System AIX 7.1
gyp ERR! command "/app/ng2/node/bin/node" "/app/ng2/node/lib/node_modules/@angular/cli/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /app/ng2/node/lib/node_modules/@angular/cli/node_modules/node-sass
gyp ERR! node -v v6.10.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
/app/ng2/node/lib
-- @angular/cli@1.3.2-- UNMET OPTIONAL DEPENDENCY node-sass@^4.3.0

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/@angular/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"aix","arch":"ppc64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.5.3 (node_modules/@angular/cli/node_modules/node-sass):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: node-sass@4.5.3 postinstall: node scripts/build.js
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

@PreetamDas
Copy link

I am facing exactly same error. Provided all details below. Can you please advise and help ? Thanks

Could not load program node:
Symbol resolution failed for node because:
Symbol ZNKSt9type_infoeqERKS (number 346) is not exported from dependent
module /opt/freeware/lib/pthread/ppc64/libstdc++.a[libstdc++.so.6].
Examine .loader section symbols with the 'dump -Tv' command.

NODEJS Version : node-v6.11.2-aix-ppc64
AIX : 6.1.0.0 (OSLEVEL : 6100-09-02-1412)

#g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/lto-wrapper
Target: powerpc-ibm-aix6.1.0.0
Configured with: ../gcc-6.3.0/configure --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --with-local-prefix=/opt/freeware --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran,objc,obj-c++ --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --with-cloog=no --with-ppl=no --disable-libstdcxx-pch --enable-__cxa_atexit --host=powerpc-ibm-aix6.1.0.0
Thread model: aix
gcc version 6.3.0 (GCC)

#gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/freeware/libexec/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/lto-wrapper
Target: powerpc-ibm-aix6.1.0.0
Configured with: ../gcc-6.3.0/configure --prefix=/opt/freeware --mandir=/opt/freeware/man --infodir=/opt/freeware/info --with-local-prefix=/opt/freeware --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran,objc,obj-c++ --enable-version-specific-runtime-libs --disable-nls --enable-decimal-float=dpd --with-cloog=no --with-ppl=no --disable-libstdcxx-pch --enable-__cxa_atexit --host=powerpc-ibm-aix6.1.0.0
Thread model: aix
gcc version 6.3.0 (GCC)

#lslpp -Lq | grep c++

gcc-c++ 6.3.0-1 C R C++ support for GCC (/bin/rpm)
libstdc++ 4.2.4-1 C R GNU Standard C++ Library
libstdc++-devel 4.2.4-1 C R Header files and libraries for

LIBPATH=/opt/freeware/lib/pthread/ppc64
LD_LIBRARY_PATH=/opt/freeware/lib
libstdc++.a -> /opt/freeware/lib/pthread/ppc64/libstdc++.a

/opt/freeware/lib/libstdc++.a -> /opt/freeware/lib/pthread/ppc64/libstdc++.a

@gibfahn
Copy link
Member

gibfahn commented Sep 22, 2017

@PreetamDas My current understanding is that due to a breaking change in gcc, you'll have to use gcc 4.8.4 rather than 6.3.0 to link against.

We plan to change this with Node 8.x, so you will be able to use gcc 6.3.0 for that.

@gireeshpunathil
Copy link
Member

@gibfahn - just to sync up: my understanding is that we will either move to gcc 6.3.0 or will support it along with gcc 4.8.4, and we are progressing on our plans, please confirm? thanks!

@shellberg
Copy link

@gireeshpunathil - The situation remains the same for current LTS releases that they are only built and tested with gcc/g++ 4.8.4 on AIX (the 4.9.x levels had their own issues!). We've reset the milestone for moving to a later level, possibly 6.3.0, for the 10 stream preferably in time to develop the new 'current' release, or at worst for its conversion to 'LTS'.

@gireeshpunathil
Copy link
Member

thanks @shellberg for the clarification. In that case I am thinking of closing this out in favor of nodejs/build#925

@gireeshpunathil
Copy link
Member

Closing as we have already this one tracked under nodejs/build#925 .

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

6 participants