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K TG9va2luZyBhdCBbNF0gdGhlIG1lc3NhZ2UgIkNhbid0IHJlYWQgQUJJIHJlZmVyZW5jZS4i IGNvdWxkIGluZGljYXRlIGEgDQptaXNzaW5nIGZpbGUgLSBmaWxlbmFtZSBpcyBkZWZpbmVk IGluIGxpbmUgNTEgKFs1XSkgYW5kIGAvZGViaWFuL2FiaS9gIA0KZG9lcyBub3QgZXhpc3Qg aW4gWzNdLg0KDQpbNF06IA0KaHR0cHM6Ly9zYWxzYS5kZWJpYW4ub3JnL2tlcm5lbC10ZWFt L2xpbnV4Ly0vYmxvYi9tYXN0ZXIvZGViaWFuL2Jpbi9idWlsZGNoZWNrLnB5I0w1NC1MNzIN Cg0KWzVdOiANCmh0dHBzOi8vc2Fsc2EuZGViaWFuLm9yZy9rZXJuZWwtdGVhbS9saW51eC8t L2Jsb2IvbWFzdGVyL2RlYmlhbi9iaW4vYnVpbGRjaGVjay5weSNMNTENCg0KQ2hlZXJzLA0K RnJhbmsNCg==

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to All on Wed Jan 4 22:20:01 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Frank Scheiner on Wed Jan 4 23:40:01 2023
    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
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to John Paul Adrian Glaubitz on Thu Jan 5 13:30:01 2023
    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
    : :' : Debian Developer
    `. `' Physicist
    `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From John Paul Adrian Glaubitz@21:1/5 to Ben Hutchings on Thu Jan 5 17:40:01 2023
    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 <masahiroy@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

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ben Hutchings@21:1/5 to John Paul Adrian Glaubitz on Thu Jan 5 17:50:01 2023
    --=-R/E/sykBfwqMv/zoijbp
    Content-Type: text/plain; charset="UTF-8"
    Content-Transfer-Encoding: quoted-printable

    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 <masahiroy@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.

    --=-R/E/sykBfwqMv/zoijbp
    Content-Disposition: attachment;
    filename*0 01-alpha-Fix-missing-symbol-versions-for-str-n-cat-cpy.patc;
    filename*1=h
    Content-Transfer-Encoding: base64
    Content-Type: text/x-patch;
    name="0001-alpha-Fix-missing-symbol-versions-for-str-n-cat-cpy.patch";
    charset="UTF-8"

    RnJvbSAzYzJhMjZiMzIxZDViYTMwNTM5ODZhNTM5NDA0MzQwMTQwNTlhY2E3IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBCZW4gSHV0Y2hpbmdzIDxiZW5AZGVjYWRlbnQub3JnLnVrPgpE YXRlOiBUaHUsIDUgSmFuIDIwMjMgMTc6MDQ6NDAgKzAxMDAKU3ViamVjdDogW1BBVENIXSBhbHBo YTogRml4IG1pc3Npbmcgc3ltYm9sIHZlcnNpb25zIGZvciBzdHJ7LG59e2NhdCxjcHl9CgpOb3cg dGhhdCBtb2Rwb3N0IGV4dHJhY3RzIHN5bWJvbCB2ZXJzaW9ucyBmcm9tICouY21kIGZpbGVzLCBp dCBjYW4ndApmaW5kIHRoZSB2ZXJzaW9ucyBmb3IgdGhlc2UgNCBzeW1ib2xzLiAgVGhpcyBpcyBk dWUgdG8gdGhlIHdheSB3ZSBsaW5rCnRoZWlyIG9iamVjdHMgdG9nZXRoZXIgYWhlYWQgb2YgdGhl IGZ1bGwgdm1saW51eCBsaW5rLiAgZ2Vua3N5bXMgcHV0cwp0aGVpciBzeW1ib2wgQ1JDcyB
  • From John Paul Adrian Glaubitz@21:1/5 to John Paul Adrian Glaubitz on Fri Jan 6 09:10:01 2023
    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

    Adrian

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)