[Bug 2070015] Re: DEB_* environment variables not set when using /usr/share/dpkg/buildflags.mk

Lucas Kanashiro 2070015 at bugs.launchpad.net
Wed Aug 14 23:28:39 UTC 2024


I am trying to rebuild some ruby packages as part of the ruby 3.3
transition, and I see some packages failing to build  because of this:

gcc: fatal error: environment variable ‘DEB_VERSION’ not defined

I see they are using dpkg version 1.22.11ubuntu1 (which in theory should
contain the fix):

Get:46 http://archive.ubuntu.com/ubuntu oracular/main amd64 dpkg amd64
1.22.11ubuntu1 [1301 kB]

To reproduce this error in one of those packages you can run:

$ pull-lp-source ruby-bcrypt
$ cd ruby-bcrypt-3.1.18
$ sbuild -d oracular --build-dep-resolver=aspcud --no-clean-source --no-run-lintian --add-depends="ruby-all-dev (>= 1:3.3~ubuntu2)" --extra-repository="deb http://archive.ubuntu.com/ubuntu/ oracular-proposed main universe"

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dpkg in Ubuntu.
https://bugs.launchpad.net/bugs/2070015

Title:
  DEB_* environment variables not set when using
  /usr/share/dpkg/buildflags.mk

Status in cdbs package in Ubuntu:
  Fix Released
Status in dpkg package in Ubuntu:
  Fix Released

Bug description:
  Hello, few things broke with last dpkg uploads:
  https://pastebin.ubuntu.com/p/2GN5fdtpsz/
  configure:2498: gcc -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=/rp-pppoe-4.0-1ubuntu1=. -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=/rp-pppoe-4.0-1ubuntu1=/usr/src/rp-pppoe-4.0-1ubuntu1 -Wdate-time -D_FORTIFY_SOURCE=3 -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -Wl,-z,relro -Wl,-z,now -specs=/usr/share/dpkg/elf-package-metadata.specs conftest.c  >&5
  gcc: fatal error: environment variable 'DEB_VERSION' not defined

  (probably this is due to not having the standard dh calls)

  Also,
  Use of uninitialized value in string eq at /usr/bin/dpkg-genbuildinfo line 337.
  Are printed for newly introduced variables:
  DEB_BUILD_OS_RELEASE_ID DEB_SOURCE DEB_VERSION

  Example of failing package:
  https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/2070015

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cdbs/+bug/2070015/+subscriptions




More information about the foundations-bugs mailing list