• Bug#1038891: libdpkg-perl: unrecognized hardcoded CC flags in scripts/D

    From VSYakovetsky@1:229/2 to All on Thu Jun 22 19:00:01 2023
    XPost: linux.debian.bugs.dist
    From: [email protected]

    Package: libdpkg-perl
    Version: 1.21.22ubuntu1
    Severity: minor
    X-Debbugs-Cc: [email protected]

    Dear Maintainer,

    *** Reporter, please consider answering these questions, where appropriate ***

    * What led up to the situation?
    - building deb package with dpkg-buildpackage and clang
    - hardcoded -ffat-lto-objects cc flag in scripts/Dpkg/Vendor/Debian.pm
    https://git.dpkg.org/git/dpkg/dpkg.git/tree/scripts/Dpkg/Vendor/Debian.pm#n451

    * What exactly did you do (or not do) that was effective (or ineffective)?
    CC=clang dpkg-buildpackage ...

    * What was the outcome of this action?
    clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]

    * What outcome did you expect instead?
    not sorting out rare flags specific to one compiler
    (a possible workaround was manually set DEB_CFLAGS_STRIP=-ffat-lto-objects in environment)

    *** End of the template - remove these template lines ***


    -- Package-specific info:
    This system uses merged-usr-via-aliased-dirs, going behind dpkg's
    back, breaking its core assumptions. This can cause silent file
    overwrites and disappearances, and its general tools misbehavior.
    See <https://wiki.debian.org/Teams/Dpkg/FAQ#broken-usrmerge>.

    -- System Information:
    Debian Release: bookworm/sid
    APT prefers lunar-updates
    APT policy: (990, 'lunar-updates'), (990, 'lunar-security'), (990, 'lunar-backports'), (990, 'lunar'), (500, 'mantic')
    Architecture: amd64 (x86_64)
    Foreign Architectures: i386

    Kernel: Linux 6.2.0-23-generic (SMP w/4 CPU threads; PREEMPT)
    Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
    Locale: LANG=uk_UA.UTF-8, LC_CTYPE=uk_UA.UTF-8 (charmap=UTF-8), LANGUAGE not set
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages libdpkg-perl depends on:
    ii dpkg 1.21.22ubuntu1
    ii perl 5.36.0-7ubuntu0.23.04.1

    Versions of packages libdpkg-perl recommends:
    ii bzip2 1.0.8-5build1
    ii libfile-fcntllock-perl 0.22-4build1
    ii liblocale-gettext-perl 1.07-5
    ii xz-utils 5.4.1-0.2

    Versions of packages libdpkg-perl suggests:
    ii binutils 2.40-2ubuntu4.1
    pn bzr <none>
    ii clang-15 [c-compiler] 1:15.0.7-3
    ii clang-16 [c-compiler] 1:16.0.0-1~exp5ubuntu3
    pn debian-keyring <none>
    ii gcc [c-compiler] 4:12.2.0-3ubuntu1
    ii gcc-12 [c-compiler] 12.2.0-17ubuntu1
    ii gcc-13 [c-compiler] 13-20230320-1ubuntu1
    ii git 1:2.39.2-1ubuntu1.1
    ii gnupg 2.2.40-1.1ubuntu1
    ii gpgv 2.2.40-1.1ubuntu1
    ii patch 2.7.6-7build2
    ii sensible-utils 0.0.17+nmu1

    -- no debconf information

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Guillem Jover@1:229/2 to VSYakovetsky on Wed Jun 28 01:30:01 2023
    XPost: linux.debian.bugs.dist
    From: [email protected]

    Hi!

    On Thu, 2023-06-22 at 19:46:11 +0300, VSYakovetsky wrote:
    Package: libdpkg-perl
    Version: 1.21.22ubuntu1
    Severity: minor
    X-Debbugs-Cc: [email protected]

    * What led up to the situation?
    - building deb package with dpkg-buildpackage and clang
    - hardcoded -ffat-lto-objects cc flag in scripts/Dpkg/Vendor/Debian.pm
    https://git.dpkg.org/git/dpkg/dpkg.git/tree/scripts/Dpkg/Vendor/Debian.pm#n451

    This has come up in the past, and while it would be nice to be able to
    support multiple compilers in general for a specific vendor the build
    flags default and are adapted just to the default compiler for that distribution.

    Here's mail covering what autodetection would involve if this was to
    be supported:

    https://lists.debian.org/debian-dpkg/2014/06/msg00050.html

    * What exactly did you do (or not do) that was effective (or ineffective)?
    CC=clang dpkg-buildpackage ...

    * What was the outcome of this action?
    clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]

    * What outcome did you expect instead?
    not sorting out rare flags specific to one compiler
    (a possible workaround was manually set DEB_CFLAGS_STRIP=-ffat-lto-objects in environment)

    Yes, in this case if you change the compiler, then you need to adapt
    any such build flags that might not play well with it.

    So, I'm afraid there's not much that can be done here. Perhaps this
    could be documented somewhere more prominently, but I'm not sure
    where, perhaps the dpkg-buildpackage or dpkg-buildflags man pages or
    similar, not sure if that would have helped in your case?

    Otherwise, I'm inclined to probably be closing this in a bit.

    Thanks,
    Guillem

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Guillem Jover@1:229/2 to Guillem Jover on Tue Jul 4 09:20:01 2023
    XPost: linux.debian.bugs.dist
    From: [email protected]

    Hi!

    On Wed, 2023-06-28 at 01:02:30 +0200, Guillem Jover wrote:
    On Thu, 2023-06-22 at 19:46:11 +0300, VSYakovetsky wrote:
    Package: libdpkg-perl
    Version: 1.21.22ubuntu1
    Severity: minor
    X-Debbugs-Cc: [email protected]

    * What exactly did you do (or not do) that was effective (or ineffective)?
    CC=clang dpkg-buildpackage ...

    * What was the outcome of this action?
    clang: warning: optimization flag '-ffat-lto-objects' is not supported [-Wignored-optimization-argument]

    * What outcome did you expect instead?
    not sorting out rare flags specific to one compiler
    (a possible workaround was manually set DEB_CFLAGS_STRIP=-ffat-lto-objects in environment)

    Yes, in this case if you change the compiler, then you need to adapt
    any such build flags that might not play well with it.

    So, I'm afraid there's not much that can be done here. Perhaps this
    could be documented somewhere more prominently, but I'm not sure
    where, perhaps the dpkg-buildpackage or dpkg-buildflags man pages or
    similar, not sure if that would have helped in your case?

    I got a reply off-BTS where VSYakovetsky mentioned it would be fine to
    close. I still think this could do with some documentation somewhere
    so I'll ponder about this, and otherwise either will improve some docs…

    Otherwise, I'm inclined to probably be closing this in a bit.

    …or if I don't come up with anything will be closing it.

    Thanks,
    Guillem

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)