Closed zenspider closed 4 years ago
Beyond the various CFLAGS
and ./configure
options which ruby-build sets in certain situations, it sets --enable-shared
by default in all of it's build recipes.
$ ldd ~/.rubies/ruby-2.7.1/bin/ruby | grep ruby
$ nm -D ~/.rubies/ruby-build-2.6/bin/ruby | grep ruby
libruby.so.2.6 => /home/postmodern/.rubies/ruby-build-2.6/lib/libruby.so.2.6 (0x00007f9d1aea2000)
So most of the bulk is in the libruby.so.2.6.4
.
$ du -h ~/.rubies/ruby-build-2.6/lib/libruby.so.2.6.4
9.1M /home/postmodern/.rubies/ruby-build-2.6/lib/libruby.so.2.6.4
You can review how ruby-install invokes ./configure
here.
I get that ruby-install does rdoc/ri by default (THANK YOU) so the builds are going to have more in them than ruby-build... but the binary sizes are also vastly larger. I haven't dug too deep with
nm
or the like, but is there something I can/should do to bring these sizes down? They're currently ~4-8x larger: