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

Can't run nodejs 4.6 on Ubuntu 12.04.5 LTS with Geode AMD CPU #8926

Closed
ilkeraktuna opened this issue Oct 4, 2016 · 17 comments
Closed

Can't run nodejs 4.6 on Ubuntu 12.04.5 LTS with Geode AMD CPU #8926

ilkeraktuna opened this issue Oct 4, 2016 · 17 comments
Labels
invalid Issues and PRs that are invalid. v8 engine Issues and PRs related to the V8 dependency.

Comments

@ilkeraktuna
Copy link

  • Version: 4.6 LTS
  • Platform: Ubuntu 12.04.5 LTS with Geode AMD CPU
  • Subsystem:

Hi,

When I install the binary from nodejs.org on my Ubuntu system with Geode AMD CPU, it installs fine. But when I run "node" or "npm" commands , I get "Illegal Instruction" error.

root@router:# uname -a
Linux router 3.2.0-57-generic #87-Ubuntu SMP Tue Nov 12 21:38:12 UTC 2013 i586 i586 i386 GNU/Linux
root@router:
# cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 5
model : 10
model name : Geode(TM) Integrated Processor by AMD PCS
stepping : 2
microcode : 0x8b
cpu MHz : 498.026
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu de pse tsc msr cx8 pge cmov clflush mmx mmxext 3dnowext 3dnow up
bogomips : 996.05
clflush size : 32
cache_alignment : 32
address sizes : 32 bits physical, 32 bits virtual
power management:

@ilkeraktuna
Copy link
Author

If I install binaries from Ubuntu Repos, they work fine. But they are very old releases (below)
So I need working 4.6 binary.

root@router:# apt-cache madison nodejs
nodejs | 0.10.47-1nodesource1
precise1 | https://deb.nodesource.com/node_0.10/ precise/main i386 Packages
nodejs | 0.6.12dfsg1-1ubuntu1 | http://archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
nodejs | 0.6.12
dfsg1-1ubuntu1 | http://us.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
nodejs | 0.6.12dfsg1-1ubuntu1 | http://tr.archive.ubuntu.com/ubuntu/ precise/universe i386 Packages
nodejs | 0.6.12
dfsg1-1ubuntu1 | http://archive.ubuntu.com/ubuntu/ precise/universe Sources
nodejs | 0.6.12dfsg1-1ubuntu1 | http://us.archive.ubuntu.com/ubuntu/ precise/universe Sources
nodejs | 0.10.47-1nodesource1
precise1 | https://deb.nodesource.com/node_0.10/ precise/main Sources

@MylesBorins
Copy link
Contributor

@ilkeraktuna are you installing from source or the tar balls from the website?

is v4.5.1 working?

@ilkeraktuna
Copy link
Author

none of the binaries on website work for me.
if I can install, it gives "illegal instruction"
So far I only could run v0.10.47 and v0.6.12 from Ubuntu repos.

@ilkeraktuna
Copy link
Author

I try the binaries.
Because I don't have required g++ or clang++ version to build from source.

Btw, I checked on my system and see that running nodejs is from this package:
nodejs_0.10.47-1nodesource1~precise1_i386.deb

So I found a similar one (i386) from here:
https://deb.nodesource.com/node_4.x/pool/main/n/nodejs/

But it didn't also work.

@mscdex
Copy link
Contributor

mscdex commented Oct 4, 2016

IIRC V8 dropped support for i586 and older some time back? I know V8's x86 support has required SSE2 since 2014 and AFAIK all Geode CPUs do not support SSE2 (and only some support original SSE).

@mscdex mscdex added the v8 engine Issues and PRs related to the V8 dependency. label Oct 4, 2016
@ilkeraktuna
Copy link
Author

so what do you recommend for me ?
I can't change my CPU.
And old nodejs (v.0.10.x) does not work for my required scenario.

@mscdex
Copy link
Contributor

mscdex commented Oct 4, 2016

You're out of luck then. node v0.10.x was the last branch to use a version of V8 that did not include the SSE2 requirement.

@ilkeraktuna
Copy link
Author

that's really bad.
Wouldn't it be possible to patch it so that it does not require SSE2 ?

@mscdex
Copy link
Contributor

mscdex commented Oct 4, 2016

If you're familiar enough with the V8 code base and you have the time to spend doing it (non-trivial IMHO), then sure. However maintaining that patch going forward as V8 continues to make improvements and other changes is likely to be non-trivial. I doubt node core would be interested in maintaining/floating a patch like that though, so you'd probably be on your own there.

@ilkeraktuna
Copy link
Author

I am not a coder. I was assuming it would be an easy patch and someone would help me on that.
Other than that, I have no solution..

Btw, I am not interested in maintaining that patch. I would only use it with a static build for a specific use.

@sxa
Copy link
Member

sxa commented Oct 4, 2016

I have a Geode in a Viglen MPC-L and since 0.10 is going out of support in the next few weeks I've got the same issue (although I'm not running any SSL stuff so at least I won't be exposed from an OpenSSL perspective!) I should probably just switch the system running it to a raspberry pi really, but if you're looking for a way forward V8 does have an 'x87' architecture target which might work (I think I last tried it somewhere on the 0.12 codebase and got it running).

If you edit the valid_arch values in configure to include 'x87' which should exclude the SSE instructions then you can run configure with:

./configure --dest-cpu=x87 --with-intl=none
make

but when I tried that on the V6 codebase just now it got in a mess at the final link step. (I wouldn't recommend compiling it directly on the Geode or you'll be there for hours) I should warn you that even if you can get it to run, the resulting build when I did it was very slow, which is why I've so far stuck to 0.10 on mine ...) You may also run into trouble with the version of libstdc++ being quite backlevel on Ubuntu 12.04 too if you get it to build.

@ilkeraktuna
Copy link
Author

@sxa555
Thanks. But I didn't really understand. What do you mean by "edit the valid_arch values in configure to include 'x87'" ?

Also, I don't have anyother choice but build it on Geode if I'm gonna build. Because currently I don't have any other build environments. I'm "ok" with waiting for hours though (if it will solve my problem)

Is there any possibility that you could build it for me ?
Because "configure" gives me "g++ and clang++ does not meet required versions"

@bnoordhuis
Copy link
Member

Sorry, you are on your own. V8 has a x87 back-end but it's not supported by node. You could try hacking the configure script to enable it but I can't guarantee it actually builds and runs. Good luck.

@bnoordhuis bnoordhuis added the invalid Issues and PRs that are invalid. label Oct 4, 2016
@sxa
Copy link
Member

sxa commented Oct 4, 2016

In the top level configure script there's a definition for valid_arch which you need to change to include x87 e.g.

valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 'x32',
'x64', 'x86', 'x87', 's390', 's390x')

However, node 4 and above need gcc 4.8 (and the C++ runtimes from 4.8 to use it). As I mentioned I did try using the option for x87 with Node 6 but it didn't quite work cleanly on my build system for some reason. If you can get away with Node 0.12 then that may well do the job as that worked for me previously, but as bnoorduis says it isn't supported :-(

@tbodt

This comment has been minimized.

@bnoordhuis
Copy link
Member

@tbodt Is that ish-app/ish#464 by any chance? Our #464 is really ancient. :-)

@tbodt
Copy link

tbodt commented Aug 17, 2019

Ah sorry, left that comment on the wrong issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issues and PRs that are invalid. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

6 participants