[openamq-dev] Build on AIX 5.3

Martin Lucina mato at imatix.com
Tue Jul 17 13:15:48 CEST 2007


John,

john.murphy at dowjones.com said:
> I tried the single threaded build and it still n't work.  See TRACE
> output
> 
> boom I: [smt]: Building SMT...
> c -v -li /home/murphyj/PubSub/vendor/OpenAMQ/base-1.2d5/_install/include -ll 
> /home/murphyj/PubSub/vendor/OpenAMQ/base-1.2d5/_install/lib smtlib
> Compiling smtlib (cc -c  
> -I/home/murphyj/PubSub/vendor/OpenAMQ/base-1.2d5/_install/include -O   
> -I../../build-output/amq/include smtlib.c)...
> "smtlib.h", line 344.9: 1506-343 (S) Redeclaration of thread_create differs 
> from previous declaration on line 897 of "/usr/include/sys/thread.h".

This is a known problem on some platforms (MacOSX and now AIX) that have
existing system calls for non-POSIX threads.

Could you please try the attached patch?

Apply in OpenAMQ/base-1.2d5, with the following command:

$ patch -p2 < base-57.patch

Thanks for reporting this, the fix will be in the next release which
will be out some time in the next few weeks.

Regards,

-mato
-------------- next part --------------
Author: mato
Date: 2007-07-17 11:08:20 +0000 (Tue, 17 Jul 2007)
New Revision: 10620

Modified:
   base/trunk/smt/smtlib.c
   base/trunk/smt/smtlib.h
Log:
BASE-57


Modified: base/trunk/smt/smtlib.c
===================================================================
--- base/trunk/smt/smtlib.c	2007-07-17 10:06:40 UTC (rev 10619)
+++ base/trunk/smt/smtlib.c	2007-07-17 11:08:20 UTC (rev 10620)
@@ -2846,7 +2846,7 @@
 
 
 /*  ---------------------------------------------------------------------[<]-
-    Function: thread_create
+    Function: thread_create_
 
     Synopsis: Creates a new thread, and possibly an event queue for the
     thread.  The caller specifies the agent and thread name.   The
@@ -2871,7 +2871,7 @@
     ---------------------------------------------------------------------[>]-*/
 
 THREAD *
-thread_create (
+thread_create_ (
     const char *agent_name,             /*  Name of agent                    */
     const char *thread_name             /*  Create thread with this name     */
 )

Modified: base/trunk/smt/smtlib.h
===================================================================
--- base/trunk/smt/smtlib.h	2007-07-17 10:06:40 UTC (rev 10619)
+++ base/trunk/smt/smtlib.h	2007-07-17 11:08:20 UTC (rev 10620)
@@ -341,7 +341,9 @@
 int      event_destroy      (EVENT *event);
 void     event_wait         (void);
 
-THREAD  *thread_create      (const char *agent, const char *thread);
+THREAD  *thread_create_     (const char *agent, const char *thread);
+/* On some platforms thread_create is an existing system call                */
+#define thread_create(a,t) thread_create_(a,t)
 THREAD  *thread_lookup      (const char *agent, const char *thread);
 int      thread_destroy     (THREAD *thread, Bool cleanup);
 



More information about the openamq-dev mailing list