Repository navigation
LIBPATH issue in AIX node binary #25444
Description
Activity
- addedaixIssues and PRs related to the AIX platform.Issues and PRs related to the AIX platform.
on Jan 11, 2019 cc @nodejs/platform-ppc (we don't have an aix team? We don't have an aix team.)
@ayappanec a couple of things to confirm
- is this additive, ie it will not affect picking up the library from wherever it would have been found without the option
- does this handle (or at least not break) the case where there are 2 compilers installed on the machine. We have both the default and gcc 6.3 compilers installed on the same machine as we need to build
different versions with different gcc levels. Due to some issues with getting them both working we have
gcc 6.3 installed in a different location than norma. Want to be sure that it adding this would not cause
that configuration any issues.
@gireeshpunathil, @gdams FYI as well.
I guess we expect the production systems to have only one c++ runtime, that too in the default path ('/lib:/usr/lib').
So hard-coding expectations to a non-standard path may cause unwanted issues for users?
On the other hand, as @mhdawson pointed out, our dev systems are configured with non-standard path for accommodating multiple toolchains, to build and test multiple versions of node that link against different runtimes.
@ayappanec - does that sound reasonable to you?
@bnoordhuis - we seem to have @nodejs/platform-aix team!
-
It is not additive.
-
This will affect if they are installed in different paths.
You guys use the gcc from AIX Toolbox ? or from other sources ?
What are the different gcc versions you are using to build nodejs ?We (AIX Toolbox) always ship the libraries in /opt/freeware/lib. It never gets into /usr/lib. /lib is basically a symbolic link to /usr/lib.
-
We can fix this during the build itself by adding this to LDFLAGS before the compilation
"-Wl,-blibpath:/opt/freeware/lib:/usr/lib/lib"#10128 added a
-blibpath:setting for AIX. It looks like #17604 refactorednode.gypto add anode_shared=="true"condition around it (where before it was set on AIX unconditionally).- added a commit that references this issue
on Jan 11, 2019 Fix in #25447.
Saw the PR. Now it will work with AIX Toolbox libgcc & libstdc++. Great
@richardlau Thanks for the quick response and fix.It will be very great if this fix goes to LTS release soon.
Usually things need to sit a bit in current before releasing in LTS, but for this kind of very specific bug fix in the build options, maybe it can be accelerated? @BethGriggs, any prediction on when this could be in an LTS release?
@ayappanec I'm still concerned that this might break our existing setup/testing. I probably just need a bit more info.
When you say:
It is not additive.
It makes me worry that it replaces paths that may be required given our current install. Is that potentially the case?
For some context. Our machines were installed long ago and required a combination of packages from Bull Freeware and the AIX Toolbox. As we install new machines (we hare working on getting a new machine in place) we will try to use a better config as we understand work since then on the AIX Toolbox has improved things. After much discussion with some members of the AIX compiler team, we have the alternate compiler (6.3) installed in: /home/iojs/gcc-6.3.0-1 as you can see from the paths in what you have in the original post.
1 remaining item
- added a commit that references this issue
on Jan 14, 2019 - addedregressionIssues related to regressions.Issues related to regressions.
on Jan 15, 2019 - added a commit that references this issue
on Jan 16, 2019 - added 3 commits that reference this issue
on Feb 13, 2019 - added a commit that references this issue
on Feb 28, 2019 - added 3 commits that reference this issue
on Mar 6, 2019 - added 2 commits that reference this issue
on Mar 15, 2019 - added a commit that references this issue
on Jul 27, 2026
I am from IBM AIX Toolbox development team.
IBM AIX Toolbox --> https://www.ibm.com/developerworks/aix/library/aix-toolbox/alpha.html
I just tried running node (v10.15.0-aix-ppc64) in AIX after downloading it from https://nodejs.org/en/download/
And got this loader error.
./node
exec(): 0509-036 Cannot load program ./node because of the following errors:
0509-150 Dependent module libstdc++.a(libstdc++.so.6) could not be loaded.
0509-022 Cannot load module libstdc++.a(libstdc++.so.6).
0509-026 System error: A file or directory in the path name does not exist.
When i dumped the loader section, i got this.
dump -X64 -H node
node:
VERSION# #SYMtableENT #RELOCent LENidSTR
0x00000001 0x0000bba2 0x000273fc 0x00000225
#IMPfilID OFFidSTR LENstrTBL OFFstrTBL
0x00000006 0x0038d728 0x00309360 0x0038d94d
INDEX PATH BASE MEMBER
0 /home/iojs/gcc-6.3.0-1/opt/freeware/bin/../lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/pthread/ppc64:/home/iojs/gcc-6.3.0-1/opt/freeware/bin/../lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/../../../pthread/ppc64:/home/iojs/gcc-6.3.0-1/opt/freeware/bin/../lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0:/home/iojs/gcc-6.3.0-1/opt/freeware/bin/../lib/gcc:/home/iojs/gcc-6.3.0-1/opt/freeware/bin/../lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/../../..:/usr/lib:/lib
1 libperfstat.a shr_64.o
2 libstdc++.a libstdc++.so.6
3 libgcc_s.a shr.o
4 libpthreads.a shr_xpg5_64.o
5 libc.a shr_64.o
The library loading path don't have "/opt/freeware/lib" where we ship libstdc++.a & libgcc_s.a .
So now one has to export LIBPATH to "/opt/freeware/lib:/usr/lib:/lib" to make it work.
We can fix this during the build itself by adding this to LDFLAGS before the compilation
"-Wl,-blibpath:/opt/freeware/lib:/usr/lib/lib"
The AIX linker puts this path in the loader section.