- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Runtime error with process compiled on HP-UX 11 wi...
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
Forums
Discussions
Discussions
Discussions
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
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
02-07-2001 10:43 AM
02-07-2001 10:43 AM
Runtime error with process compiled on HP-UX 11 with DCE 1.5
Thanks to a previous thread in this Forum (Compiling HP-UX 10.20 legacy code
based on DCE 1.5 on HP11), we were able to compile our software using the
following compiler option:
/opt/ansic/bin/cc -D_HPUX_10 -DHPUX -D_HPUX_SOURCE -DHPUX_DCE +ESlit +Oprocelim +DAportable +O2 -Aa +O2 +DAportable -DIRE_TRACING_ACTIVE -g +w1 -D_POSIX_D10_THREADS -D_HPUX_SOURCE -D_REENTRANT -D_PTHREADS_DRAFT4 -c -I . -I /usr/include -I /opt/dce/include -I ../../inc -I ../../gen/HP -I ../inc -I ../gen/HP -I /vob_mnt/A1340/if/gen/HP -I /vob_mnt/A1340/if/inc -I /vob_mnt/A1340/if/inc/bitmaps -I /opt/app/oracle/product/8.0.6/forms60/pub -I /opt/app/oracle/product/8.1.6/precomp/public -I /usr/include/X11R5 -I /usr/include/Motif2.1 -I /usr/include/Motif2.1/Xm -I /opt/OV/include -I /opt/uimx2.9/config -I /usr/dt/include -I /opt/commserv6.0.1/inc -I /opt/ilog/server42/include -I /opt/ilog/views311/include -I /opt/aoi/include -I /opt/flexlm/v7.0/machind top_query.c -o ../../obj/HP/top_query.o
cc: warning 499: Debugger 'fix and continue' feature not supported in
this mode.
cpp: "/usr/include/sys/unistd.h", line 484: warning 2001: Redefinition
of macro _POSIX_THREAD_ATTR_STACKSIZE.
cc: "top_query.c", line 172: warning 714: Function "top_allocate_ctx"
called with no prototype or definition in scope.
cc: "top_query.c", line 366: warning 714: Function
"top_init_moc_attributes" called with no prototype or definition in
scope.
cc: "top_query.c", line 396: warning 714: Function "top_free_ctx" called
with no prototype or definition in scope.
cc: "top_query.c", line 82: warning 517: Function returns no value.
/opt/ansic/bin/cc -D_HPUX_10 -DHPUX -D_HPUX_SOURCE -DHPUX_DCE +ESlit +Oprocelim +DAportable +O2 ../../obj/HP/top_query_common_db.o ../../obj/HP/top_get_db_info.o ../../obj/HP/top_mpt_db.o ../../obj/HP/top_iid_to_name.o ../../obj/HP/top_get_alarm_info.o ../../obj/HP/top_get.o ../../obj/HP/top_query.o ../../obj/HP/top_query_sstub.o ../../obj/HP/top_mpt_query_sstub.o ../../obj/HP/ire_trace_cfg_sstub.o -L../../obj/HP -L/vob_mnt/A1340/if/lib/HP -lire -D_HPUX_10 -DHPUX -D_HPUX_SOURCE -DHPUX_DCE +ESlit +Oprocelim +DAportable +O2 -L/vob_mnt/A1340/if/lib/HP -lire -lire_gui -lire_nav /opt/flexlm/v7.0/hp700_u9/lm_new.o -L/opt/flexlm/v7.0/hp700_u9 -llmgr -L/opt/app/oracle/product/8.1.6/lib -L/opt/app/oracle/product/8.0.6/lib -lclntsh `cat /opt/app/oracle/product/8.1.6/lib/sysliblist` -lm -lpthread -lpthread -lm -L/usr/dt/lib -lDtHelp -lDtSvc -L/usr/lib/Motif2.1 -lMrm -lXm -L/usr/lib/X11R5 -lXt -lX11 -L/opt/commserv6.0.1/lib /opt/langtools/lib/end.o -ldce -lndbm -lm -lc_r -Wl,-B immediate -Wl,-B nonfatal -o ../../obj/HP/top_query
When we try to run our process on HP11 with DCE 1.5 we get the error:
Pthread internal error: message: __libc_reinit() failed, file: /ux/core/kern/pth
reads/pthread.c, line: 1093
Return Pointer is 0x7e8af0c3
Is there some incompatibilty between DCE threads and HP-UX threads?
Any help/suggestion is highly appreciated.
Thanks in advance for your help!
Kind Regards,
Rui.
- Tags:
- pthread
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2001 11:01 AM
02-07-2001 11:01 AM
Re: Runtime error with process compiled on HP-UX 11 with DCE 1.5
the cc command. It appears that the HP-UX 11.x agent is a native 11.x agent and uses,
or is compiled with Kernel Threads (libpthread), which cannot be
intermixed with Posix/DCE threads.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2001 11:05 AM
02-07-2001 11:05 AM
Re: Runtime error with process compiled on HP-UX 11 with DCE 1.5
This is certainly due to the fact that you are trying to compile with Kernel Threads (libpthread), which cannot be intermixed with Posix/DCE threads.
Try removing -lc_r and -ldce LIBS from the cc command, and recompile. This should do the trick.
I hope this helps !
Best regards,
Fred.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2001 03:16 AM
02-08-2001 03:16 AM
Re: Runtime error with process compiled on HP-UX 11 with DCE 1.5
Thanks a lot for your contribution.
Thanks to your suggestions we have changed our compilation flags as follow:
/opt/ansic/bin/cc -D_HPUX_10 -DHPUX -D_HPUX_SOURCE -DHPUX_DCE +ESlit +Oprocelim +DAportable -Aa +DAportable -DIRE_TRACING_ACTIVE -g +w1 -D_POSIX_D10_THREADS -D_HPUX_SOURCE -D_REENTRANT -D_PTHREADS_DRAFT4 -c -I . -I /usr/include -I /opt/dce/include -I ../../inc -I ../../gen/HP -I ../inc -I ../gen/HP -I /vob_mnt/A1340/if/gen/HP -I /vob_mnt/A1340/if/inc -I /vob_mnt/A1340/if/inc/bitmaps -I /opt/app/oracle/product/8.0.6/forms60/pub -I /opt/app/oracle/product/8.1.6/precomp/public -I /usr/include/X11R5 -I /usr/include/Motif2.1 -I /usr/include/Motif2.1/Xm -I /opt/OV/include -I /opt/uimx2.9/config -I /usr/dt/include -I /opt/commserv6.0.1/inc -I /opt/ilog/server42/include -I /opt/ilog/views311/include -I /opt/aoi/include -I /opt/flexlm/v7.0/machind top_query.c -o ../../obj/HP/top_query.o
Linking:
/opt/ansic/bin/cc -D_HPUX_10 -DHPUX -D_HPUX_SOURCE -DHPUX_DCE +ESlit +Oprocelim +DAportable ../../obj/HP/top_query_common_db.o ../../obj/HP/top_get_db_info.o ../../obj/HP/top_mpt_db.o ../../obj/HP/top_iid_to_name.o ../../obj/HP/top_get_alarm_info.o ../../obj/HP/top_get.o ../../obj/HP/top_query.o ../../obj/HP/top_query_sstub.o ../../obj/HP/top_mpt_query_sstub.o ../../obj/HP/ire_trace_cfg_sstub.o -L../../obj/HP -L/vob_mnt/A1340/if/lib/HP -lire -D_HPUX_10 -DHPUX -D_HPUX_SOURCE -DHPUX_DCE +ESlit +Oprocelim +DAportable -L/vob_mnt/A1340/if/lib/HP -lire -lire_gui -lire_nav /opt/flexlm/v7.0/hp700_u9/lm_new.o -L/opt/flexlm/v7.0/hp700_u9 -llmgr -ldce -lndbm -lm -Wl,-B immediate -Wl,-B nonfatal -L/opt/app/oracle/product/8.1.6/lib -L/opt/app/oracle/product/8.0.6/lib -lclntsh -l:libcl.a -l:librt.sl -l:libnss_dns.1 -l:libdld.sl -lm -lm -L/usr/dt/lib -lDtHelp -lDtSvc -L/usr/lib/Motif2.1 -lMrm -lXm -L/usr/lib/X11R5 -lXt -lX11 -L/opt/commserv6.0.1/lib /opt/langtools/lib/end.o -ldce -lndbm -lm -Wl,-B immediate -Wl,-B nonfatal -o ../../obj/HP/top_query
Running with the debugger wdb, stops before main() with SIGBUS:
Program received signal SIGBUS, Bus error.
[Switched to thread 1 (user thread (7589, 0))]
0x7f6e52a8 in () from /usr/lib/libc.2
Threads:
1) user thread (7589, 0) 0x7f6e52a8 in () from /usr/lib/libc.2
Call Stack:
#0 0x7f6e52a8 in () from /usr/lib/libc.2
#1 0x7f7b7ea8 in __thread_atfork () from /usr/lib/libc.2
#2 0x7f7b5a80 in __libc_init () from /usr/lib/libc.2
#3 0x7e1e3af4 in hp__pre_init_libc () from /usr/lib/libcma.2
Please note that we are trying to compile with DCE 1.5 on HP-UX 11.
Any help/suggestion is highly appreciated.
TIA.
Kind Regards,
Rui.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2001 04:42 AM
02-08-2001 04:42 AM
Re: Runtime error with process compiled on HP-UX 11 with DCE 1.5
In the compile line:
- You have both -D_POSIX_D10_THREADS and -D_PTHREADS_DRAFT4. The former is for kernel threads, the latter is DCE/CMA threads; you only need one.
- You have -I/opt/dce/include. It is probably worth checking to see if you really need this; /usr/include has links to most of the things relevant to DCE.
In the link line:
- Although it is not mentioned anymore, libpthread is probably being included indirectly by another library still (run 'odump -sllibloadlist
- It is only possible to have one threads package included in an application, so you'll need to pick the correct libraries too. If you want to use CMA/DCE carry on using -ldce and remove the reference to libpthread. For kernel threads, replace -ldce with -ldcekt (This may need to be installed from the applications CDs if it is not present).
If you have parts of the application with thread calls that were written for the CMA threads package, you'll need to check the calls against the man pages on 11.00 to make sure they are correct since the threads interface has changed a bit between the implementations of CMA and kernel threads.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2001 11:16 AM
02-08-2001 11:16 AM
Re: Runtime error with process compiled on HP-UX 11 with DCE 1.5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2001 08:54 AM
02-09-2001 08:54 AM
Re: Runtime error with process compiled on HP-UX 11 with DCE 1.5
1. Port your application to use kernel threads and hence -ldcekt.
or
2. Get a CMA threads version of Oracle. You cannot force the version you have to use CMA threads, it will have to be a version specifically engineered for that package.
Not totally related to this, but still important. Don't link against libdce.1. This is the 10.20 compatibility library and it is there to support applications built on 10.20 and ported as executables only. If you are compiling on 11.00 use libdce.sl (that is, libdce.2).