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

Difference in binary build size between official distribution package and self-compiling (Arch Linux) #3208

Closed
hansmiller75 opened this issue Feb 1, 2021 · 6 comments
Labels

Comments

@hansmiller75
Copy link

I previously opened this issue on the nodejs main repo but it seems to have been deleted.

I'm an Arch Linux user and the official build size of node when installed as a package is about 29 MB. When I download the PKGBUILD file myself (the file containing instructions how to build the package) and run makepkg, I also get a binary that's the same size as the official one.

But when I clone the nodejs repository, switch to the v15.7.0 tag, run configure with the same flags as in the PKGBUILD:

./configure
--prefix=/usr
--with-intl=system-icu
--without-npm
--shared-openssl
--shared-zlib
--shared-libuv
--experimental-http-parser
--shared-nghttp2

and then run make, I get a build that's about 10 MB larger, 39 MB.

Am I doing something wrong or missing something?

Thanks.

@hansmiller75 hansmiller75 changed the title Differences in build size between official distribution package and self-compiling (linux, Arch Linux) Difference in build size between official distribution package and self-compiling (linux, Arch Linux) Feb 1, 2021
@hansmiller75 hansmiller75 changed the title Difference in build size between official distribution package and self-compiling (linux, Arch Linux) Difference in binary build size between official distribution package and self-compiling (linux, Arch Linux) Feb 1, 2021
@hansmiller75 hansmiller75 changed the title Difference in binary build size between official distribution package and self-compiling (linux, Arch Linux) Difference in binary build size between official distribution package and self-compiling (Arch Linux) Feb 1, 2021
@addaleax
Copy link
Member

addaleax commented Feb 1, 2021

Is there maybe just a version mismatch? Are you comparing two x64 binaries or are they for different architectures?

@hansmiller75
Copy link
Author

hansmiller75 commented Feb 1, 2021

Is there maybe just a version mismatch? Are you comparing two x64 binaries or are they for different architectures?

I'm doing everything on the same computer, running a x64 system (and building for this arch too as I haven't specified anything different).

uname -a
Linux [computer-name] 5.10.11-arch1-1 #1 SMP PREEMPT Wed, 27 Jan 2021 [time] +0000 x86_64 GNU/Linux

@hansmiller75
Copy link
Author

Just compared the two binaries using the file command:
file /usr/bin/node
/usr/bin/node: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=9c483d914973f8c45f5ea5d94d8fcc343c3e2533, for GNU/Linux 3.2.0, stripped

file out/Release/node
out/Release/node: ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=90e6d2990d7ffbc4829815c55f52c781167caa7c, for GNU/Linux 3.2.0, with debug_info, not stripped

How would I remove the debug_info and strip the executeable?

@addaleax
Copy link
Member

addaleax commented Feb 1, 2021

Okay, that makes sense :) https://linux.die.net/man/1/strip is your friend here :)

Copy link

It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment.
If you need further assistance or have questions, you can also search for similar issues on Stack Overflow.
Make sure to look at the README file for the most updated links.

@github-actions github-actions bot added the stale label May 10, 2024
Copy link

github-actions bot commented Jun 9, 2024

It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment.
If you need further assistance or have questions, you can also search for similar issues on Stack Overflow.
Make sure to look at the README file for the most updated links.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants