Source: hyperrogue
Version: 8.3j+dfsg-2
Severity: normal

Dear Maintainer,

The hyperrogue package failed to build on hppa:
https://buildd.debian.org/status/fetch.php?pkg=hyperrogue&arch=hppa&ver=8.3j%2Bdfsg-2&stamp=1475425250

The following link error is caused by the stub table overflowing:
g++ savepng-loc.o hyper.o -o hyper -lSDL -lSDL_ttf -lSDL_mixer -lSDL_gfx -g -O2 
-fdebug-prefix-map=/<<BUILDDIR>>/hyperrogue-8.3j+dfsg=. -Wformat 
-Werror=format-security -O0 -Wdate-time -D_FORTIFY_SOURCE=2  -lGL -lpng
/usr/bin/ld: 
hyper.o(.text._ZNSt6vectorIN4elec10chargedataESaIS1_EEC2Ev[_ZNSt6vectorIN4elec10chargedataESaIS1_EEC5Ev]+0x2c):
 cannot reach 00001377__ZNSt12_Vector_baseIN4elec10chargedataESaIS1_EEC2Ev+0, 
recompile with -ffunction-sections
/usr/bin/ld: 
hyper.o(.text._ZNSt6vectorIN4elec10chargedataESaIS1_EEC2Ev[_ZNSt6vectorIN4elec10chargedataESaIS1_EEC5Ev]+0x2c):
 cannot handle R_PARISC_PCREL17F for 
_ZNSt12_Vector_baseIN4elec10chargedataESaIS1_EEC2Ev
/usr/bin/ld: final link failed: Bad value

This can be avoided by adding "-mlong-calls" to CXXFLAGS on hppa.

In debian/rules, we have:

DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
WEAK_HOSTS := arm64 hppa

# Use less optimization on architectures that FTBFS otherwise
ifneq (,$(findstring $(DEB_HOST_ARCH),$(WEAK_HOSTS)))
export DEB_CXXFLAGS_MAINT_APPEND=-O0
endif

The "-O0" doesn't actually do much on arm64 and hppa as it is overriden by
the default "-O2" optimization.  I had a successful build by adding -mlong-calls
to DEB_CXXFLAGS_MAINT_APPEND.

Regards,
Dave Anglin

-- System Information:
Debian Release: stretch/sid
  APT prefers buildd-unstable
  APT policy: (500, 'buildd-unstable'), (500, 'unstable')
Architecture: hppa (parisc64)

Kernel: Linux 4.7.5+ (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Reply via email to