-
Notifications
You must be signed in to change notification settings - Fork 30k
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
libatomic for s390x #27377
Comments
The file you're interested in is atomicops_internals_portable.h. It's possible GCC knows how to emit instructions for some |
I took out the -latomic for s390x and I didn't get errors linking node.
However, I am getting these errors when I use devtoolset-6 and devtoolset-8 during the %install part of the RPM build.
|
@sam-github can you comment as I know you ran into issues with libatomic. |
@john-yan in case you can shed any additional insight as well. |
@nealef what compiler toolchain are you using when you don't get errors? you may find select-compiler interesting, it shows how we build node for the various branches: I found libatomic necessary on centos7 ppc64, see nodejs/build@c6e9433 |
@sam-github I haven't built 12 cleanly yet as I was on a system with a gcc 4.8.5 toolchain so I tried both devtoolset-6 and devtoolset-8 where I got the same type of errors. I will check that link you provided. |
@sam-github I think I found the problem. The RPM spec file has a . /opt/rh/devtoolset-8/enable in the %build but not in the %install. |
@sam-github Confirm a clean build with devtoolset-8 |
So, @nealef, you are finding that FYI, node builds with devtoolset-6 (EDIT: on 12.x), so it would have to be reconfirmed with that. Also, while we are moving to using devtoolset when we can, it creates slightly more portable binaries, I'm not sure if we require people building from source to use it, we might also want to support gcc-6 (EDIT: on 12.x). All of which is to say, does having |
wrt.
That sounds a bit like there might be an oddity elsewhere, either in node's install target, or in the rpm specfile. IIRC, the intention with rpm specfiles is that all building occur in the %build, so %install shouldn't require the toolset to be enabled. A workaround of always enabling the toolset doesn't seem so bad, but if something is broken, feel free to open a bug. Also, again just FYI, even though we use devtoolset, distro packagers aren't required to do so, they might have othe ways of dealing with binary compatibility. Also, when a binary is built for a specific distro, its not usual to want to copy it to another older version of the distro (or a completely different distroy), and run it. There has even been some cricism of devtoolset because it links code into the executable that is usually provided by shared libaries, preventing that code from being upgradeable by the distro in cases of bugs or sec problems. At a micro scale, this is similar to why distros link against shared openssl usually, instead of allowing node ot statically link its own. I don't know exactly what you are doing, so maybe none of this applies to you. YMMV. |
@sam-github Confirm that -latomic is not required for s390/s390x. The Hopefully with RHEL 8 and then CentOS 8 the need to use devtoolset will be eliminated. |
Does %build do a |
No. The spec file came from the source tarball so I hadn't touched that bit. |
MIPS architecture doesn't have support for 64-bit atomics. It is possible to implement them using 32-bit atomics, but the process is involved and takes time. For the time being support 64-bit atomics using runtime. Bug: v8:8100 Change-Id: I8c732ea9975c46be70643a1e722d78938c8a70de Reviewed-on: https://chromium-review.googlesource.com/1251521 Commit-Queue: Ivica Bogosavljevic <ibogosavljevic@wavecomp.com> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#56331}
The library is not necessary for ppc64 or s390x. It does no harm with some linkers, but devtoolset-6 creates runtime dependencies on all link libraries, even unused ones. Fixes: nodejs#27377 Fixes: nodejs#29718
PR-URL: #29727 Fixes: #27377 Fixes: #29718 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
The library is not necessary for ppc64 or s390x. It does no harm with some linkers, but devtoolset-6 creates runtime dependencies on all link libraries, even unused ones. Fixes: #27377 Fixes: #29718 PR-URL: #29727 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #29727 Fixes: #27377 Fixes: #29718 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Is your feature request related to a problem? Please describe.
Building node for s390x requires libatomic as the comment in v8.gyp reports:
Describe the solution you'd like
s390x has many atomic instructions including a few compare-and-swap instructions (differing on operand size).
Describe alternatives you've considered
I am curious as to which atomic operations are required and where in the code they are. I would look at adding them to eliminate the need for libatomic.
The text was updated successfully, but these errors were encountered: