Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Trying to get --fully-static build to work #25923

Closed
pmclee opened this issue Oct 13, 2015 · 1 comment
Closed

Trying to get --fully-static build to work #25923

pmclee opened this issue Oct 13, 2015 · 1 comment

Comments

@pmclee
Copy link

pmclee commented Oct 13, 2015

I'm cross-compiling nodejs 4.1.2 for mipsel and I've run into a snag trying to get a static binary image build.

At the moment our runtime MIPS environment is running an older linux built with gcc 3.4 -- but our application requires 4.9. It's a long story, but bottom line is that for the next couple of weeks I need to build with 4.9 and run in this older 3.4 environment -- if possible.

My strategy was to build nodejs with static libraries by building/making it like this:

export CC=mipsel-linux-gnu-gcc
export CXX=mipsel-linux-gnu-g++
export LINK=mipsel-linux-gnu-g++
export CFLAGS=-EL
export GYPFLAGS=-Dv8_target_arch=mipsel
./configure --fully-static --dest-cpu=mipsel --dest-os=linux && make

But when I tried running a test "hello world" node app, I can see that something is not quite right. I'm not sure if I am reading the error messages right, either, because it appears that nodejs has somehow loaded libstdc++.so.6 (which I didn't think it would do, being statically linked). Further, it also appears that the so fails because it is looking for 3.4 libraries (which should be what is installed).

root@TestMachine:/var/node# node testServer.js
node: /lib/libc.so.6: version `GLIBC_2.19' not found (required by node)
node: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by node)
node: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node)

So maybe I need to back up for a moment and ask some questions:

  • is there some different/additional config option that I should be using?
  • is there an environment variable that I'm missing?
  • or is there some other way to generate a statically linked target?
@pmclee
Copy link
Author

pmclee commented Oct 13, 2015

Just realized I was filing this under node v0.x, so I've re-posted this issue to Node v4 here:

nodejs/node#3207

@pmclee pmclee closed this as completed Oct 13, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant