-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
NodeJS 12.13.0 CentOS fail compile #30077
Comments
I'm going to guess that your system's header files don't define the Are you using devtoolset? Can you post the exact steps you use to set up your build environment and configure and build node? |
I am using devtoolset-8 devtoolset-8-make devtoolset-8-gcc devtoolset-8-gcc-c++ inside docker container from centos:6. |
I'm not 100% sure but I think we use devtoolset-6 or 7 to build on centos 6. Maybe give them a go. |
docker run -it centos:6
yum update -y \
&& yum install -y ca-certificates sudo yum-utils epel-release centos-release-scl-rh \
&& yum-config-manager --enable rhel-server-rhscl-6-rpms \
&& yum update -y
yum install -y \
openssh-clients \
devtoolset-7 devtoolset-7-make devtoolset-7-gcc devtoolset-7-gcc-c++ \
python27 git \
curl wget jq \
bzip2 xz \
pkgconfig automake autoconf \
rpm-build rpm-sign rpmdevtools
. /opt/rh/devtoolset-7/enable
. /opt/rh/python27/enable
wget https://nodejs.org/dist/v12.13.0/node-v12.13.0.tar.gz
tar xf node-v12.13.0.tar.gz
cd node-v12.13.0
./configure --prefix=/usr/local
make Result:
|
Seem they are in fact but might need to pass |
gnulib has a note on it:
So I guess that means we need to define it for systems like OP's... Someone want to send a PR? It should be added to |
By GCC 6.5.0 on Ubuntu 12.04, it also has the same issue. |
I think it not included in 12.14.1 release (( |
It was fixed in v13.6.0 but it'll take some time before it's eligible for v12.x LTS. Maybe in the next release. I'll close this out. |
@bnoordhuis Even in 13.6.0 does not compile
|
@Delagen That's an issue with your glibc being too old. You can probably work around it with this patch but it comes with zero warranties (as does node in general, of course.) diff --git a/node.gypi b/node.gypi
index e6f5872cc7..4ed0207f0f 100644
--- a/node.gypi
+++ b/node.gypi
@@ -298,7 +298,7 @@
'ldflags': [ '-Wl,-M,/usr/lib/ld/map.noexstk' ],
}],
[ 'OS=="linux"', {
- 'libraries!': [
+ 'libraries': [
'-lrt'
],
}], If it still doesn't work after that, you're on your own. :-) |
@bnoordhuis Yes it works, but I fixed via ENV LDFLAGS: '-lrt'. Thanks |
@bnoordhuis is there a timeline to land this on 12.x? (it doesn't seem to be on 12.15.0) |
v12.15.0 was a security release, those don't contain regular bug fixes. It'll probably be in the next one. |
Next one will be #31691. |
That one contains the fix. |
Confirming that 12.16.0 has the fix - as @Delagen mentioned you need to set |
Seems like you want to use both of these to compile nodejs v12 on CentOS 6
|
../deps/v8/src/inspector/v8-runtime-agent-impl.cc: In member function 'virtual v8_inspector::protocol::Response v8_inspector::V8RuntimeAgentImpl::getIsolateId(v8_inspector::String16*)':
../deps/v8/src/inspector/v8-runtime-agent-impl.cc:626:38: error: expected ')' before 'PRIx64'
std::snprintf(buf, sizeof(buf), "%" PRIx64, m_inspector->isolateId());
~ ^~~~~~~
)
make[1]: *** [/tmp/tmp.Om2rLi9DCC/BUILD/node-v12.13.0/out/Release/obj.target/v8_base_without_compiler/deps/v8/src/inspector/v8-runtime-agent-impl.o] Error 1
make: *** [node] Error 2
The text was updated successfully, but these errors were encountered: