Bug 33924 - multi-arch linux-libc-dev_3.10.11 breaks other builds
multi-arch linux-libc-dev_3.10.11 breaks other builds
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Kernel
UCS 3.2
amd64 Linux
: P1 normal (vote)
: UCS 3.2-0-errata
Assigned To: Philipp Hahn
Moritz Muehlenhoff
:
Depends on: 32203
Blocks: 20481 33316 35531
  Show dependency treegraph
 
Reported: 2014-01-14 13:03 CET by Philipp Hahn
Modified: 2016-02-25 16:30 CET (History)
1 user (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): API change
Max CVSS v3 score:
hahn: Patch_Available+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2014-01-14 13:03:34 CET
With the switch from linux-3.2 to linux-3.10 "linux-libc-dev" went multi-arch, that is /usr/include/asm/ no longer exists but /usr/include/x86_64-linux-gnu/asm/:

# <http://packages.debian.org/wheezy-backports/amd64/linux-libc-dev/filelist>
# dpkg -c linux-libc-dev_3.10.11-1.43.201310101020_amd64.deb | grep '^d.*/usr/include/.*asm.*/$'
drwxr-xr-x root/root         0 2013-10-10 19:31 ./usr/include/x86_64-linux-gnu/asm/
drwxr-xr-x root/root         0 2013-10-10 19:31 ./usr/include/asm-generic/

# dpkg -c linux-libc-dev_3.2.39-2.27.201303061719_amd64.deb | grep '^d.*/usr/include/.*asm.*/$'
drwxr-xr-x root/root         0 2013-03-06 20:47 ./usr/include/asm/
drwxr-xr-x root/root         0 2013-03-06 20:47 ./usr/include/asm-generic/

This breaks at least building xen-4.1-3, as "#include <errno.h>" no longer works as before:
$ cat /usr/include/linux/errno.h
#include <asm/errno.h>

$ gcc -E xen-4.1.3/tools/firmware/hvmloader/xenbus.c | fgrep errno.h
# 1 "/usr/include/errno.h" 1 3 4
# 32 "/usr/include/errno.h" 3 4
# 1 "/usr/include/bits/errno.h" 1 3 4
# 25 "/usr/include/bits/errno.h" 3 4
# 1 "/usr/include/linux/errno.h" 1 3 4
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< here asm/errno.h is missing!
# 26 "/usr/include/bits/errno.h" 2 3 4
# 43 "/usr/include/bits/errno.h" 3 4
# 37 "/usr/include/errno.h" 2 3 4
# 59 "/usr/include/errno.h" 3 4

xen-4.1_4.1.3-13.38.201309041411 was last successfully built with linux-libc-dev (3.10~rc7-1~exp1.36.201307051137).

Support for pre-multiarch-dpkg was removed in <http://anonscm.debian.org/viewvc/kernel?view=revision&revision=20327>. At least the following hunk must be reverted:

--- dists/trunk/linux/debian/rules.real 2013/06/02 21:20:17     20182
+++ dists/trunk/linux/debian/rules.real 2013/07/02 05:06:18     20327
@ -319,13 +312,11 @@
        rm -rf $(OUT_DIR)/include/drm $(OUT_DIR)/include/scsi
        find $(OUT_DIR)/include \( -name .install -o -name ..install.cmd \) -execdir rm {} +

-ifneq (,$(DEB_HOST_MULTIARCH))
        # Move include/asm to arch-specific directory
        mkdir -p $(OUT_DIR)/include/$(DEB_HOST_MULTIARCH)
        mv $(OUT_DIR)/include/asm $(OUT_DIR)/include/$(DEB_HOST_MULTIARCH)/
-endif
Comment 1 Philipp Hahn univentionstaff 2014-01-14 20:25:57 CET
patches/linux/3.2-0-0-ucs/3.10.11-1/36-fix-multiarch-backport.patch needs to be disabled, as it breaks the detection of the missing multi-arch support.

svn12341
Private kernel build was successful, but next erratum-kernel is currently broken and fails to compile due to other changes.

For the YAML:
  The kernel update to linux-3.10 for UCS-3.2 caused the header files to move from /usr/include/adm/ to the different location /ucr/include/gnu-*-linux/asm/, which broke compiling other software. The change was reverted.
Comment 2 Moritz Muehlenhoff univentionstaff 2014-01-27 12:44:21 CET
Ok, the kernel headers are now installed to the correct location. Entry in YAML file is okay.