Thanks again for your super-prompt answers and apologies for the noise—I’ve sent this email a minute after sending the OP, yet somehow it only arrived to Google Groups today! How embarrassing.
Was not aware of the fact that -g just embeds debug symbols and does not build a slower debug build. Thanks again for your fantastic and detailed answers, and of course for openresty. Learned a ton in the past day. You rock, man!
Thanks to your advice and support, I’ve managed to build a small working container with stripped binaries and am very happy.
Thanks again,
Jon
> On 13 janv. 2015, at 21:25, Yichun Zhang (agentzh) <age...@gmail.com> wrote:
>
> Hello!
>
> On Mon, Jan 12, 2015 at 9:31 AM, Jonathan wrote:
>> To add to the issue with debug version:
>
> Let me re-emphasize that builds with debug symbols are not "debug
> versions" of builds. You won't see any measurable runtime overhead
> involved with the inclusion of debug symbols, either in terms of
> memory footprint and performance. You just pay a little bit more disk
> space, which is never an issue for non-embedded systems today.
>
>> even if I manually clean up -g flags
>> from all makefiles, luajit library seems to still include debug symbols.
>
> LuaJIT includes hand-written assembly code which does not go through
> any C compilers. You need to remove the "CCDEBUG=-g" argument from
> LuaJIT's "make" command line. Or easier, as I've said, use the "strip"
> utility after the build.
>
>> The
>> size of libluajit comes out at 3M, while I'd expect it to be around 500K:
>>
>> du -haL usr/local/luajit/lib
>> 3.0M usr/local/luajit/lib/libluajit-5.1.so.2
>
> This file is a symbolic link to libluajit-5.1.so.2.1.0.
>
>> 5.7M usr/local/luajit/lib/libluajit-5.1.a
>
> You usually don't need this.
>
>> It appears that this build is a development version, as it installs the
>> headers and so on. What would be the right way to install a minimum-size
>> working production version?
>>
>
> You can just remove whatever files you don't need. But as I've said
> these files are really small as compared to many other things and we
> always install them by default in production, which can make online
> debugging much easier.
>
> Regards,
> -agentzh
>
>