Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RocksDB: static library size that's built from source is really large

When I build RocksDB using make static_lib that produces a 200MB+ librocksdb.a file, but when I install the same version through a package manager (compared to both Brew and apt), the .a file is only about 11MB. What am I missing?

Size of the library when building from source using make static_lib:

ubuntu@local:~/rocksdb-4.1$ du -sh librocksdb.a
238M    librocksdb.a

Size of the library installed using sudo apt-get install librocksdb-dev on Xenial:

ubuntu@local:~/rocksdb-4.1$ du -sh /usr/lib/librocksdb.a
11M /usr/lib/librocksdb.a

Why is there such a big difference?

like image 314
jeffreyveon Avatar asked Oct 22 '16 13:10

jeffreyveon


1 Answers

Probably the smaller achive is stripped of debug information.

You can use the strip command to remove symbols.

like image 115
Cheers and hth. - Alf Avatar answered Nov 12 '22 22:11

Cheers and hth. - Alf