Skip to contentSkip to conversation

error: 'pthread_spin_lock' does not name a type

DISCUSSION Dyweni - Ceph-Devel 2 participants 3 messages Jun 21, 2011

lore
Share & tools
lore
#0 lore raw

Hi List!

Ceph master seems to be broken on my development machine. Here's the error:

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -rdyna ic -Wtype-limits -Wignored-qualifiers -Winit-self -Wpointer-arith -fno-strict-aliasing -Wnon-virtual-dtor -Wno-invalid-o fsetof -Wstrict-null-sentinel -march=pentium3 -pipe -ggdb -MT libcommon_a-AuthNoneAuthorizeHandler.o -MD -MP -MF .deps libcommon_a-AuthNoneAuthorizeHandler.Tpo -c -o libcommon_a-AuthNoneAuthorizeHandler.o test -f 'auth/none/AuthNoneAuthor zeHandler.cc' || echo './'auth/none/AuthNoneAuthorizeHandler.cc
In file included from ./msg/Message.h:138,

                 from ./messages/PaxosServiceMessage.h:4,
                 from ./messages/MAuth.h:18,
                 from auth/AuthClientHandler.cc:21:

./include/atomic.h:66: error: 'pthread_spin_lock' does not name a type ./include/atomic.h: In constructor 'ceph::atomic_t::atomic_t(int)':
./include/atomic.h:71: error: 'lock' was not declared in this scope ./include/atomic.h: In destructor 'ceph::atomic_t::~atomic_t()':
./include/atomic.h:74: error: 'lock' was not declared in this scope ./include/atomic.h: In member function 'int ceph::atomic_t::inc()':
./include/atomic.h:77: error: 'lock' was not declared in this scope ./include/atomic.h: In member function 'int ceph::atomic_t::dec()':
./include/atomic.h:83: error: 'lock' was not declared in this scope ./include/atomic.h: In member function 'void ceph::atomic_t::add(int)':
./include/atomic.h:89: error: 'lock' was not declared in this scope ./include/atomic.h: In member function 'void ceph::atomic_t::sub(int)':
./include/atomic.h:94: error: 'lock' was not declared in this scope ./include/atomic.h: In member function 'int ceph::atomic_t::read() const':
./include/atomic.h:100: error: 'lock' was not declared in this scope

I've bisected the error back to this commit:
03c83799b3915dd8e42606a23bcc9b01a5a48bac is the first bad commit commit 03c83799b3915dd8e42606a23bcc9b01a5a48bac

Author: Colin Patrick McCabe <[email protected]>
Date:   Fri Jun 10 14:43:28 2011 -0700

include/atomic cleanup

* Don't allow copying of class atomic_t.
* Remove common/Spinlock.h because it's unecessary
* SimpleMessenger: use atomic var for qlen

:040000 040000 1f89f38df725669be6a302634cd9a3624632cb11 3e4bae4751d40947710767efd2533bdc02d8a53a M src

I am running GLIBC 2.12.2.

Signature · 2 lines
Thanks,
Dyweni
#1 lore raw

Hi Dyweni,

It seems that you do not have libatomic ops, so you spotted a build error that I overlooked.
Thanks for the report, it should be fixed shortly.

cheers,
Colin

Quoted 67 lines · Dyweni - Ceph-Devel

Hi List!

Ceph master seems to be broken on my development machine.  Here's the error:

i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I.     -Wall -D__CEPH__

(quoted diff) +0 -5
-D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -rdyna ic -Wtype-limits
-Wignored-qualifiers -Winit-self -Wpointer-arith -fno-strict-aliasing
-Wnon-virtual-dtor -Wno-invalid-o fsetof -Wstrict-null-sentinel
-march=pentium3 -pipe -ggdb -MT libcommon_a-AuthNoneAuthorizeHandler.o -MD
-MP -MF .deps libcommon_a-AuthNoneAuthorizeHandler.Tpo -c -o

libcommon_a-AuthNoneAuthorizeHandler.o test -f 'auth/none/AuthNoneAuthor zeHandler.cc' || echo './'auth/none/AuthNoneAuthorizeHandler.cc In file included from ./msg/Message.h:138,
                from ./messages/PaxosServiceMessage.h:4,
                from ./messages/MAuth.h:18,
                from auth/AuthClientHandler.cc:21:
./include/atomic.h:66: error: 'pthread_spin_lock' does not name a type ./include/atomic.h: In constructor 'ceph::atomic_t::atomic_t(int)':
./include/atomic.h:71: error: 'lock' was not declared in this scope ./include/atomic.h: In destructor 'ceph::atomic_t::~atomic_t()':
./include/atomic.h:74: error: 'lock' was not declared in this scope ./include/atomic.h: In member function 'int ceph::atomic_t::inc()':
./include/atomic.h:77: error: 'lock' was not declared in this scope ./include/atomic.h: In member function 'int ceph::atomic_t::dec()':
./include/atomic.h:83: error: 'lock' was not declared in this scope ./include/atomic.h: In member function 'void ceph::atomic_t::add(int)':
./include/atomic.h:89: error: 'lock' was not declared in this scope ./include/atomic.h: In member function 'void ceph::atomic_t::sub(int)':
./include/atomic.h:94: error: 'lock' was not declared in this scope ./include/atomic.h: In member function 'int ceph::atomic_t::read() const':
./include/atomic.h:100: error: 'lock' was not declared in this scope

I've bisected the error back to this commit:
03c83799b3915dd8e42606a23bcc9b01a5a48bac is the first bad commit commit 03c83799b3915dd8e42606a23bcc9b01a5a48bac
Author: Colin Patrick McCabe <[email protected]>
Date:   Fri Jun 10 14:43:28 2011 -0700

   include/atomic cleanup

   * Don't allow copying of class atomic_t.
   * Remove common/Spinlock.h because it's unecessary
   * SimpleMessenger: use atomic var for qlen

:040000 040000 1f89f38df725669be6a302634cd9a3624632cb11 3e4bae4751d40947710767efd2533bdc02d8a53a M      src

I am running GLIBC 2.12.2.

Quoted 8 lines

--
Thanks,
Dyweni
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Hi Colin,

With your patch, Ceph compiles correctly with the libatomic configure switch present and not present. (I didn't know about that before.)

---
Thanks,
Dyweni

Quoted 8 lines · Colin Patrick McCabe

Hi Dyweni,

It seems that you do not have libatomic ops, so you spotted a build error that I overlooked.
Thanks for the report, it should be fixed shortly.

cheers,
Colin