Bug#544090: FTBFS on alpha: invalid pointer conversion

2009-12-26 Thread Kern Sibbald
John,

I think the patch attached  to this email (hopfully uploaded properly) will 
fix the Alpha problem.  

I've finally decided it was better to add detection code because various 
machines use long unsigned int and others use int for the ioctl(fd, 
req, ...) req argument.  In addition, at least on my machine, the man pages 
say it is int, but /usr/include/sys/ioctl.h says it is unsigned long 
int ...

Kern
commit 78c64f1757419550411778b75f1018727d8f4e18
Author: Kern Sibbald k...@sibbald.com
Date:   Sat Dec 26 14:50:29 2009 +0100

Attempt to autoconfig ioctl_req_t

diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in
index 632f9c0..754a44d 100644
--- a/bacula/autoconf/config.h.in
+++ b/bacula/autoconf/config.h.in
@@ -452,6 +452,9 @@
declares uintmax_t. */
 #undef HAVE_INTTYPES_H_WITH_UINTMAX
 
+/* Set if ioctl request is unsigned long int */
+#undef HAVE_IOCTL_ULINT_REQUEST
+
 /* Whether to enable IPv6 support */
 #undef HAVE_IPV6
 
@@ -617,6 +620,9 @@
 /* Define to 1 if you have the `snprintf' function. */
 #undef HAVE_SNPRINTF
 
+/* Set if socklen_t exists */
+#undef HAVE_SOCKLEN_T
+
 /* Define to 1 if you have the stdarg.h header file. */
 #undef HAVE_STDARG_H
 
diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in
index 8a91a31..3147036 100644
--- a/bacula/autoconf/configure.in
+++ b/bacula/autoconf/configure.in
@@ -1859,7 +1859,31 @@ AC_CACHE_CHECK(for socklen_t, ba_cv_header_socklen_t,
)
]
 )
-test $ba_cv_header_socklen_t = yes  AC_DEFINE(HAVE_SOCKLEN_T)
+test $ba_cv_header_socklen_t = yes  AC_DEFINE(HAVE_SOCKLEN_T, 1, [Set if socklen_t exists])
+
+dnl --
+dnl Check for ioctl request type
+dnl --
+AC_CACHE_CHECK(for ioctl_req_t, ba_cv_header_ioctl_req_t,
+   [
+   AC_TRY_COMPILE(
+	  [
+	  #include sys/types.h
+	  #include sys/ioctl.h
+	  ], [
+	  unsigned long int req;
+	  int fd;
+	  ioctl(fd, req);
+	  ], [
+	 ba_cv_header_ioctl_req_t=yes
+	  ], [
+	 ba_cv_header_ioct_req_t_t=no
+	  ]
+   )
+   ]
+)
+test $ba_cv_header_ioctl_req_t = yes  AC_DEFINE(HAVE_IOCTL_ULINT_REQUEST, 1, [Set if ioctl request is unsigned long int])
+
 
 dnl --
 dnl Check for bigendian
diff --git a/bacula/configure b/bacula/configure
index b9c4dce..65d7dd1 100755
--- a/bacula/configure
+++ b/bacula/configure
@@ -32468,11 +32468,83 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 { echo $as_me:$LINENO: result: $ba_cv_header_socklen_t 5
 echo ${ECHO_T}$ba_cv_header_socklen_t 6; }
-test $ba_cv_header_socklen_t = yes  cat confdefs.h \_ACEOF
+test $ba_cv_header_socklen_t = yes 
+cat confdefs.h \_ACEOF
 #define HAVE_SOCKLEN_T 1
 _ACEOF
 
 
+{ echo $as_me:$LINENO: checking for ioctl_req_t 5
+echo $ECHO_N checking for ioctl_req_t... $ECHO_C 6; }
+if test ${ba_cv_header_ioctl_req_t+set} = set; then
+  echo $ECHO_N (cached) $ECHO_C 6
+else
+
+   cat conftest.$ac_ext _ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h conftest.$ac_ext
+cat conftest.$ac_ext _ACEOF
+/* end confdefs.h.  */
+
+	  #include sys/types.h
+	  #include sys/ioctl.h
+
+int
+main ()
+{
+
+	  unsigned long int req;
+	  int fd;
+	  ioctl(fd, req);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try=$ac_compile
+case (($ac_try in
+  *\* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval echo \\$as_me:$LINENO: $ac_try_echo\) 5
+  (eval $ac_compile) 2conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 conftest.err
+  rm -f conftest.er1
+  cat conftest.err 5
+  echo $as_me:$LINENO: \$? = $ac_status 5
+  (exit $ac_status); }  {
+	 test -z $ac_c_werror_flag ||
+	 test ! -s conftest.err
+   }  test -s conftest.$ac_objext; then
+
+	 ba_cv_header_ioctl_req_t=yes
+
+else
+  echo $as_me: failed program was: 5
+sed 's/^/| /' conftest.$ac_ext 5
+
+
+	 ba_cv_header_ioct_req_t_t=no
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+fi
+{ echo $as_me:$LINENO: result: $ba_cv_header_ioctl_req_t 5
+echo ${ECHO_T}$ba_cv_header_ioctl_req_t 6; }
+test $ba_cv_header_ioctl_req_t = yes 
+cat confdefs.h \_ACEOF
+#define HAVE_IOCTL_ULINT_REQUEST 1
+_ACEOF
+
+
+
 { echo $as_me:$LINENO: checking for bigendian 5
 echo $ECHO_N checking for bigendian... $ECHO_C 6; }
 if test ${ba_cv_bigendian+set} = set; then
diff --git a/bacula/src/baconfig.h b/bacula/src/baconfig.h
index f725630..e93c98c 100644
--- a/bacula/src/baconfig.h
+++ b/bacula/src/baconfig.h
@@ -53,7 +53,11 @@
 #define ETIME ETIMEDOUT
 #endif
 
-#define ioctl_req_t long unsigned int
+#ifdef HAVE_IOCTL_ULINT_REQUEST
+#define ioctl_req_t unsigned long int
+#else
+#define ioctl_req_t int
+#endif
 
 #ifdef PROTOTYPES
 # define __PROTO(p) p
@@ -643,16 +647,9 @@ int  m_msg(const char *file, int line, 

Bug#544090: FTBFS on alpha: invalid pointer conversion

2009-09-20 Thread Kern Sibbald
Thank you for the most recent information. That and what John wrote made me 
realize that currently distinguish OS types, but in most of the code not 
machine architecture.  In your case, it is apparently a different definition 
that depends on architecture.  

I think this is rather easy to fix, but I need one more confirmation in order 
to do it correctly.  After doing your ./configure on the alpha, would you 
please copy the contents of bacula-source/src/host.h into the bug report. 
If it has 

#define DISTNAME alpha 

then I understand the problem and can create a patch.

Regards,

Kern



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



Bug#544090: [Fwd: Bug#544090: FTBFS on alpha: invalid pointer conversion]

2009-09-20 Thread John Goerzen
Hi James,

Could I trouble you to supply the file that Kern is looking for below?

Thanks,

-- John
---BeginMessage---
Thank you for the most recent information. That and what John wrote made me 
realize that currently distinguish OS types, but in most of the code not 
machine architecture.  In your case, it is apparently a different definition 
that depends on architecture.  

I think this is rather easy to fix, but I need one more confirmation in order 
to do it correctly.  After doing your ./configure on the alpha, would you 
please copy the contents of bacula-source/src/host.h into the bug report. 
If it has 

#define DISTNAME alpha 

then I understand the problem and can create a patch.

Regards,

Kern



---End Message---


Bug#544090: [Fwd: Bug#544090: FTBFS on alpha: invalid pointer conversion]

2009-09-20 Thread James Vega
On Sun, Sep 20, 2009 at 10:40:35AM -0500, John Goerzen wrote:
 Hi James,
 
 Could I trouble you to supply the file that Kern is looking for below?

host.h attached.

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega james...@debian.org
/*
   Bacula® - The Network Backup Solution

   Copyright (C) 2000-2009 Free Software Foundation Europe e.V.

   The main author of Bacula is Kern Sibbald, with contributions from
   many others, a complete list can be found in the file AUTHORS.
   This program is Free Software; you can redistribute it and/or
   modify it under the terms of version two of the GNU General Public
   License as published by the Free Software Foundation and included
   in the file LICENSE.

   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
   02110-1301, USA.

   Bacula® is a registered trademark of Kern Sibbald.
   The licensor of Bacula is the Free Software Foundation Europe
   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
   Switzerland, email:f...@fsfeurope.org.
*/
/*
 * Define Host machine
 *
 *  Version $Id: host.h.in 8614 2009-03-27 17:59:16Z kerns $
 *
 */

#define HOST_OS  alpha-unknown-linux-gnu
#define BACULA   Bacula
#define DISTNAME debian
#define DISTVER  squeeze/sid
#define HELPDIR  /usr/share/doc/bacula-common/html


signature.asc
Description: Digital signature


Bug#544090: FTBFS on alpha: invalid pointer conversion

2009-08-28 Thread Luk Claes
Package: bacula
Version: 3.0.2-3
Severity: serious

Hi

bacula FTBFS on alpha with the following error:

make[1]: Entering directory 
`/build/buildd-bacula_3.0.2-3-alpha-1PG1hy/bacula-3.0.2/debian/tmp-build-sqlite3/src/stored'
Compiling dev.c
dev.c: In member function 'void DEVICE::init_backend()':
dev.c:307: error: invalid conversion from 'int (*)(int, long unsigned int, 
...)throw ()' to 'int (*)(int, int, ...)'
make[1]: *** [dev.o] Error 1
make[1]: Leaving directory 
`/build/buildd-bacula_3.0.2-3-alpha-1PG1hy/bacula-3.0.2/debian/tmp-build-sqlite3/src/stored'
make: *** [build-stamp-sqlite3] Error 2

Cheers

Luk

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

Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



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