Re: [built failure] aicdb.h / __udivdi3

From: David Laight

Date: Wed Sep 23 2026 - 12:28:59 EST


On Wed, 23 Sep 2026 15:41:59 +0200
Manuel Ebner <manuelebnerli@xxxxxxxxxxx> wrote:

> On Tue, 2026-09-22 at 12:25 -0700, Randy Dunlap wrote:
> > Hi--
> >
> > On 9/22/26 11:13 AM, Manuel Ebner wrote:
> > > Hi,
> > >
> > > I did some built testing with randconf and got some build errors.
> > >
> > > First error is:
> > >
> > > > $ make KCFLAGS=-Werror -j8 > make_output.txt
> > > > aicasm_symbol.c:47:10: fatal error: aicdb.h: No such file or directory
> > > >    47 | #include "aicdb.h"
> > > >       |          ^~~~~~~~~
> > >
> > > This could be fixed by installing libdb-devel.
> > > But than I got this error with the same configuration:
> > >
> > > > $ make KCFLAGS=-Werror -j8 > make_output.txt
> > > > date
> > > > drivers/scsi/aic7xxx/aicasm/aicasm: 880 instructions used
> > > > drivers/scsi/aic7xxx/aicasm/aicasm: 25 of 37 register definitions used
> > > > /usr/bin/ld.bfd: fs/exfat/super.o: in function `exfat_set_vol_flags.isra.0':
> > > > super.c:(.text+0x622): undefined reference to `__udivdi3'
> > > > make[2]: *** [scripts/Makefile.vmlinux:72: vmlinux.unstripped] Error 1
> > > > make[1]: *** [/home/manuel/skripts/next/Makefile:1390: vmlinux] Error 2
> > > > make: *** [Makefile:248: __sub-make] Error 2
> > >
> > > What can I do about it?
> > > Is it me/ my system or the kernel?
> >
> > For the fs/exfat/ build error:
> >
> > What is the target (x86_64, i386, arm64, arm, etc.)?
>
> My system is x86_64.
> But i guess this means the target is 32 bit:
> > CONFIG_X86_32=y
> The rest of the .config is below.
>
> > What is the compiler and its version?
>
> gcc (GCC) 16.2.1 20260819 (Red Hat 16.2.1-2)
>
> > That error usually means that the target is a 32-bit CPU
> > and the code in question is doing an unsupported divide or
> > modulus function.
>
> Can the dependencies in the .config be improved to to make this issue impossible?
>
> > It possibly should be using a kernel macro from <linux/math.h>
> > or other headers.
>
> I figured I didn't successfully checkout next but this shouldn't change this error.

I just tried to build the .config from below against a 'quite recent' linux-next.
If fails for a couple of unrelated reasons - I edited the config to fix them.
But there isn't a divide in exfat_set_vol_flags().
I can't see one in the source either.
The usual 'next stage' is to disassemble the .o file and work out which
source line is responsible.

David