Bug#805731: gmt: FTBFS from source on hppa: Missing define for UC_IP

2015-11-21 Thread John David Anglin
Package: src:gmt
Version: 5.2.1+dfsg-2
Severity: normal
Tags: patch

Dear Maintainer,

See build log:
https://buildd.debian.org/status/fetch.php?pkg=gmt=hppa=5.2.1%2Bdfsg-2=1447626260

There error is here:
cd /<>/gmt-5.2.1+dfsg/debian/build/src && /usr/bin/cc  
-DLIBRARY_EXPORTS -std=gnu99 -fstrict-aliasing -g -O2 -Wformat 
-Werror=format-security -D_FORTIFY_SOURCE=2 -fopenmp -O2 -g -DNDEBUG -fPIC 
-I/<>/gmt-5.2.1+dfsg/debian/build/src 
-I/<>/gmt-5.2.1+dfsg/src -I/usr/include/gdal 
-I/<>/gmt-5.2.1+dfsg/debian/build/src/gshhg 
-I/<>/gmt-5.2.1+dfsg/debian/build/src/img 
-I/<>/gmt-5.2.1+dfsg/debian/build/src/meca 
-I/<>/gmt-5.2.1+dfsg/debian/build/src/mgd77 
-I/<>/gmt-5.2.1+dfsg/debian/build/src/misc 
-I/<>/gmt-5.2.1+dfsg/debian/build/src/potential 
-I/<>/gmt-5.2.1+dfsg/debian/build/src/segy 
-I/<>/gmt-5.2.1+dfsg/debian/build/src/spotter 
-I/<>/gmt-5.2.1+dfsg/debian/build/src/x2sys-o 
CMakeFiles/gmtlib.dir/common_sighandler.c.o   -c 
/<>/gmt-5.2.1+dfsg/src/common_sighandler.c
/<>/gmt-5.2.1+dfsg/src/common_sighandler.c: In function 'sig_handler':
/<>/gmt-5.2.1+dfsg/src/common_sighandler.c:85:48: error: 'mcontext_t 
{aka struct sigcontext}' has no member named 'gregs'
 #  define UC_IP(uc) ((void *) (uc)->uc_mcontext.gregs[REG_EIP])
^
/<>/gmt-5.2.1+dfsg/src/common_sighandler.c:158:14: note: in expansion 
of macro 'UC_IP'
  array [0] = UC_IP (uc); /* caller's address */
  ^
/<>/gmt-5.2.1+dfsg/src/common_sighandler.c:85:55: error: 'REG_EIP' 
undeclared (first use in this function)
 #  define UC_IP(uc) ((void *) (uc)->uc_mcontext.gregs[REG_EIP])
   ^
/<>/gmt-5.2.1+dfsg/src/common_sighandler.c:158:14: note: in expansion 
of macro 'UC_IP'
  array [0] = UC_IP (uc); /* caller's address */
  ^
/<>/gmt-5.2.1+dfsg/src/common_sighandler.c:85:55: note: each 
undeclared identifier is reported only once for each function it appears in
 #  define UC_IP(uc) ((void *) (uc)->uc_mcontext.gregs[REG_EIP])
   ^
/<>/gmt-5.2.1+dfsg/src/common_sighandler.c:158:14: note: in expansion 
of macro 'UC_IP'
  array [0] = UC_IP (uc); /* caller's address */
  ^
src/CMakeFiles/gmtlib.dir/build.make:118: recipe for target 
'src/CMakeFiles/gmtlib.dir/common_sighandler.c.o' failed

The attached patch fixes the bug.  Please install if okay and report upstream.

Regards,
Dave Anglin

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

Kernel: Linux 3.18.24+ (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_CA.utf8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Description: 
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gmt (5.2.1+dfsg-2) unstable; urgency=medium
 .
   * Fix build on hppa.
Author: John David Anglin 

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: , 
Bug: 
Bug-Debian: https://bugs.debian.org/
Bug-Ubuntu: https://launchpad.net/bugs/
Forwarded: 
Reviewed-By: 
Last-Update: 

--- gmt-5.2.1+dfsg.orig/src/common_sighandler.c
+++ gmt-5.2.1+dfsg/src/common_sighandler.c
@@ -79,6 +79,8 @@ void backtrace_symbols_fd(void *const *b
 #  define UC_IP(uc) ((void *) (uc)->uc_mcontext.pc)
 # elif defined( __arm__)
 #  define UC_IP(uc) ((void *) (uc)->uc_mcontext.arm_pc)
+# elif defined( __hppa__)
+#  define UC_IP(uc) ((void *) (uc)->uc_mcontext.sc_iaoq[0])
 # elif defined(__s390__)
 #  define UC_IP(uc) ((void *) (uc)->uc_mcontext.psw.addr)
 # else


Bug#805731: gmt: FTBFS from source on hppa: Missing define for UC_IP

2015-11-21 Thread Sebastiaan Couwenberg
Control: tags -1 upstream pending

Hi John,

On 21-11-15 19:18, John David Anglin wrote:
> The attached patch fixes the bug.  Please install if okay and report upstream.

Thanks for the patch, I've added it to the packaging in git and used the
opportunity to also fix a similar issue causing the FTBFS on alpha.

Both patches have been forwarded, and yours has already been applied
upstream, see:

http://gmt.soest.hawaii.edu/issues/818

Kind Regards,

Bas

-- 
 GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146  50D1 6750 F10A E88D 4AF1