[openamq-dev] Multi-threaded connection requests fail?

Martin Lucina mato at imatix.com
Wed Nov 7 10:00:57 CET 2007


Elli,

comptonsw at comcast.net said:
> Thanks for the help Mike, but as I wrote privately, your implementation doesn't
> address my
> problem, so I'm reissuing this request back to the authors:
> 
> amq_client_connection_new fails if
> I build a multithreaded client under Ubuntu Gutsy.  It does _not_ fail when
> built single-threaded...

Are you building your code using the OpenAMQ build system ('c' and
friends) or not?

If not, then you need to make sure that you're defining the exact same
set of flags when *compiling* your code as are those that 'c' defines
for your build model.  You can get those out of 'c' by e.g.:

1. Go to .../OpenAMQ-1.2c4/clients
2. Run "c -v -l amq_client"

Specifically for multi threaded builds, it is not sufficient to just
define -D_REENTRANT.  You need at least -DBASE_THREADSAFE and
-D_LARGEFILE64_SOURCE as well.

-mato


More information about the openamq-dev mailing list