- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Compiling DCE/CMA Threads on HP-UX 11.0
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2001 07:30 AM
тАО07-03-2001 07:30 AM
Error 173: "/opt/dce/include/dce/pthread.h", line 173 # Redefined symbol 'pthread_attr_t'; previously defined at "/usr/include/sys/sigevent.h", line 40].
typedef cma_t_attr pthread_attr_t;
I'm using the following directives:
-D_REENTRANT -Aa -D_HPUX_SOURCE
Has anyone seen this error?
I'd appreciate any help I can get on this.
(By the way, I have no problems using POSIX threads on HP-UX 11.0)
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2001 08:44 AM
тАО07-03-2001 08:44 AM
Re: Compiling DCE/CMA Threads on HP-UX 11.0
I seem to recall running into this problem awhile back, and it involved the order which certain files were #include'ed, but the detail escapes me. Would it be possible to post a piece of example code that illustrates the problem along with the command-line that you are using to compile it?
Thanks muchly!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2001 09:07 AM
тАО07-03-2001 09:07 AM
Re: Compiling DCE/CMA Threads on HP-UX 11.0
Here it is:
/opt/aCC/bin/aCC -I. -I/opt/sybase/include -I/opt/dce/include -I/opt/aCC/include -I/opt/aCC/include/iostream -I/opt/aCC/include/SC -I/watson/dev/src/common +inst_implicit_include -g0 -D_REENTRANT -Aa -D_HPUX_SOURCE -c main.cpp
Error 173: "/opt/dce/include/dce/pthread.h", line 173 # Redefined symbol
'pthread_attr_t'; previously defined at ["/usr/include/sys/sigevent.h", line 40].
typedef cma_t_attr pthread_attr_t;
^^^^^^^^^^^^^^
Error 173: "/opt/dce/include/dce/pthread.h", line 192 # Redefined symbol
'pthread_t'; previously defined at ["/usr/include/sys/signal.h", line 81].
typedef cma_t_thread pthread_t;
^^^^^^^^^
*** Error exit code 2
Stop.
Here is main.cpp:
#include
#include
#include
#include
long TestFn(long* iterations){ //do something...
return 0;
}
int main()
{ long thread_iter = 100000;
long rc1;
pthread_attr_t attr;
pthread_t thread1;
pthread_attr_create(&attr);
pthread_attr_setsched(&attr, SCHED_OTHER);
if (pthread_create(&thread1, attr,
(void *(*)(void*))TestFn,
&thread_iter)== -1)
{
cout << "Error on threading" << endl;
}
pthread_join(thread1, (void**)&rc1);
cout << "pthread_join(thread1): rc = " <<
rc1 << endl;
return 0;
} Thanks again,
Nareen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2001 09:30 AM
тАО07-03-2001 09:30 AM
Re: Compiling DCE/CMA Threads on HP-UX 11.0
even on 11, CMA/DCE threads will not scale with processors
something compiled on 11 cannot be run on 10.20
so, it seems that it would make the most sense to just move forward and use the POSIX threads. one exception i suppose would be if you still need 10.20 support in the same source files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2001 09:34 AM
тАО07-03-2001 09:34 AM
Re: Compiling DCE/CMA Threads on HP-UX 11.0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2001 09:36 AM
тАО07-03-2001 09:36 AM
SolutionTry #include
I hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2001 09:50 AM
тАО07-03-2001 09:50 AM
Re: Compiling DCE/CMA Threads on HP-UX 11.0
That did it.
Thanks a lot,
Nareen