FS#61487 - [emscripten] Five (!!!) copies of the same clang binary in package
Attached to Project:
Community Packages
Opened by Sergey (versusvoid) - Monday, 21 January 2019, 09:44 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 17 April 2019, 14:59 GMT
Opened by Sergey (versusvoid) - Monday, 21 January 2019, 09:44 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 17 April 2019, 14:59 GMT
|
Details
Description:
> sha256sum /usr/lib/emscripten-fastcomp/clang{,++,-6.0,-cl,-cpp} bd6258ae98afd395c5c53f004f03ec4d00c44228635f71875045a61231117241 /usr/lib/emscripten-fastcomp/clang bd6258ae98afd395c5c53f004f03ec4d00c44228635f71875045a61231117241 /usr/lib/emscripten-fastcomp/clang++ bd6258ae98afd395c5c53f004f03ec4d00c44228635f71875045a61231117241 /usr/lib/emscripten-fastcomp/clang-6.0 bd6258ae98afd395c5c53f004f03ec4d00c44228635f71875045a61231117241 /usr/lib/emscripten-fastcomp/clang-cl bd6258ae98afd395c5c53f004f03ec4d00c44228635f71875045a61231117241 /usr/lib/emscripten-fastcomp/clang-cpp > ls -i /usr/lib/emscripten-fastcomp/clang{,++,-6.0,-cl,-cpp} 1981291 /usr/lib/emscripten-fastcomp/clang* 1981292 /usr/lib/emscripten-fastcomp/clang++* 1981293 /usr/lib/emscripten-fastcomp/clang-6.0* 1981295 /usr/lib/emscripten-fastcomp/clang-cl* 1981296 /usr/lib/emscripten-fastcomp/clang-cpp* Additional info: * package version: 1.38.24-1 |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Wednesday, 17 April 2019, 14:59 GMT
Reason for closing: Implemented
Additional comments about closing: Can't improve it further now without spending more time on it than I have. I improved the situation considerably using symlinks. Would be even better using shared libraries but those don't want to work somehow. I took inspiration from the clang/llvm packages while trying to use shared libraries.
Wednesday, 17 April 2019, 14:59 GMT
Reason for closing: Implemented
Additional comments about closing: Can't improve it further now without spending more time on it than I have. I improved the situation considerably using symlinks. Would be even better using shared libraries but those don't want to work somehow. I took inspiration from the clang/llvm packages while trying to use shared libraries.
Nearly the entire 900MB size of the package is in /usr/lib/emscripten-fastcomp/, which is 885M, and in context, the whole of extra/clang and extra/llvm6{,-libs} (minus static copies of libraries) is only 200MB. The actual binaries in /usr/bin are 4KB to 500KB stubs which load into the shared libLLVM-7.so and the clang libraries they use...
I'd investigate how the clang/llvm packages are built, and try to get emscripten to build private copies of patched libclang/libLLVM, which the tools in /usr/lib/emscripten-fastcomp/ would then find via RPATH. Hopefully you won't need a degree in clang/llvm in order to properly build what is ultimately actually a full fork of both. ;)
If not, at least symlinking the identical binaries would result in dropping 256MB from the package. But there are still over 15 binaries (*not* counting the four 64MB copies of the clang binary) that are anywhere from 20MB to 40MB and likely loading most of the same content statically compiled in.