Bug 13856 - Samba 4.10.0 cross-compile issue when compiling Heimdal
Samba 4.10.0 cross-compile issue when compiling Heimdal
Status: NEW
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build
4.10.0
All All
: P5 normal
: ---
Assigned To: Samba QA Contact
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-03-22 12:57 UTC by Neil MacLeod
Modified: 2019-04-03 00:31 UTC (History)
2 users (show)

See Also:


Attachments
4.9.5 configuration (5.92 KB, text/plain)
2019-04-03 00:29 UTC, Neil MacLeod
no flags Details
4.10.0 configuration (5.95 KB, text/plain)
2019-04-03 00:29 UTC, Neil MacLeod
no flags Details
4.9.5 build log (Successful) (551.38 KB, text/plain)
2019-04-03 00:31 UTC, Neil MacLeod
no flags Details
4.10.0 build log (Failure) (250.24 KB, text/plain)
2019-04-03 00:31 UTC, Neil MacLeod
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Neil MacLeod 2019-03-22 12:57:03 UTC
We build Samba for LibreELEC, a custom Linux distribution, cross-compiling with our own gcc-8.3.0 toolchain.

We patch gcc to detect incorrect build host include usage when building for the target[1].

We are able to build Samba 4.9.5 with Heimdal 7.5.0[2] without issue (successful build log[3]) - all is good.

However, we are seeing a cross-compile problem with Samba 4.10.0[4], which now triggers a cross-compilation failure when building the "embedded" Heimdal.

Specifically, /usr/include/heimdal is being used by the Samba 4.10.0 build process which is incorrect when cross-compiling, and this did not happen with Samba 4.9.5.

This is the Samba 4.9.5 configuration: http://ix.io/1DXj

And this is the Samba 4.10.0 configuration: http://ix.io/1DXi (I'm including the fix for https://bugzilla.samba.org/show_bug.cgi?id=13844)

Any ideas why this cross-compile problem happens with Samba 4.10.0 but does NOT happen with Samba 4.9.5?

Note: The "link" error and truncation warnings may also be of interest - the truncation warning is also present in 4.9.5 (search for "_heim_time2generalizedtime").

1. https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/lang/gcc/patches/gcc-crosscompile-badness.patch
2. https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/devel/heimdal/package.mk
3. http://ix.io/1E26
4. http://ix.io/1E1W
Comment 1 David Disseldorp 2019-03-22 13:22:15 UTC
As discussed on IRC, the explicit include path added via source4/heimdal_build/wscript_build appears to be responsible for the failure, but I don't know why it wasn't causing issues with the 4.9 build.

I'm also a little confused as to why heimdal is even built, given the --without-winbind --without-ads --without-ad-dc configure invocation.
Comment 2 Andrew Bartlett 2019-04-03 00:12:58 UTC
(In reply to David Disseldorp from comment #1)
We still use the internal heimdal unless --with-system-mitkrb5 or --with-system-heimdalkrb5

This specifically allowed us to upgrade our minimum kerberos requirement because we could fall back on the internal one (a bit like the way we use third_party).
Comment 3 Neil MacLeod 2019-04-03 00:29:19 UTC
Created attachment 15036 [details]
4.9.5 configuration
Comment 4 Neil MacLeod 2019-04-03 00:29:51 UTC
Created attachment 15037 [details]
4.10.0 configuration
Comment 5 Neil MacLeod 2019-04-03 00:31:21 UTC
Created attachment 15038 [details]
4.9.5 build log (Successful)
Comment 6 Neil MacLeod 2019-04-03 00:31:50 UTC
Created attachment 15039 [details]
4.10.0 build log (Failure)