[Samba] Cross Compiling Samba 4.0.6 for ARM increases size of binaries
abartlet at samba.org
Wed Jun 5 07:42:21 MDT 2013
On Fri, 2013-05-31 at 11:05 -0700, pranav desai wrote:
> I have cross-compiled just the basic samba 4.0.6 using bitbake recipe
> for ARM, which succeeded.
> However the resulting binaries are large in size. I used the exact
> same configuration options in both the cases.
> There is at least a 10 fold increase in the smbd compared to native x86.
> --- Native x86 ----
> -rwxr-xr-x 1 pranavd users 92979 May 31 10:57 /usr/sbin/smbd
> -rwxr-xr-x 1 pranavd users 351196 May 31 10:57 /usr/sbin/nmbd
> --- Cross Compiled ----
> -rwxr-xr-x 2 pranavd users 9624696 May 30 18:11
> -rwxr-xr-x 2 pranavd users 6020020 May 30 18:11
> Can someone please suggest me how to reduce the size of the binaries?
> I have included the configuration options used.
The reason is that your native build uses our waf build, but the
cross-compile uses our autoconf build, which statically links all the
required code into each binary.
Sadly there is still a little work to be done to finish cross-compile
support in our waf build - it mostly needs an interested developer to
take on injecting the remote python version and flags into the system,
rather than these from inside the python that is running the build.
Other than that, the build system was built to do this, but it just
hasn't been finished, and most cross-compile recipes remain for
autoconf, because that is what all the hand-tuning was done for.
Note that the autoconf build is fully supported for Samba 4.0, but won't
be included in Samba 4.1.
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba