-
Notifications
You must be signed in to change notification settings - Fork 167
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
AIX: gcc upgrade requirement #925
Comments
We'll need to have both the existing version of gcc (to build older node versions) as well as the newer version and figure out how to make them co-exist. I'm +1 for going with 6.3.0 |
@gibfahn Any progress on this? Any way I can help?
Is it not possible to run node built with gcc 4.9 on AIX with gcc 4.8 installed? |
Unfortunately not, you need the right version of |
I am receiving the same error on AIX 7.1 while while verifying node ibm-8.9.4.0-node-v8.9.4-aix-ppc64.bin installation. Is there now a fix for the problem? Thanks. oracle@stpisa02sa:/opt/freeware/lib/pthread/ppc64/ [] node --version |
@seawatcher2011 do you have gcc 4.8 installed? See nodejs/node#14785 for more info. |
@gibfahn - no, not gcc 4.8. I have gcc 6.3.0. What is the suggestion workaround? Deinstall gcc6.3.0 and install gcc 4.8?
|
Unfortunately you will need 4.8. However you should be able to have them both installed side-by-side. I've heard this is possible but haven't confirmed it myself, that's in fact the point of this issue. |
I have now managed to get this working, but there was one pain point. On one machine I tested on I got this error persistently, implying that the
With @refack's help I eventually tracked this down to this mailing list discussion: $ ls -l `which gmake`
lrwxrwxrwx 1 root system 27 Jul 25 2013 /usr/bin/gmake -> ../../opt/freeware/bin/make
$ ls -l /opt/freeware/bin/make
-rwxr-sr-x 1 root system 280288 Sep 22 2011 /opt/freeware/bin/make Running The |
@seawatcher2011 your mileage may vary, but what worked for me is to extract the contents of the libstdc++ rpm into a directory, then set the LIBPATH to point to that directory. I used rpm2cpio to extract the rpm, which isn't available on AIX (I got it from a RHEL box, but I think it's available on Ubuntu). So first you need to download the rpm from wherever you got gcc from, either AIX Toolbox or Bull Freeware. Either should work, but you can't mix and match. AIX Toolbox: ftp://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-6.1/gcc/libstdcplusplus-4.8.5-1.aix6.1.ppc.rpm You extract the file (on a different machine) with: rpm2cpio libstdcplusplus-4.8.5-1.aix6.1.ppc.rpm | cpio -idmv Then zip it up and scp it to the machine. Unzip it, and then add the export LIBPATH="$PWD/opt/freeware/lib/pthread/ppc64:$LIBPATH" You should then be able to do Note that Node 10 is expected to be built with gcc 6.3, so you won't need this workaround once you upgrade to that version. For info, the reason this is necessary is because there was a breaking change in libstdc++ on AIX between gcc 4.8 and 4.9. Let me know if it works! |
I have generated a zip file containing gcc and dependencies, by downloading the zip from Bull Freeware. For some reason the dependency resolver on Bull Freeware downloaded the wrong version of libstdc++ (7.1 instead of 6.1) so I had to manually fix up the with-deps zip. #!/bin/bash -ex
# Builds a zip file containing gcc and dependencies, installed from Bull Freeware rpms.
rm -rf rpms gcc-6.3.0-1
rm -f gcc-6.3.0-1.zip
mkdir rpms gcc-6.3.0-1
cp gcc-c++-6.3.0-1.aix6.1.ppc.rpm-with-deps.zip rpms
(cd rpms && unzip gcc-c++-6.3.0-1.aix6.1.ppc.rpm-with-deps.zip)
for rpm in rpms/*.rpm; do
(cd gcc-6.3.0-1 && rpm2cpio ../$rpm | cpio -idmv)
done
zip -r gcc-6.3.0-1.zip gcc-6.3.0-1/ Once you have the zip on the system, it's just a matter of unzipping it somewhere, and then setting up the paths correctly, so: # Setting the LIBPATH doesn't seem to be necessary.
# export LIBPATH="$PWD/gcc-6.3.0-1/opt/freeware/lib/pthread/ppc64:$PWD/gcc-6.3.0-1/opt/freeware/lib"
export PATH="$PWD/gcc-6.3.0-1/opt/freeware/bin:$PATH"
cd ~/node
export CC=`which gcc` CXX=`which g++` CXX_host=`which g++`
./configure --dest-cpu=ppc64 && gmake -j4 The version I generated is stored at https://ci.nodejs.org/downloads/aix/ (see #871 (comment)), there's a zip and an md5sum for checking that everything downloads correctly. |
I also ran with C++ 14 enabled to make sure that worked, by applying this diff: diff --git a/common.gypi b/common.gypi
index 6d83d8a..dcbb2a0 100644
--- a/common.gypi
+++ b/common.gypi
@@ -321,7 +321,7 @@
}],
[ 'OS in "linux freebsd openbsd solaris android aix cloudabi"', {
'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ],
- 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++1y' ],
+ 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++14' ],
'ldflags': [ '-rdynamic' ],
'target_conditions': [
# The 1990s toolchain on SmartOS can't handle thin archives.
|
|
Ahh, so how would I enable gcc 14 features (to check that it works)? I want to get something that fails on 4.8.4 and passes on 6.3.0. |
You could try to build this PR: nodejs/node#13676 |
Other platforms seem to need to export LDFLAGS, sounds like that is not required on AIX for your testing? |
Seems to fail on community machine with:
Will try to set LIBPATH |
LIBPATH does not seem to help and just causes other problems. |
Despite it not looking like the bit was set on the test machine, this was still required:
|
|
@mhdawson watch out for the following in the Jenkins config... BTW: I've found that the following enables building (and apparently the order in important):
|
@refack Thanks ! trying that now. |
Still failing in CI
probably unrelated but the compiler detection is also failing:
|
So it's more delicate: -bash-4.3$ export LIBPATH=/home/iojs/gcc-6.3.0-1/opt/freeware/lib:/opt/freeware/lib
-bash-4.3$ ./configure --dest-cpu=ppc64
WARNING: openssl_no_asm is enabled due to missed or old assembler.
Please refer BUILDING.md
creating icu_config.gypi
* Using ICU in deps/icu-small
creating icu_config.gypi gmake need it the other way: -bash-4.3$ gmake
exec(): 0509-036 Cannot load program gmake because of the following errors:
0509-022 Cannot load module /opt/freeware/lib/libintl.a(libintl.so.1).
0509-150 Dependent module /home/iojs/gcc-6.3.0-1/opt/freeware/lib/libiconv.a(shr4.o) could not be loaded.
0509-152 Member shr4.o is not found in archive
0509-022 Cannot load module make.
0509-150 Dependent module /opt/freeware/lib/libintl.a(libintl.so.1) could not be loaded.
0509-022 Cannot load module .
-bash-4.3$ export LIBPATH=/opt/freeware/lib:/home/iojs/gcc-6.3.0-1/opt/freeware/lib
-bash-4.3$ gmake
gmake -C out BUILDTYPE=Release V=1
gmake[1]: Entering directory `/home/iojs/build/workspace/node-test-commit-aix/nodes/aix61-ppc64/out'
node.target.mk:13: warning: overriding recipe for target `/home/iojs/build/workspace/node-test-commit-aix/nodes/aix61-ppc64/out/Release/node.exp'
cctest.target.mk:13: warning: ignoring old recipe for target `/home/iojs/build/workspace/node-test-commit-aix/nodes/aix61-ppc64/out/Release/node.exp'
♥gmake: *** [node] Interrupt |
Looks to me that there is a circular issue, gmake requires LIBPATH in particular order and CC in a different order:
|
Ok, ignore the previous comment. I see that I have at least one of the paths wrong |
Or maybe I had things right after all as @refack just said the same thing. |
Tried taking the gmake from one of our internal machines that might have worked with @gibfahn tests. And tried it on the CI machine, still fails with the same problem :( The message was only slightly different:
|
Assuming you're talking about |
I finally found something that works. Still want to get some feedback from the internal AIX team to see if it makes sense. The environment is set as follows:
with the difference from before being the addition of Have tested from command line, next is to see if it works from the CI. |
Do you know why the gmake on the test machines is different to the one on |
No idea and in fact even copying over the gmake to the community machine did not help as I tried that first. It is different though based on the output from dump -H |
@gibfahn, |
The upgrade has now been rolled out to test and release machines. Things seem to be building ok. |
Compilers were updated for 10.X as per discussion in: nodejs/build#925
Compilers were updated for 10.X as per discussion in: nodejs/build#925 PR-URL: #20153 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
Compilers were updated for 10.X as per discussion in: nodejs/build#925 PR-URL: #20153 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
We ran into one more problem. Turns out there were a few non-relative symbolic links and the process documented above resulted in those being missing in the deployed compilers. We've talked to the AIX teams about fixing them so they are relative and have fixed up the links on the community machines with:
The updated fixed binary is in the downloads directory on the ci machine as: The next step is to update the manual install steps for AIX. |
This is almost a year inactive at this point. Is it still a thing or has this been addressed and can be closed? @mhdawson @nodejs/platform-aix |
I think its still a thing. I've notes somewhere, I think we are still working on it, slowly. I'll check with @mhdawson again when he's back from vacation. |
The remaining stuff I think is to update the manual install steps for AIX and then it can be closed. |
@mhdawson is this the updated install steps you mentioned - https://github.com/nodejs/help/wiki/Installation#how-to-install-nodejs-via-binary-archive-on-aix. If so, can this issue be closed? |
I'm ok with closing. |
As a result of nodejs/node#14785 and nodejs/help#784 we have discovered that a backwards incompatible change was made in libstdc++ AIX between gcc 4.8 and gcc 4.9. This means that the requirement for GCC 4.9.3 for Node 8 requires that we raise the minimum gcc/libstdc++ version for that platform. Ideally we should do this before Node 8 goes LTS, or stick with gcc 4.8.4 for 8.x.
AIX is a special case here, because it doesn't come with libstdc++ or gcc by default, so everyone running on the platform needs to install gcc in order to run Node. There are two places to get gcc versions, the AIX Toolbox and Bull Freeware. Currently the AIX toolbox only has GCC 6.3.0 available, and Bull Freeware has 7.2.0, 6.4.0, and 5.5.0 (and older minor versions).
It's worth noting at this point that gcc changed their versioning scheme after 4.9, so 4.10 became 5.0, and 4.11 became 6.0. So the gap between 4.9 and 7.0 is not as large as it seems.
Given that AIX users have to download gcc anyway, and given that they will have to update their gcc levels for this release, I think we should bump to a relatively new version (so they don't have to upgrade again for as long as possible). I'd suggest using 6.3.0, GCC 7 came out this year, so might be too new to move to.
The text was updated successfully, but these errors were encountered: