help icon indicating copy to clipboard operation
help copied to clipboard

Node Error on AIX

Open a4amitava opened this issue 9 years ago • 23 comments

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.

a4amitava avatar Aug 18 '17 12:08 a4amitava

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.

shellberg avatar Aug 18 '17 14:08 shellberg

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)

a4amitava avatar Aug 21 '17 10:08 a4amitava

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?

shellberg avatar Aug 21 '17 11:08 shellberg

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

a4amitava avatar Aug 21 '17 12:08 a4amitava

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.

gireeshpunathil avatar Aug 22 '17 04:08 gireeshpunathil

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 avatar Aug 22 '17 10:08 shellberg

@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.

shellberg avatar Aug 22 '17 15:08 shellberg

@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+

a4amitava avatar Aug 22 '17 16:08 a4amitava

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...

shellberg avatar Aug 22 '17 16:08 shellberg

@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 https://github.com/nodejs/node/issues/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.

gibfahn avatar Aug 22 '17 16:08 gibfahn

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.

shellberg avatar Aug 23 '17 16:08 shellberg

@shellberg could you post in https://github.com/nodejs/node/issues/14785 instead?

gibfahn avatar Aug 23 '17 17:08 gibfahn

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

a4amitava avatar Aug 24 '17 10:08 a4amitava

@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 )

shellberg avatar Aug 24 '17 15:08 shellberg

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.

gibfahn avatar Aug 24 '17 17:08 gibfahn

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

Knighton910 avatar Aug 31 '17 18:08 Knighton910

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

[email protected] 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 [email protected] 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 [email protected] gyp info using [email protected] | 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/[email protected] 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 [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"aix","arch":"ppc64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/@angular/cli/node_modules/node-sass): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] postinstall: node scripts/build.js npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

a4amitava avatar Sep 04 '17 03:09 a4amitava

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

PreetamDas avatar Sep 22 '17 16:09 PreetamDas

@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.

gibfahn avatar Sep 22 '17 16:09 gibfahn

@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!

gireeshpunathil avatar Mar 21 '18 04:03 gireeshpunathil