Skip to content
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

Running node.js 10 on CentOS7 ARM on RaspberryPi #1724

Closed
xoxys opened this issue Mar 14, 2019 · 11 comments
Closed

Running node.js 10 on CentOS7 ARM on RaspberryPi #1724

xoxys opened this issue Mar 14, 2019 · 11 comments

Comments

@xoxys
Copy link

xoxys commented Mar 14, 2019

Hi,
I try to run node.js 10 on CentOS 7 on my PI, but currently without luck...

First try: Use the official prebuild armv7 package. Failed because of
node: /lib/libstdc++.so.6: version GLIBCXX_3.4.20' not found (required by node)`

Second try: Compile on a Scaleway armv7 host under CentOS 7 with gcc4.8 because 4.9 is not available. Failed with error: 'make_unique' is not a member of 'std' because make_unique requires gcc4.9 i think.

So is there a real chance to get node.js 10 running under CentOS 7 ARM?

@refack
Copy link
Contributor

refack commented Mar 14, 2019

Have you tried GCC-6 (i.e. devtoolset-6) ? that's the closest toolset we use - https://ci.nodejs.org/job/node-test-commit-arm/nodes=centos7-arm64-gcc6/

@xoxys
Copy link
Author

xoxys commented Mar 14, 2019

devtoolset is sadly not available for arm
Edit: arm32

@refack
Copy link
Contributor

refack commented Mar 14, 2019

So what we do is cross-compile for arm7 on a ia32 host - https://ci.nodejs.org/job/node-cross-compile/nodes=cross-compiler-armv7-gcc-4.9.4/22305/consoleFull but the host is Ubuntu16, and the compiler is gcc4.9 (which links against libstdc++6)

Does any of the following help? https://rpmfind.net/linux/rpm2html/search.php?query=libstdc%2B%2B.so.6

@refack
Copy link
Contributor

refack commented Mar 14, 2019

Or this (it's the libstdc++6 from the cross-compile-toolchain)
libstdc++.zip

@xoxys
Copy link
Author

xoxys commented Mar 14, 2019

How could this work?
I've copied both files from the zip to /lib folder and softlink ln -s libstdc++.so.6.0.22 libstdc++.so.6 but now i get:

# node
node: /lib/libc.so.6: version `GLIBC_2.18' not found (required by /lib/libstdc++.so.6)
root@computron [/lib] # strings /lib/libstdc++.so.6|grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBC_2.4
GLIBC_2.18
GLIBC_2.17
GLIBCXX_DEBUG_MESSAGE_LENGTH

@refack
Copy link
Contributor

refack commented Mar 14, 2019

node: /lib/libc.so.6: version `GLIBC_2.18' not found

¯\(ツ)/¯ was worth a shot.

@refack
Copy link
Contributor

refack commented Mar 14, 2019

BTW, check out related discussion in #1723

@xoxys
Copy link
Author

xoxys commented Mar 14, 2019

I've got node 10.0.0 compiled with gcc 4.8 but there should be a better method to build an up to date nodejs version for systems with gcc4.8 only

@refack
Copy link
Contributor

refack commented Mar 14, 2019

I've got node 10.0.0 compiled with gcc 4.8 but there should be a better method to build an up to date nodejs version for systems with gcc4.8 only

That's not going to be possible in the future as both our codebase and V8 will migrate to more and more C++17.

What we should be able to do is cross compile in a way that the only dependencies will be kernel and libc levels as per https://github.com/nodejs/node/blob/master/BUILDING.md#supported-platforms

@xoxys
Copy link
Author

xoxys commented Mar 15, 2019

I've got it to work. Using -static-libstdc++ with cross compile toolchain works for me und node 10.15 is running under CentOS 7 ARMv7

@refack
Copy link
Contributor

refack commented Mar 15, 2019

I've got it to work. Using -static-libstdc++ with cross compile

That's great news!

I'm going to close this issue. But the discussion is continuing in other threads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants