[Pkg-e-devel] Bug#535775: e17: FTBFS on hurd-i386

Manuel Menal mmenal at hurdfr.org
Sat Jul 4 21:47:45 UTC 2009


Package: e17
Severity: important
Tags: patch
Justification: fails to build from source

Hello,

e17 fails to build on  hurd-i386 because it uses the PATH_MAX constant
(which is optional  according to POSIX and undefined  on GNU/Hurd) and
the  SA_SIGINFO flag  for sigaction(),  which is  unsupported  on this
platform.

I  have  attached  a  patch  that  sets PATH_MAX  to  4096  when  it's
undefined, and makes  the use of SA_SIGINFO conditional  (e17 does not
use the feature at all, actually).

diff -urp e17-0.16.999.060/debian/control ../e17-0.16.999.060/debian/control
--- e17-0.16.999.060/debian/control	2009-07-04 23:31:25.000000000 +0200
+++ ../e17-0.16.999.060/debian/control	2009-06-24 18:25:25.000000000 +0200
@@ -8,7 +8,7 @@ Build-Depends: debhelper (>= 6), cdbs, l
  libedje-dev (>= 0.9.9.060), libefreet-dev (>= 0.5.0.060),
  libecore-dev (>= 0.9.9.060), libedbus-dev (>= 0.5.0.060),
  libevas-dev (>= 0.9.9.060), libeina-dev (>= 0.0.2.060),
- libasound2-dev, libxext-dev, libeet-bin, libpam0g-dev
+ libasound2-dev [!hurd-i386], libxext-dev, libeet-bin, libpam0g-dev
 Standards-Version: 3.8.1
 Vcs-Git: git://git.debian.org/pkg-e/apps/e.git
 Vcs-Browser: http://git.debian.org/?p=pkg-e/apps/e.git
diff -urp e17-0.16.999.060/doc/Makefile.in ../e17-0.16.999.060/doc/Makefile.in
--- e17-0.16.999.060/doc/Makefile.in	2009-04-22 15:15:53.000000000 +0200
diff -urp e17-0.16.999.060/src/bin/e_desklock.c ../e17-0.16.999.060/src/bin/e_desklock.c
--- e17-0.16.999.060/src/bin/e_desklock.c	2009-04-10 14:19:10.000000000 +0200
+++ ../e17-0.16.999.060/src/bin/e_desklock.c	2009-06-24 19:15:44.000000000 +0200
@@ -692,7 +692,7 @@ _desklock_auth(char *passwd)
 	struct sigaction action;
 	
 	action.sa_handler = SIG_DFL;
-	action.sa_flags = SA_ONSTACK | SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
+	action.sa_flags = SA_ONSTACK | SA_NODEFER | SA_RESETHAND;
 	sigemptyset(&action.sa_mask);
 	sigaction(SIGSEGV, &action, NULL);
 	sigaction(SIGILL, &action, NULL);
diff -urp e17-0.16.999.060/src/bin/e_fm_op.h ../e17-0.16.999.060/src/bin/e_fm_op.h
--- e17-0.16.999.060/src/bin/e_fm_op.h	2009-02-26 04:13:47.000000000 +0100
+++ ../e17-0.16.999.060/src/bin/e_fm_op.h	2009-06-24 19:29:09.000000000 +0200
@@ -3,6 +3,10 @@
  */
 #ifdef E_TYPEDEFS
 
+#ifndef PATH_MAX
+  #define PATH_MAX 4096
+#endif
+
 #define E_FM_OP_DEBUG(...) fprintf(stderr, __VA_ARGS__)
 
 #define E_FM_OP_MAGIC 314
diff -urp e17-0.16.999.060/src/bin/e.h ../e17-0.16.999.060/src/bin/e.h
--- e17-0.16.999.060/src/bin/e.h	2009-03-18 02:43:07.000000000 +0100
+++ ../e17-0.16.999.060/src/bin/e.h	2009-06-24 18:55:13.000000000 +0200
@@ -18,6 +18,10 @@
 #define _FILE_OFFSET_BITS  64
 #endif
 
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
 #ifdef __linux__
 #include <features.h>
 #endif
diff -urp e17-0.16.999.060/src/bin/e_main.c ../e17-0.16.999.060/src/bin/e_main.c
--- e17-0.16.999.060/src/bin/e_main.c	2009-04-14 01:48:30.000000000 +0200
+++ ../e17-0.16.999.060/src/bin/e_main.c	2009-06-24 19:18:49.000000000 +0200
@@ -134,6 +134,7 @@ main(int argc, char **argv)
    char buf[PATH_MAX];
    char *s;
    struct sigaction action;
+   int sig_flags;
    double t, tstart;
 
 #ifdef TS_DO
@@ -156,30 +157,38 @@ main(int argc, char **argv)
    /* or ability to gdb attach and debug at this point - better than your */
    /* wm/desktop vanishing and not knowing what happened */
 
-   action.sa_sigaction = e_sigseg_act;
-   action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
+#ifdef SA_SIGINFO
+   sig_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
+   #define handler sa_handler
+#else
+   sig_flags = SA_NODEFER | SA_RESETHAND;
+   #define handler sa_sigaction
+#endif
+
+   action.handler = e_sigseg_act;
+   action.sa_flags = sig_flags;
    sigemptyset(&action.sa_mask);
    sigaction(SIGSEGV, &action, NULL);
 
-   action.sa_sigaction = e_sigill_act;
-   action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
+   action.handler = e_sigill_act;
+   action.sa_flags = sig_flags;
    sigemptyset(&action.sa_mask);
    sigaction(SIGILL, &action, NULL);
 
-   action.sa_sigaction = e_sigfpe_act;
-   action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; 
+   action.handler = e_sigfpe_act;
+   action.sa_flags = sig_flags;
    sigemptyset(&action.sa_mask);
    sigaction(SIGFPE, &action, NULL);
 
-   action.sa_sigaction = e_sigbus_act;
-   action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
+   action.handler = e_sigbus_act;
+   action.sa_flags = sig_flags;
    sigemptyset(&action.sa_mask);
    sigaction(SIGBUS, &action, NULL);
 
-   action.sa_sigaction = e_sigabrt_act;
-   action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
+   action.handler = e_sigabrt_act;
+   action.sa_flags = sig_flags;
    sigemptyset(&action.sa_mask);
    sigaction(SIGABRT, &action, NULL);
 
 {
    write(2, "**** FLOATING POINT EXCEPTION ****\n", 35);
diff -urp e17-0.16.999.060/src/bin/e_signals.h ../e17-0.16.999.060/src/bin/e_signals.h
--- e17-0.16.999.060/src/bin/e_signals.h	2009-02-26 04:13:47.000000000 +0100
+++ ../e17-0.16.999.060/src/bin/e_signals.h	2009-06-24 19:12:54.000000000 +0200
@@ -7,11 +7,17 @@
 #ifndef E_SIGNALS_H
 #define E_SIGNALS_H
 
-EAPI void e_sigseg_act(int x, siginfo_t *info, void *data);
-EAPI void e_sigill_act(int x, siginfo_t *info, void *data);
-EAPI void e_sigfpe_act(int x, siginfo_t *info, void *data);
-EAPI void e_sigbus_act(int x, siginfo_t *info, void *data);
-EAPI void e_sigabrt_act(int x, siginfo_t *info, void *data);
+#ifdef SA_SIGINFO
+  #define e_signal_act(sig) e_##sig##_act(int x, siginfo_t *info, void *data)
+#else
+  #define e_signal_act(sig) e_##sig##_act(int x)
+#endif
+
+EAPI void e_signal_act(sigseg);
+EAPI void e_signal_act(sigill);
+EAPI void e_signal_act(sigfpe);
+EAPI void e_signal_act(sigbus);
+EAPI void e_signal_act(sigabrt);
 
 #endif
 #endif
--- e17-0.16.999.060/src/bin/e_signals.c	2009-03-27 15:21:05.000000000 +0100
+++ ../e17-0.16.999.060/src/bin/e_signals.c	2009-07-04 23:38:58.000000000 +0200
@@ -31,7 +31,7 @@ _e_x_composite_shutdown(void)
  * with the -rdynamic flag to GCC for any sort of decent output. 
  */
 EAPI void
-e_sigseg_act(int x, siginfo_t *info, void *data)
+e_signal_act(sigseg)
 {
    void *array[255];
    size_t size;
@@ -58,7 +58,7 @@ e_sigseg_act(int x, siginfo_t *info, voi
 }
 #else
 EAPI void
-e_sigseg_act(int x, siginfo_t *info, void *data)
+e_signal_act(sigseg)
 {
    write(2, "**** SEGMENTATION FAULT ****\n", 29);
    _e_x_composite_shutdown();
@@ -80,7 +80,7 @@ e_sigseg_act(int x, siginfo_t *info, voi
 #endif
 
 EAPI void
-e_sigill_act(int x, siginfo_t *info, void *data)
+e_signal_act(sigill)
 {
    write(2, "**** ILLEGAL INSTRUCTION ****\n", 30);
    _e_x_composite_shutdown();
@@ -101,7 +101,7 @@ e_sigill_act(int x, siginfo_t *info, voi
 }
 
 EAPI void
-e_sigfpe_act(int x, siginfo_t *info, void *data)
+e_signal_act(sigfpe)
 {
    write(2, "**** FLOATING POINT EXCEPTION ****\n", 35);
    _e_x_composite_shutdown();
@@ -122,7 +122,7 @@ e_sigfpe_act(int x, siginfo_t *info, voi
 }
 
 EAPI void
-e_sigbus_act(int x, siginfo_t *info, void *data)
+e_signal_act(sigbus)
 {
    write(2, "**** BUS ERROR ****\n", 21);
    _e_x_composite_shutdown();
@@ -143,7 +143,7 @@ e_sigbus_act(int x, siginfo_t *info, voi
 }
 
 EAPI void
-e_sigabrt_act(int x, siginfo_t *info, void *data)
+e_signal_act(sigabrt)
 {
    write(2, "**** ABORT ****\n", 21);
    _e_x_composite_shutdown();
   

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: hurd-i386 (i686-AT386)

Kernel: GNU-Mach 1.3.99/Hurd-0.3
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash





More information about the Pkg-e-devel mailing list