Operating System - Linux
1752511 Members
4668 Online
108788 Solutions
New Discussion юеВ

Re: Meaning of aCC runtime Error 22

 
DeWayne Dantzler
New Member

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
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

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.
DeWayne Dantzler
New Member

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

A. Clay Stephenson
Acclaimed Contributor

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.
DeWayne Dantzler
New Member

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?
Dennis Handly
Acclaimed Contributor

Re: Meaning of aCC runtime Error 22

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.