Reputation: 51
I'm trying to compile ACE lib but I have errors compiling.
My Linux system is Slackware 14.2 64 bit
The lib is ACE version 6.1.4 (the version that I need to compile)
Before to post this I have followed all the steps for to build ACE from ACE web.
How to compile this lib?
This is the error:
In file included from /home/cyneo/Downloads/ACE_wrappers/ace/OS_NS_Thread.h:32,
from /home/cyneo/Downloads/ACE_wrappers/ace/Guard_T.h:26,
from /home/cyneo/Downloads/ACE_wrappers/ace/Free_List.cpp:7,
from /home/cyneo/Downloads/ACE_wrappers/ace/Free_List.h:142,
from /home/cyneo/Downloads/ACE_wrappers/ace/Malloc_T.h:26,
from /home/cyneo/Downloads/ACE_wrappers/ace/Local_Name_Space.h:20,
from Local_Name_Space.cpp:3:
/home/cyneo/Downloads/ACE_wrappers/ace/os_include/os_sched.h:47:6: error: conflicting declaration ‘typedef struct cpu_set_t cpu_set_t’
} cpu_set_t;
^~~~~~~~~
In file included from /usr/include/sched.h:44,
from /usr/include/pthread.h:23,
from /home/cyneo/Downloads/ACE_wrappers/ace/os_include/os_pthread.h:51,
from /home/cyneo/Downloads/ACE_wrappers/ace/OS_NS_Thread.h:31,
from /home/cyneo/Downloads/ACE_wrappers/ace/Guard_T.h:26,
from /home/cyneo/Downloads/ACE_wrappers/ace/Free_List.cpp:7,
from /home/cyneo/Downloads/ACE_wrappers/ace/Free_List.h:142,
from /home/cyneo/Downloads/ACE_wrappers/ace/Malloc_T.h:26,
from /home/cyneo/Downloads/ACE_wrappers/ace/Local_Name_Space.h:20,
from Local_Name_Space.cpp:3:
/usr/include/bits/cpu-set.h:42:3: nota: previous declaration as ‘typedef struct cpu_set_t cpu_set_t’
} cpu_set_t;
In file included from /home/cyneo/Downloads/ACE_wrappers/ace/TSS_T.h:261,
from /home/cyneo/Downloads/ACE_wrappers/ace/Singleton.h:24,
from /home/cyneo/Downloads/ACE_wrappers/ace/Service_Gestalt.h:30,
from /home/cyneo/Downloads/ACE_wrappers/ace/Service_Object.h:27,
from /home/cyneo/Downloads/ACE_wrappers/ace/Naming_Context.h:25,
from /home/cyneo/Downloads/ACE_wrappers/ace/Local_Name_Space_T.h:25,
from /home/cyneo/Downloads/ACE_wrappers/ace/Local_Name_Space.h:128,
from Local_Name_Space.cpp:3:
/home/cyneo/Downloads/ACE_wrappers/ace/TSS_T.cpp: En la función miembro ‘void ACE_TSS_Guard<ACE_LOCK>::init_key()’:
/home/cyneo/Downloads/ACE_wrappers/ace/TSS_T.cpp:357:39: error: no matching function for call to ‘ACE_Thread::keycreate(ACE_thread_key_t*, void (*)(void*), void*)’
(void *) this);
^
make[1]: *** [/home/cyneo/Downloads/ACE_wrappers/include/makeinclude/rules.local.GNU:189: .shobj/Local_Name_Space.o] Error 1
I have found this but I can't get doing working for me:
https://bugs.gentoo.org/638606
https://638606.bugs.gentoo.org/attachment.cgi?id=532828
Edit:
I have tried to compile ACE 6.5.0 too, but I get this error:
during GIMPLE pass: wrestrict
En la función miembro ‘virtual int ACE_Configuration_Heap::open_section(const ACE_Configuration_Section_Key&, const ACE_TCHAR*, int, ACE_Configuration_Section_Key&)’:
en pp_format, en pretty-print.c:1378
ACE_Configuration_Heap::open_section (const ACE_Configuration_Section_Key& base,
Upvotes: 3
Views: 2049
Reputation: 63
I had the same problem with ACE but didn't have the option to upgrade it. I managed to solve the conflicting declaration problem by adding following in ace/config.h and recompiling ACE.
#ifndef __cpu_set_t_defined
#define __cpu_set_t_defined
#endif //!__cpu_set_t_defined
You may ask why does this work? Well, if you get this error, it means that glibc has declared cpu_set_t
but it didn't define __cpu_set_t_defined
, which ACE had expected. Therefore, ACE tried to declare cpu_set_t
as well, and the error occurs.
So, by defining __cpu_set_t_defined
, you tell ACE not to declare __cpu_set_t_defined
again.
But please keep in mind that this is just a workaround and should be used only if you don't have the option to update ACE.
Hope this helps!
Upvotes: 5
Reputation: 51
Finally i have compiled ACE 6.5.0 for Slackware 14.2 64 bit. It needed add some parameters in "ACE_wrappers/include/makeinclude/platform_macros.GNU" :
INSTALL_PREFIX=/usr
INSTALL_LIB=lib64
stl=1
gl=1
ssl=1
buildbits=64
dynamic_loader=1
insure=0
optimize=0
static_stdlibs=0
include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU
Upvotes: 2
Reputation: 3002
This version of ACE is ancient, upgrading to ACE 6.5.0 fixes this.
Upvotes: 0