bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

address@hidden: Bug#154911: marked as done (commoncpp2: FTBFS: including


From: Mark Purcell
Subject: address@hidden: Bug#154911: marked as done (commoncpp2: FTBFS: including <asm/atomic.h> is not legal in user space)]
Date: Sun, 22 Sep 2002 13:46:23 +1000
User-agent: Mutt/1.4i

David (and others),

I have received this bug report about the commoncpp2 libraries. This patch 
has been included in the Debian GNU/Linux commoncpp2 package, but you 
might also like to include it with your upstream source.

Mark


----- Forwarded message from Debian Bug Tracking System <address@hidden> -----

From: LaMont Jones <address@hidden>
Subject: commoncpp2: FTBFS: including <asm/atomic.h> is not legal in user space
Date: Tue, 30 Jul 2002 23:17:46 -0600 (MDT)

Package: commoncpp2
Version: 0.99.6-2
Severity: serious

"The kernel is not in the business of providing headers that userspace can
include."

Most notably, the asm/atomic.h header file is broken in linux 2.4, for any
g++ file including it, since it uses a variable named 'new'.

The following patch fixes the problem.  Since this is blocking several
packages on ia64, I'll plan on doing an NMU shortly.

lamont
-- System Information
Debian Release: testing/unstable
Kernel Version: Linux smallone.fc.hp.com 2.4.17-64 #1 Sat Mar 16 17:31:44 MST 
2002 parisc64 unknown unknown GNU/Linux

diff -ur t/commoncpp2-0.99.6/acconfig.h commoncpp2-0.99.6/acconfig.h
--- t/commoncpp2-0.99.6/acconfig.h      Fri Jun 28 06:20:49 2002
+++ commoncpp2-0.99.6/acconfig.h        Tue Jul 30 23:04:50 2002
@@ -289,11 +289,6 @@
 #ifdef HAVE_WORKING_SYS_ATOMIC_H
 #include <sys/atomic.h>
 #define HAVE_ATOMIC
-#else
-#ifdef HAVE_ASM_ATOMIC_H
-#include <asm/atomic.h>
-#define HAVE_ATOMIC
-#endif
 #endif
 
 #if defined(HAVE_PTHREAD_H) && ( defined(_THREAD_SAFE) || defined(_REENTRANT) )
diff -ur t/commoncpp2-0.99.6/aclocal.m4 commoncpp2-0.99.6/aclocal.m4
--- t/commoncpp2-0.99.6/aclocal.m4      Tue Jul 30 23:05:05 2002
+++ commoncpp2-0.99.6/aclocal.m4        Tue Jul 30 23:03:13 2002
@@ -4550,26 +4550,6 @@
                AC_DEFINE(HAVE_WORKING_SYS_ATOMIC_H)],
                [ost_cv_posix_atomic=no])
        AC_MSG_RESULT($ost_cv_posix_atomic)
-  elif test $ost_cv_posix_atomic = no ; then
-       AC_MSG_CHECKING([for atomic operations])
-       AC_TRY_LINK([#include <asm/atomic.h>],
-               [
-               atomic_t at; at.counter = 1;
-               atomic_dec_and_test(&at);
-               atomic_sub(4, &at);
-               atomic_inc(&at);
-               atomic_add(3, &at);
-               ],
-               [ost_cv_posix_atomic=yes
-                AC_DEFINE(HAVE_ASM_ATOMIC_H)],
-               [AC_TRY_LINK([#include <asm/atomic.h>],
-                       [atomic at; at = 1;],
-                       [ost_cv_posix_atomic=yes
-                        AC_DEFINE(HAVE_ASM_ATOMIC_H) 
-                       AC_DEFINE(HAVE_ASM_ATOMIC_NOSTRUCT_BUTINT)]
-               )]
-       )
-       AC_MSG_RESULT($ost_cv_posix_atomic)
   fi
 
   if test "$target" = NONE ; then
@@ -4827,11 +4807,6 @@
 dnl #ifdef HAVE_WORKING_SYS_ATOMIC_H
 dnl #include <sys/atomic.h>
 dnl #define HAVE_ATOMIC
-dnl #else
-dnl #ifdef HAVE_ASM_ATOMIC_H
-dnl #include <asm/atomic.h>
-dnl #define HAVE_ATOMIC
-dnl #endif
 dnl #endif
 dnl 
 dnl #if defined(HAVE_PTHREAD_H) && ( defined(_THREAD_SAFE) || 
defined(_REENTRANT) )
diff -ur t/commoncpp2-0.99.6/configure commoncpp2-0.99.6/configure
--- t/commoncpp2-0.99.6/configure       Tue Jul 30 23:05:05 2002
+++ commoncpp2-0.99.6/configure Tue Jul 30 23:04:39 2002
@@ -7001,63 +7001,6 @@
 fi
 rm -f conftest*
        echo "$ac_t""$ost_cv_posix_atomic" 1>&6
-  elif test $ost_cv_posix_atomic = no ; then
-       echo $ac_n "checking for atomic operations""... $ac_c" 1>&6
-echo "configure:7007: checking for atomic operations" >&5
-       cat > conftest.$ac_ext <<EOF
-#line 7009 "configure"
-#include "confdefs.h"
-#include <asm/atomic.h>
-int main() {
-
-               atomic_t at; at.counter = 1;
-               atomic_dec_and_test(&at);
-               atomic_sub(4, &at);
-               atomic_inc(&at);
-               atomic_add(3, &at);
-               
-; return 0; }
-EOF
-if { (eval echo configure:7022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ost_cv_posix_atomic=yes
-                cat >> confdefs.h <<\EOF
-#define HAVE_ASM_ATOMIC_H 1
-EOF
-
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  cat > conftest.$ac_ext <<EOF
-#line 7034 "configure"
-#include "confdefs.h"
-#include <asm/atomic.h>
-int main() {
-atomic at; at = 1;
-; return 0; }
-EOF
-if { (eval echo configure:7041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
-  rm -rf conftest*
-  ost_cv_posix_atomic=yes
-                        cat >> confdefs.h <<\EOF
-#define HAVE_ASM_ATOMIC_H 1
-EOF
- 
-                       cat >> confdefs.h <<\EOF
-#define HAVE_ASM_ATOMIC_NOSTRUCT_BUTINT 1
-EOF
-
-               
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-       
-fi
-rm -f conftest*
-       echo "$ac_t""$ost_cv_posix_atomic" 1>&6
   fi
 
   if test "$target" = NONE ; then

Attachment: pgp3LqWU_ZCbb.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]