Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unversioned symbols when building kernel package

4 views
Skip to first unread message

John Paul Adrian Glaubitz

unread,
Jan 4, 2023, 4:20:03 PM1/4/23
to
Hello!

I just tried to build the Debian kernel package for alpha which fails with:

debian/bin/buildcheck.py debian/build/build_alpha_none_alpha-generic alpha none alpha-generic
ABI is not completely versioned! Refusing to continue.

Unversioned symbols:
strcat module: vmlinux, version: 0x00000000, export: EXPORT_SYMBOL
strcpy module: vmlinux, version: 0x00000000, export: EXPORT_SYMBOL
strncat module: vmlinux, version: 0x00000000, export: EXPORT_SYMBOL
strncpy module: vmlinux, version: 0x00000000, export: EXPORT_SYMBOL
Can't read ABI reference. ABI not checked!
make[2]: *** [debian/rules.real:218: debian/stamps/build_alpha_none_alpha-generic] Error 1
make[2]: Leaving directory '/<<PKGBUILDDIR>>'
make[1]: *** [debian/rules.gen:426: build-arch_alpha_none_alpha-generic_real] Error 2
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:39: build-arch] Error 2
dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2

According to this comment by Ben [1], this is an issue that is trivially fixed by adding the
appropriate header to arch/$ARCH/include/asm-prototypes.h. However, looking at the header
file, "#include <asm/string.h>" is already present so I'm not sure what else we're missing.

Adrian

> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=908161#10

--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

Frank Scheiner

unread,
Jan 4, 2023, 5:13:53 PM1/4/23
to
Hi Adrian,
Indeed, and that file ([1]) wasn't touched in 5 years. I wonder if that
then is not an error of the Debian build scripts.

[1]:
https://github.com/torvalds/linux/blob/master/arch/alpha/include/asm/string.h

BTW the same error is already present for 5.19.6-1 - the build ran on
2022-09-18. Maybe the error corresponds with a change in the Debian
linux repo ([3]) before that date.

[2]:
https://buildd.debian.org/status/fetch.php?pkg=linux&arch=alpha&ver=5.19.6-1&stamp=1663530012&raw=0)

[3]: https://salsa.debian.org/kernel-team/linux

Looking at [4] the message "Can't read ABI reference." could indicate a
missing file - filename is defined in line 51 ([5]) and `/debian/abi/`
does not exist in [3].

[4]:
https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/bin/buildcheck.py#L54-L72

[5]:
https://salsa.debian.org/kernel-team/linux/-/blob/master/debian/bin/buildcheck.py#L51

Cheers,
Frank

John Paul Adrian Glaubitz

unread,
Jan 4, 2023, 5:40:03 PM1/4/23
to
Hi!

On 1/4/23 23:00, Frank Scheiner wrote:
>> According to this comment by Ben [1], this is an issue that is trivially fixed by adding the
>> appropriate header to arch/$ARCH/include/asm-prototypes.h. However, looking at the header
>> file, "#include <asm/string.h>" is already present so I'm not sure what else we're missing.
>
> Indeed, and that file ([1]) wasn't touched in 5 years. I wonder if that then is not an error of the Debian build scripts.
>
> [1]: https://github.com/torvalds/linux/blob/master/arch/alpha/include/asm/string.h

That's not really an argument. It's also possible that the file needs to be updated.

> BTW the same error is already present for 5.19.6-1 - the build ran on 2022-09-18. Maybe the
> error corresponds with a change in the Debian linux repo ([3]) before that date.
>
> Looking at [4] the message "Can't read ABI reference." could indicate a missing file - filename
> is defined in line 51 ([5]) and `/debian/abi/` does not exist in [3].

I don't think it's a bug in the Debian scripts. Otherwise it wouldn't just affect alpha.

Adrian

John Paul Adrian Glaubitz

unread,
Jan 5, 2023, 7:30:04 AM1/5/23
to
Hi Frank!

On 1/4/23 23:31, John Paul Adrian Glaubitz wrote:
>> Looking at [4] the message "Can't read ABI reference." could indicate a missing file - filename
>> is defined in line 51 ([5]) and `/debian/abi/` does not exist in [3].
>
> I don't think it's a bug in the Debian scripts. Otherwise it wouldn't just affect alpha.

Some more diagnostics, it seems that the sh4 FTBFS is related to the alpha problem.
On sh4, the builds are also failing due to issues with local symbols [1]:

/<<PKGBUILDDIR>>/scripts/check-local-export fs/reiserfs/xattr_security.o
/<<PKGBUILDDIR>>/scripts/check-local-export: line 54: symbol_types[${name}]: bad array subscript
make[5]: *** [/<<PKGBUILDDIR>>/scripts/Makefile.build:254: fs/reiserfs/xattr_security.o] Error 1
make[5]: *** Deleting file 'fs/reiserfs/xattr_security.o'
make[4]: *** [/<<PKGBUILDDIR>>/scripts/Makefile.build:470: fs/reiserfs] Error 2
make[3]: *** [/<<PKGBUILDDIR>>/Makefile:1876: fs] Error 2

And for a local build, I'm getting the following failure:

/<<PKGBUILDDIR>>/scripts/check-local-export fs/unicode/utf8-core.o
fs/unicode/utf8-core.o: error: local symbol '__ksymtab_utf8_casefold' was exported
make[5]: *** [/<<PKGBUILDDIR>>/scripts/Makefile.build:254: fs/unicode/utf8-core.o] Error 1
make[5]: *** Deleting file 'fs/unicode/utf8-core.o'
make[4]: *** [/<<PKGBUILDDIR>>/scripts/Makefile.build:470: fs/unicode] Error 2
make[4]: *** Waiting for unfinished jobs....

So, we might have to investigate the recent changes to the scripts/check-local-export script.

Adrian

> [1] https://buildd.debian.org/status/fetch.php?pkg=linux&arch=sh4&ver=6.0.2-1&stamp=1665950645&raw=0

John Paul Adrian Glaubitz

unread,
Jan 5, 2023, 11:40:04 AM1/5/23
to
Hi Ben!

On 1/5/23 17:15, Ben Hutchings wrote:
> From the Debian build logs, this regressed between 5.18 and 5.19. I
> have bisected this to:
>
> commit f292d875d0dc700b3af0bef04c5abc1dc7b3b62c
> Author: Masahiro Yamada <masa...@kernel.org>
> Date: Fri May 13 20:39:21 2022 +0900
>
> modpost: extract symbol versions from *.cmd files
>
> Following this, although the 4 problem symbols have CRCs listed in
> their respective cmd files (arch/alpha/.strcat.o.cmd etc.) those don't
> end up in Modules.symvers.

Awesome, thanks for the work!

> I noticed that the object files for these 4 functions are handled
> specially at the bottom of arch/alpha/lib/Makefile, and that interacts
> badly with this change to modpost. The attached patch fixes this for
> me, but please test it to check that the output actually works.

I'll test the patch and report back as soon as possible!

Adrian

Ben Hutchings

unread,
Jan 5, 2023, 11:50:03 AM1/5/23
to
On Wed, 2023-01-04 at 22:15 +0100, John Paul Adrian Glaubitz wrote:
> Hello!
>
> I just tried to build the Debian kernel package for alpha which fails with:
>
> debian/bin/buildcheck.py debian/build/build_alpha_none_alpha-generic alpha none alpha-generic
> ABI is not completely versioned! Refusing to continue.
>
> Unversioned symbols:
> strcat module: vmlinux, version: 0x00000000, export: EXPORT_SYMBOL
> strcpy module: vmlinux, version: 0x00000000, export: EXPORT_SYMBOL
> strncat module: vmlinux, version: 0x00000000, export: EXPORT_SYMBOL
> strncpy module: vmlinux, version: 0x00000000, export: EXPORT_SYMBOL
> Can't read ABI reference. ABI not checked!
> make[2]: *** [debian/rules.real:218: debian/stamps/build_alpha_none_alpha-generic] Error 1
> make[2]: Leaving directory '/<<PKGBUILDDIR>>'
> make[1]: *** [debian/rules.gen:426: build-arch_alpha_none_alpha-generic_real] Error 2
> make[1]: Leaving directory '/<<PKGBUILDDIR>>'
> make: *** [debian/rules:39: build-arch] Error 2
> dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2
>
> According to this comment by Ben [1], this is an issue that is trivially fixed by adding the
> appropriate header to arch/$ARCH/include/asm-prototypes.h. However, looking at the header
> file, "#include <asm/string.h>" is already present so I'm not sure what else we're missing.
[...]

From the Debian build logs, this regressed between 5.18 and 5.19. I
have bisected this to:

commit f292d875d0dc700b3af0bef04c5abc1dc7b3b62c
Author: Masahiro Yamada <masa...@kernel.org>
Date: Fri May 13 20:39:21 2022 +0900

modpost: extract symbol versions from *.cmd files

Following this, although the 4 problem symbols have CRCs listed in
their respective cmd files (arch/alpha/.strcat.o.cmd etc.) those don't
end up in Modules.symvers.

I noticed that the object files for these 4 functions are handled
specially at the bottom of arch/alpha/lib/Makefile, and that interacts
badly with this change to modpost. The attached patch fixes this for
me, but please test it to check that the output actually works.

Ben.

--
Ben Hutchings
Never attribute to conspiracy what can adequately be explained
by stupidity.
0001-alpha-Fix-missing-symbol-versions-for-str-n-cat-cpy.patch
signature.asc

John Paul Adrian Glaubitz

unread,
Jan 6, 2023, 3:10:02 AM1/6/23
to
Hi Ben!

On 1/5/23 17:39, John Paul Adrian Glaubitz wrote:
>> I noticed that the object files for these 4 functions are handled
>> specially at the bottom of arch/alpha/lib/Makefile, and that interacts
>> badly with this change to modpost. The attached patch fixes this for
>> me, but please test it to check that the output actually works.
>
> I'll test the patch and report back as soon as possible!

I can confirm that your patch fixes the FTBFS for me and the package builds
fine. Would be great if the patch could be part of the next Debian revision
of the kernel so I can build the kernel package manually to unbreak the
dependency cycle.

Build Architecture: alpha
Build Profiles: nocheck
Build Type: any
Build-Space: 31984520
Build-Time: 32932
Distribution: sid
Host Architecture: alpha
Install-Time: 63
Job: /local_scratch/glaubitz/linux/linux_6.0.12-1.dsc
Lintian: error
Machine Architecture: amd64
Package: linux
Package-Time: 33070
Source-Version: 6.0.12-1
Space: 31984520
Status: successful
Version: 6.0.12-1
0 new messages