You're right, this is a known issue that GOOGLE_PROTOBUF_NO_THREAD_SAFETY
is not currently working: https://github.com/google/protobuf/issues/548

On Wed, Mar 1, 2017 at 4:38 AM, Johan Nilsson <countzero...@gmail.com>
wrote:

> Hi,
>
> I am trying to build protobuf-3.1.0 with the CXXFLAG
> GOOGLE_PROTOBUF_NO_THREAD_SAFETY set.
> Configuring (./configure CXXFLAGS="-DGOOGLE_PROTOBUF_NO_THREAD_SAFETY")
> completes without problem but when running make I get a lot of errors like
> the following:
>
> libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -pthread -DHAVE_PTHREAD=1
> -DHAVE_ZLIB=1 -Wall -Wno-sign-compare -DGOOGLE_PROTOBUF_NO_THREAD_SAFETY
> -MT google/protobuf/arena.lo -MD -MP -MF google/protobuf/.deps/arena.Tpo
> -c google/protobuf/arena.cc  -fPIC -DPIC -o google/protobuf/.libs/arena.o
> In file included from ./google/protobuf/arena.h:54:0,
>                  from google/protobuf/arena.cc:31:
> ./google/protobuf/stubs/atomic_sequence_num.h:43:3: error: 'AtomicWord'
> does not name a type
>    AtomicWord GetNext() {
>    ^
> ./google/protobuf/stubs/atomic_sequence_num.h:47:3: error: 'AtomicWord'
> does not name a type
>    AtomicWord word_;
>    ^
> ./google/protobuf/stubs/atomic_sequence_num.h: In constructor
> 'google::protobuf::internal::SequenceNumber::SequenceNumber()':
> ./google/protobuf/stubs/atomic_sequence_num.h:41:22: error: class
> 'google::protobuf::internal::SequenceNumber' does not have any field
> named 'word_'
>    SequenceNumber() : word_(0) {}
>                       ^
> In file included from google/protobuf/arena.cc:31:0:
> ./google/protobuf/arena.h: At global scope:
> ./google/protobuf/arena.h:886:31: error: 'AtomicWord' in namespace
> 'google::protobuf::internal' does not name a type
>    google::protobuf::internal::AtomicWord blocks_;  // Head of linked
> list of all allocated blocks
>                                ^
> ./google/protobuf/arena.h:887:31: error: 'AtomicWord' in namespace
> 'google::protobuf::internal' does not name a type
>    google::protobuf::internal::AtomicWord hint_;    // Fast thread-local
> block access
>                                ^
> ./google/protobuf/arena.h:897:31: error: 'AtomicWord' in namespace
> 'google::protobuf::internal' does not name a type
>    google::protobuf::internal::AtomicWord cleanup_list_;  // Head of a
> linked list of nodes containing object
> ...
>
> It seems to me that arena (among other things?) ignores the thread safety
> flag.
>
>
> Is the GOOGLE_PROTOBUF_NO_THREAD_SAFETY flag not supported anymore?
>
>
> Regards,
> Johan
>
> --
> You received this message because you are subscribed to the Google Groups
> "Protocol Buffers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to protobuf+unsubscr...@googlegroups.com.
> To post to this group, send email to protobuf@googlegroups.com.
> Visit this group at https://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to