Bug 11891 - 4.4.3 fails to cross compile
4.4.3 fails to cross compile
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
All All
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
Depends on:
  Show dependency treegraph
Reported: 2016-05-03 15:36 UTC by Enno Boland
Modified: 2016-05-08 08:10 UTC (History)
3 users (show)

See Also:

samba-4.4.3/bin/config.log (gzipped) (297.39 KB, application/gzip)
2016-05-03 15:36 UTC, Enno Boland
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Enno Boland 2016-05-03 15:36:05 UTC
Created attachment 12058 [details]
samba-4.4.3/bin/config.log (gzipped)

After some tweaking, I got samba configuring correctly for cross compile using --cross-answers. 

Unfortunately samba fails to compile correctly and fails with 

/bin/sh: /builddir/samba-4.4.3/bin/asn1_compile: cannot execute binary file: Exec format error
/bin/sh: /builddir/samba-4.4.3/bin/asn1_compile: cannot execute binary file: Exec format error
/bin/sh: /builddir/samba-4.4.3/bin/asn1_compile: cannot execute binary file: Exec format error
Waf: Leaving directory `/builddir/samba-4.4.3/bin'
Build failed:
 -> task failed (err #126): 
	{task: HEIMDAL_KX509_ASN1_ASN1 kx509.asn1 -> asn1_kx509_asn1.x,kx509_asn1.hx,kx509_asn1-priv.hx}
 -> task failed (err #126): 
	{task: HEIMDAL_DIGEST_ASN1_ASN1 digest.asn1 -> asn1_digest_asn1.x,digest_asn1.hx,digest_asn1-priv.hx}
 -> task failed (err #126): 
	{task: HEIMDAL_HDB_ASN1_ASN1 hdb.asn1 -> asn1_hdb_asn1.x,hdb_asn1.hx,hdb_asn1-priv.hx}
 -> task failed (err #126): 
	{task: HEIMDAL_GSSAPI_ASN1_ASN1 gssapi.asn1 -> asn1_gssapi_asn1.x,gssapi_asn1.hx,gssapi_asn1-priv.hx}

If I understand correctly in source4/heimdal_build/wscript_build line 914 the build system is told to build ans1_compile with "use_hostcc" but it looks like this option is ignored.

-- Enno Boland
Comment 1 trenta 2016-05-07 23:05:30 UTC
Trying to compile samba 4.4.3 with Debian 8 jessie and all test are OK, but first fails 
# smbclient -L localhost -U%
Domain=[SAMDOM] OS=[Windows 6.1] Server=[Samba 4.4.3]

With 4.4.2 seems to work

How can I solve?
Comment 3 Enno Boland 2016-05-07 23:16:04 UTC
That's a different issue, this is about _cross_ compiling
Comment 4 trenta 2016-05-08 08:10:36 UTC
Ok, created a new bug https://bugzilla.samba.org/show_bug.cgi?id=11910