HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shared library build using aCC
Operating System - HP-UX
1834144
Members
2016
Online
110064
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
04-16-2003 03:49 AM
04-16-2003 03:49 AM
Shared library build using aCC
Hi HPers,
I have a working user exit written in C that I'm migrating to HP-UX11i. It runs correctly on Solaris, AIX, and on earlier versions of HP-UX. Building it on HP-UX11i requires my use of the "aCC" compiler. The initial component of the exit that is called is a shared library. Subsequently, it does a fork and exec of an executable. The executable then communicates with the shared library using IPC (shared memory and semaphores).
My symptom: The caller successfully finds and loads the shared library and starts correctly at the designated entry point. The fork call correctly returns a PID. However, I cannot see this PID when I do a "ps -ef". This seems rather suspicious. Furthermore, when I "execl()" to invoke the executable, it seems to never load, given that the first thing I do in its main() is a printf() that I never see. Yet, the execl() call returns no error to the shared library caller.
One wrinkle - I don't build the software that invokes my exit. It is a component of IBM's Websphere MQ messaging software called a Message Channel Agent (MCA). For any MQers out there, my exit is a channel message exit. You simply tell MQ the name, location, and entry point of the exit to be invoked. The MCA loads and runs the shared library beginning at the designated entry point.
I've never used the aCC compiler before, and I fear that my problem my occur because I'm not building my shared library correctly. Here's how I build the shared library. This output results from using the "+dryrun" option:
aCC: HP ANSI C++ B3910B A.03.33
/opt/aCC/lbin/ctcom.pa20 -DPLATFORM_UNIX -I. -I/opt/mqm/inc -I/opt/cb/build/pha
se2/api/inc -I/usr/include -I/usr/include/sys -piccode long -inst compiletime -d
iags 523 -D__HP_CXD_SPP=1 -D__hpux -D__unix -D__hppa -D__hp9000s800 -D__parisc -
D__STDCPP__ -D_ILP32 -D__HP_aCC=33300 -D_PA_RISC2_0 -D__STDC_EXT__ -D_HPUX_SOURC
E -D_INCLUDE_LONGLONG -ext on -lang c -exception off -I/usr/include -inline_powe
r 1 -longbranch 0 -unique_strings on -cachesize 256 cbchnex2sl.c
aCC: HP ANSI C++ B3910B A.03.33
LPATH=/usr/lib/libp:/usr/lib:/opt/langtools/lib
/usr/ccs/bin/ld -V -b +nosmartbind -o CBCHNEX2 /opt/aCC/lib/shlrt0.o +I__shlini
t -u__shlinit -v cbencfh.o cbunxipc.o cbchnex2sl.o -L /opt/cb/build/encryption -
L /opt/cb/build/entrust/tk/lib -L /usr/lib >/var/tmp/BAAa19829 2>/var/tmp/AAAa19
829
/opt/aCC/bin/c++filt &2
/opt/aCC/bin/c++filt removing /var/tmp/AAAa19829
removing /var/tmp/BAAa19829
Any help would be much appreciated!
Thanks,
Doug Pierson
Sr. Software Engineer
Systems Engineering, Inc.
dpierson@sengi.com
cell: 781-405-2000
I have a working user exit written in C that I'm migrating to HP-UX11i. It runs correctly on Solaris, AIX, and on earlier versions of HP-UX. Building it on HP-UX11i requires my use of the "aCC" compiler. The initial component of the exit that is called is a shared library. Subsequently, it does a fork and exec of an executable. The executable then communicates with the shared library using IPC (shared memory and semaphores).
My symptom: The caller successfully finds and loads the shared library and starts correctly at the designated entry point. The fork call correctly returns a PID. However, I cannot see this PID when I do a "ps -ef". This seems rather suspicious. Furthermore, when I "execl()" to invoke the executable, it seems to never load, given that the first thing I do in its main() is a printf() that I never see. Yet, the execl() call returns no error to the shared library caller.
One wrinkle - I don't build the software that invokes my exit. It is a component of IBM's Websphere MQ messaging software called a Message Channel Agent (MCA). For any MQers out there, my exit is a channel message exit. You simply tell MQ the name, location, and entry point of the exit to be invoked. The MCA loads and runs the shared library beginning at the designated entry point.
I've never used the aCC compiler before, and I fear that my problem my occur because I'm not building my shared library correctly. Here's how I build the shared library. This output results from using the "+dryrun" option:
aCC: HP ANSI C++ B3910B A.03.33
/opt/aCC/lbin/ctcom.pa20 -DPLATFORM_UNIX -I. -I/opt/mqm/inc -I/opt/cb/build/pha
se2/api/inc -I/usr/include -I/usr/include/sys -piccode long -inst compiletime -d
iags 523 -D__HP_CXD_SPP=1 -D__hpux -D__unix -D__hppa -D__hp9000s800 -D__parisc -
D__STDCPP__ -D_ILP32 -D__HP_aCC=33300 -D_PA_RISC2_0 -D__STDC_EXT__ -D_HPUX_SOURC
E -D_INCLUDE_LONGLONG -ext on -lang c -exception off -I/usr/include -inline_powe
r 1 -longbranch 0 -unique_strings on -cachesize 256 cbchnex2sl.c
aCC: HP ANSI C++ B3910B A.03.33
LPATH=/usr/lib/libp:/usr/lib:/opt/langtools/lib
/usr/ccs/bin/ld -V -b +nosmartbind -o CBCHNEX2 /opt/aCC/lib/shlrt0.o +I__shlini
t -u__shlinit -v cbencfh.o cbunxipc.o cbchnex2sl.o -L /opt/cb/build/encryption -
L /opt/cb/build/entrust/tk/lib -L /usr/lib >/var/tmp/BAAa19829 2>/var/tmp/AAAa19
829
/opt/aCC/bin/c++filt &2
/opt/aCC/bin/c++filt removing /var/tmp/AAAa19829
removing /var/tmp/BAAa19829
Any help would be much appreciated!
Thanks,
Doug Pierson
Sr. Software Engineer
Systems Engineering, Inc.
dpierson@sengi.com
cell: 781-405-2000
"Some cause happiness wherever they go; others whenever they go" - Oscar Wilde
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2003 06:24 AM
04-17-2003 06:24 AM
Re: Shared library build using aCC
I am guessing "Interpositioning" might be the problem here though I am not sure.
Use the "-m" option to ld for a linker report that includes a note of symbols which have been intersposed.
Use the "-m" option to ld for a linker report that includes a note of symbols which have been intersposed.
The sufficiency of my merit is to know that my merit is NOT sufficient
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2003 06:32 AM
04-17-2003 06:32 AM
Re: Shared library build using aCC
There doesn't seem to be anything wrong with the shared library build. If its being loaded correctly by the caller then I suspect its ok.
My next step here would be to download a copy of the "tusc" utility and run a system call trace of the application so you can see the fork/exec sequence that is run.
You can get tusc from here:
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/tusc-7.3/
Regards,
Steve
My next step here would be to download a copy of the "tusc" utility and run a system call trace of the application so you can see the fork/exec sequence that is run.
You can get tusc from here:
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/tusc-7.3/
Regards,
Steve
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP