Meaning of aCC runtime Error 22 (114 Views)
Reply
Occasional Visitor
DeWayne Dantzler
Posts: 3
Registered: ‎05-09-2007
Message 1 of 6 (114 Views)

Meaning of aCC runtime Error 22

Received aCC runtime Error 22 from shl_findsym(/usr/lib/libCsup.2,_shlInit) when attempting to link in xerces-c++ xml library and would like to know why and how to resolve it.

Host: HP-UX B.11.11 U 9000/800
Compiler switches:

/opt/aCC/bin/aCC -w +z +DAportable -DNDEBUG -DAPP_NO_THREADS -DXML_USE_NO_THREADS -D_HP_UX -DHPaCC -Wl,+s -Wl,+b,. L/ots/xerces-c-hpux_11i-acc_a03/lib -lxerces-c
Acclaimed Contributor
A. Clay Stephenson
Posts: 17,825
Registered: ‎07-16-1998
Message 2 of 6 (114 Views)

Re: Meaning of aCC runtime Error 22

I am going to assume that by run-time error you mean an error of the compiler/linker rather than of the executable itself. Errno 22 = EINVAL means that a system call received an invalid argument and generally indicates a bug in the code. Since you haven't bothered to indicate your aCC version, I'm not going to look for patches but I suggest that you search the patch database for applicable aCC/ld patches.
If it ain't broke, I can fix that.
Occasional Visitor
DeWayne Dantzler
Posts: 3
Registered: ‎05-09-2007
Message 3 of 6 (114 Views)

Re: Meaning of aCC runtime Error 22

aCC: HP ANSI C++ B3910B A.03.56

The compile and link phase completes, but when I attempt to execute the application, I get the runtime error. I was not receiving this error until I added the xerces-c++ xml parser library to the application.

Appreciate any suggestions or leads. Thanks

Acclaimed Contributor
A. Clay Stephenson
Posts: 17,825
Registered: ‎07-16-1998
Message 4 of 6 (114 Views)

Re: Meaning of aCC runtime Error 22

Okay, it's really a case of debugging 101. Compile with the -g option; start your executable; and allow it to crash. Use the debugger (e.g. gdb) to examine the core file and get a stack trace. If you are fortunate the problem lies somewhere in your source code rather than a library.
If it ain't broke, I can fix that.
Occasional Visitor
DeWayne Dantzler
Posts: 3
Registered: ‎05-09-2007
Message 5 of 6 (114 Views)

Re: Meaning of aCC runtime Error 22

Ok, got a core file and the debugger wdb reported the following:

"warning: The shared libraries were not privately mapped."

Sounds like I don't have the right compiler or linker options. What am I missing here?
Acclaimed Contributor
Dennis Handly
Posts: 25,058
Registered: ‎03-06-2006
Message 6 of 6 (114 Views)

Re: Meaning of aCC runtime Error 22

[ Edited ]

Error 22 on shl_findsym means: The specified handle or index is not valid or an attempt was made to load a library at an invalid address.
None of these make sense. You may want to use tusc to see what's going on.

Note: The purpose of the error message is to blame someone else.

>SEP: but I suggest that you search the patch database for applicable aCC/ld patches.

It appears it is a dld issue?

>SEP: it's really a case of debugging 101.

No, this is a post doctoral class. ;-)
You must debug static initializers before it gets to main.

>got a core file and the debugger wdb reported the following:
"warning: The shared libraries were not privately mapped."
>What am I missing here?

The fact that you should ignore this and go about your business. That warning is only valid when you are running an executable.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.