On 11/17/2009 08:40 AM, Aaron Hillegass wrote:
qpid Developers,
I'm working on client/server software. Our users will be running a
client on the Mac and talking to a server on linux. I thought it
would be terrific if I could use your qpid project to do this.
Everything seems to work like a dream on Linux (Nice job!), but I also
need to get the qpid C++ client library compiled on the Mac.
After installing Boost and adding #include <sys/types.h> to
include/qpid/framing/FieldValue.h, I can get pretty far in the build
of the version in svn, but I eventually hit this error:
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../include -I../include
-I. -I=. -Werror -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith
-Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var
-Winvalid-pch -Wno-system-headers -Woverloaded-virtual
-DQPID_EXEC_DIR=\"/usr/local/libexec/qpid\" -g -O2 -MT
qpid/sys/posix/AsynchIO.lo -MD -MP -MF
qpid/sys/posix/.deps/AsynchIO.Tpo -c qpid/sys/posix/AsynchIO.cpp
-fno-common -DPIC -o qpid/sys/posix/.libs/AsynchIO.o
qpid/sys/posix/AsynchIO.cpp:63: error: thread-local storage not
supported for this target
qpid/sys/posix/AsynchIO.cpp:64: error: thread-local storage not
supported for this target
qpid/sys/posix/AsynchIO.cpp:65: error: thread-local storage not
supported for this target
qpid/sys/posix/AsynchIO.cpp:66: error: thread-local storage not
supported for this target
qpid/sys/posix/AsynchIO.cpp:67: error: thread-local storage not
supported for this target
qpid/sys/posix/AsynchIO.cpp:68: error: thread-local storage not
supported for this target
I found this on the Apple list which might be helpful:
__thread is not supported. The specification is somewhat ELF-
specific, which makes it a bit of a challenge.
Thread-local storage is supported, however. Take a look at the man
page for pthread_getspecific, for example.
That is from
http://lists.apple.com/archives/xcode-users/2006/Jun/msg00550.html
Then I wrote Gordon Sims directly, who recommended that send a note to
this list. He also said:
It looks like it would be possible to replace the __thread
declarations with the pthread_getspecific/pthread_setspecific on the
Mac.
In fact most of those thread local variables are not really used. You
could try removing them to see whether anything else in the build
breaks once we get this item solved. Only threadMaxRead is actually
used in any observable way and it is just to balance reads v. writes
so removing it for an experiment would be fine.
I'll try this, but if anyone else has thoughts or suggestions, please
let me know.
I'd like to get the Mac supported for the C++ version of qpid. Is
there anything I can I do to help? I can lend a Mac to a developer if
that will make a difference.
I'm not on this list, so please CC me if you respond. Thanks again
for all your hard work!
Sincerely,
Aaron Hillegass
Big Nerd Ranch, Inc
http://www.bignerdranch.com/
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
There's already an abstraction set up for thread-local storage to
support Linux and Windows. It's called QPID_TSS and is defined in
cpp/include/qpid/sys/Thread.h
qpid/sys/posix/AsynchIO.cpp should not use __thread but rather
QPID_TSS. We could then put a Mac-specific implementation of
thread-local in QPID_TSS.
-Ted
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]