linux 5.3 breaks building glibc for riscv64

Bug #1843458 reported by Matthias Klose
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cross-toolchain-base-ports (Ubuntu)
Fix Released
High
Unassigned

Bug Description

seen in
https://launchpad.net/ubuntu/+source/cross-toolchain-base-ports/35ubuntu1/+build/17748279

/<<PKGBUILDDIR>>/glibc-2.30/debian/include/linux/sched.h: Assembler messages:
/<<PKGBUILDDIR>>/glibc-2.30/debian/include/linux/sched.h:39: Error: unrecognized opcode `struct clone_args{'
/<<PKGBUILDDIR>>/glibc-2.30/debian/include/linux/sched.h:40: Error: unrecognized opcode `__aligned_u64 flags'
/<<PKGBUILDDIR>>/glibc-2.30/debian/include/linux/sched.h:41: Error: unrecognized opcode `__aligned_u64 pidfd'
/<<PKGBUILDDIR>>/glibc-2.30/debian/include/linux/sched.h:42: Error: unrecognized opcode `__aligned_u64 child_tid'
/<<PKGBUILDDIR>>/glibc-2.30/debian/include/linux/sched.h:43: Error: unrecognized opcode `__aligned_u64 parent_tid'
/<<PKGBUILDDIR>>/glibc-2.30/debian/include/linux/sched.h:44: Error: unrecognized opcode `__aligned_u64 exit_signal'
/<<PKGBUILDDIR>>/glibc-2.30/debian/include/linux/sched.h:45: Error: unrecognized opcode `__aligned_u64 stack'
/<<PKGBUILDDIR>>/glibc-2.30/debian/include/linux/sched.h:46: Error: unrecognized opcode `__aligned_u64 stack_size'
/<<PKGBUILDDIR>>/glibc-2.30/debian/include/linux/sched.h:47: Error: unrecognized opcode `__aligned_u64 tls'
/<<PKGBUILDDIR>>/glibc-2.30/debian/include/linux/sched.h:48: Error: junk at end of line, first unrecognized character is `}'
make[4]: *** [/<<PKGBUILDDIR>>/glibc-2.30/build-tree/riscv64-libc/sysd-rules:57: /<<PKGBUILDDIR>>/glibc-2.30/build-tree/riscv64-libc/posix/vfork.os] Error 1

Matthias Klose (doko)
Changed in cross-toolchain-base-ports (Ubuntu):
status: New → Confirmed
importance: Undecided → High
tags: added: ftbfs rls-ee-incoming
Revision history for this message
Seth Forshee (sforshee) wrote :

Hmm, perhaps clone_args needs to be within a #ifndef __ASSEMBLY__ block ...

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

but it doesn't break on any other arch.

Revision history for this message
Seth Forshee (sforshee) wrote : Re: [Bug 1843458] Re: linux 5.3 breaks building glibc for riscv64

On Wed, Sep 11, 2019 at 03:25:06PM -0000, Dimitri John Ledkov wrote:
> but it doesn't break on any other arch.

Yes because risc-v is the only arch which includes that file into an
assembly source file.

I'm building a test build which adds the __ASSEMBLY__ guards around the
struct for testing, should be ready soon.

Revision history for this message
Seth Forshee (sforshee) wrote :

Here's the test build:

https://people.canonical.com/~sforshee/lp1843458/

Please let me know whether or not this fixes the issue.

Revision history for this message
Matthias Klose (doko) wrote :

can't test, because the provided linux-source package is empty.

Revision history for this message
Seth Forshee (sforshee) wrote :

Sorry, forgot that we generate an empty linux source package for test builds. I replaced that with another build with that "feature" turned off, in the same location.

Revision history for this message
Matthias Klose (doko) wrote :

this fixes the issue. Please point to a commit, or a patch fixing the issue.

Revision history for this message
Seth Forshee (sforshee) wrote :

The patch is in the same directory as the build. I've applied it for eoan, it will be in the next upload. Will also send the patch upstream.

https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/eoan/commit/?h=master-next&id=9b4605005a307039e66de2db416ed826399e5103

Revision history for this message
Christian Brauner (cbrauner) wrote :

Fwiw, Seth sent the patch upstream and it's in mainline and backported already:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=61129dd29f7962f278b618a2a3e8fdb986a66dc8

Changed in cross-toolchain-base-ports (Ubuntu):
status: Confirmed → Fix Committed
Matthias Klose (doko)
Changed in cross-toolchain-base-ports (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.