Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Getting run time error on libc.a[shr.o]

Posted on 1999-07-16
Medium Priority
Last Modified: 2010-05-18
I am trying to compile a program on AIX 4.2.1. The program compiles without any errors, but when I run it, it gives me the following error:

# upper
exec(): 0509-036 Cannot load program upper because of the following errors:
        0509-022 Cannot load library libc.a[shr.o].
        0509-026 System error: A file or directory in the path name does not exist.

I have checked /usr/lib and it does have a libc.a file. But I don't know what does [shr.o] mean here. If it is a file which directory I should look for it?

Any clue??

Question by:theta
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment

Accepted Solution

bedot earned 40 total points
ID: 1263719
AIX 4.x use dynamic libraries on execution, that reduce the code, and modules are loaded when necessary;
to do that, the compile call the function shr, which is an object of libc.a:
the command ar t /usr/li/libc.a give the table of all the objects in libc.a:

for a part only:


check if your library contains this shr.o
1° yes:  either you haave compiled your source on another box, and different version, either your archive libc.a has been modified (adding some personal function ...?...), or is corrupted;
with great precautions (save-copy before), try to restore an oldier version of libc.a, or try to re-create the index onto the library with the ralib command on this library

2° no: this object has disappear ; why?? mystery; restore an oldier with same precautions

OTHER: check for the option of cc that permit to unuse dynamic libraries (including onto the code the necessaries functions, avoiding to have to use dynamic libraries)

(I know this option exists, but i've forgotten the way to do)


Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode ( They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question