On Thu, Nov 6, 2014 at 2:09 PM, John Paul Adrian Glaubitz
<glaub...@physik.fu-berlin.de> wrote:
> Hi Daniel!
>
> What architecture are you trying to build gdb on and what build
> environment are you using? I think you owe it to the maintainer to
> provide a little more detailed information when you file a bug report
> tagged as "grave".
>
> In fact, gdb currently fails to build from source on the Debian
> architectures "powerpcspe" and "sh4" only and I just stumbled over
> your bug as I am one of the active sh4 porters.
>
> I would rather tend to downgrade this bug to severity "important"
> unless you can show that the problem affects any of our release
> architectures. Both "powerpcspe" and "sh4" are not release
> architectures and any bugs regarding these architectures can therefore
> not be regarded as release-critical.

I was building on amd64 using pbuilder.  As far as I can tell, the
culprit is this in debian/rules:

# Cross configuration support.  Check for an environment variable
# $GDB_TARGET, or a file debian/target.
ifndef GDB_TARGET
DEBIAN_TARGET_FILE := $(strip $(shell cat debian/target 2>/dev/null))
ifneq ($(DEBIAN_TARGET_FILE),)
GDB_TARGET := $(DEBIAN_TARGET_FILE)
endif
endif

DEB_TARGET_ARCH := $(shell dpkg-architecture -f \
                     -a$(GDB_TARGET) -qDEB_HOST_ARCH 2>/dev/null)
...
ifeq ($(DEB_TARGET_ARCH),)
$(error GDB_TARGET value "$(GDB_TARGET)" is not a valid Debian architecture)
endif

So because debian/target doesn't exist in a straight build, GDB_TARGET
is empty.  And "dpkg-architecture -f -a -qDEB_HOST_ARCH" prints this
to stderr and nothing to stdout:
dpkg-architecture: unknown option `DEB_HOST_ARCH'

Use --help for program usage information.

Therefore, DEB_TARGET_ARCH is empty and the error gets triggered.

I suspect this might be new behavior in recent updates of dpkg; but if
it worked before with nothing provided to -a, that would be a pure
accident.  Could you make sure that your build environment is up to
date with sid and has dpkg 1.17.21?
-- 
Daniel Schepler


-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to