What happens when an exe/lib links to another shared one:


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users What happens when an exe/lib links to another shared one:
# 1  
Old 08-30-2006
Error What happens when an exe/lib links to another shared one:

We build our code on all platforms Sol, Hp, Aix, Sgi & linux.

Some base libraries have changed.
All the dependent exe & lib which use those base libraries have changed in all platforms in terms of size/checksum or both except linux.

No code has changed in these.

We have a post utility which compares them from the previous ones on the basis of size & checkum. This thing is failing in linux as they are not getting changed.

As far as i know, when a library or exe has build time dependency on another shared library:
It keeps the name of the shared library in its table somewhere and uses the symbol name of the function or variable which it requires.
If its an archive library then it copies the stuff it requires.

Am i right? Smilie

I don't have any meaningful reason about this anomaly in Linux.

Can you suggest some? Smilie

Thanks
# 2  
Old 08-30-2006
The library in Linux is actually a link? eg. mylib.so is a link and is not updated to point to mylib.so.1.3

You should not depend on checksums to validate libraries. There should be a simple module in there, call it getversion(), with a static what string
Code:
static char *pvcsmodulename="@(#)mycompany modulename v 1.5   13 Jun 2003 14:06 $";
char  *getversion(void)
{
    return pvcsmodulename;
}

You can run what against the library to see the version, and your code can internally call getversion() if it needs it.
# 3  
Old 08-31-2006
Sorry,

I couldn't get you.

Can you explian a bit in detail.

Thanks
# 4  
Old 08-31-2006
All a checksum tells you is one thing: different checksums mean the files are different somehow. It is slightly possible for files to be different and return the same checksums.

Use another method to indentify your libraries and executables. You need positive indentification, not checksums, especially since this app is compiled on a lot of platforms. checksums are good for detecting data integrity. They are not always good as "file version identifiers". If they were, apps would use checksums as version numbers, IMO.
# 5  
Old 08-31-2006
To be precise we use MD5 checkum. We calculate that via perl library.

The problem is that there are different on all platforms except linux.

That's what creating some problems.
# 6  
Old 08-31-2006
Okay. Let's assume the linux box had a different, earlier version of the source you are compiling - by accident. How can you tell you're building the app from the correct source? Since the result is the same, your methods say nothing changed, then you are left with one answer: compiling the wrong version of code.
# 7  
Old 08-31-2006
That i can gurantee that the source code in all is the same.

We use clearcase and the view has the same config spec.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

Shared library with acces to shared memory.

Hello. I am new to this forum and I would like to ask for advice about low level POSIX programming. I have to implement a POSIX compliant C shared library. A file will have some variables and the shared library will have some functions which need those variables. There is one special... (5 Replies)
Discussion started by: iamjag
5 Replies

2. AIX

List all the soft links and hard links

Hi I'm logged in as root in an aix box Which command will list all the soft links and hard links present in the server ? (2 Replies)
Discussion started by: newtoaixos
2 Replies

3. Shell Programming and Scripting

Shared File system- lib access issue

I have a C++ binary executable installed in a file system which is shared across multiple solaris boxes. When I start this executable from one of the boxes,I am able to start only 4 parallel instances and from the 5th instance onwards I am getting the following error. fatal: libdb2.so.1:... (2 Replies)
Discussion started by: prasperl
2 Replies

4. Solaris

Hard Links and Soft or Sym links

When loooking at files in a directory using ls, how can I tell if I have a hard link or soft link? (11 Replies)
Discussion started by: Harleyrci
11 Replies

5. Programming

Can I create a shared object by using an static lib?

for example, I have a static lib name liba.a it offers some interface such a1();a2(); but i do not have the source code of liba.a; If i would like to create a shared object, and offer the similar interface of a1 and a2; Is there a way to fulfill such requirement? thanks. (7 Replies)
Discussion started by: flost
7 Replies

6. Red Hat

ls: /lib/libattr.so.1: no version information available (required by /lib/libacl.so.1)

Hello, I'm experimenting a problem on my rh server. Red Hat Enterprise Linux AS release 3 (Taroon Update 8) 2.4.21-47.ELsmp #1 SMP i686 i686 i386 GNU/Linux It started with a segmentation fault on #id root To resolve it, I've installed coreutils-4.5.3-28.4.i386.rpm But, I... (6 Replies)
Discussion started by: gogol_bordello
6 Replies

7. HP-UX

shared lib issue

im not good with this stuff but the app guys game to me with a problem with there c++ program on a new box, any ideas? bin- ./qeng Bus error (core dumped) bin- ./gdb qeng core Wildebeest is free software and you are welcome to distribute copies of it under certain conditions; type "show... (4 Replies)
Discussion started by: csaunders
4 Replies

8. Programming

how To edit exe to insert a serial no wich can be usd by runing exe

At time of installation I have to open the resource. and i have to insert a string serial number in the exe. please provide me code to edit the exe (in solaris) to insert a serial number which can be used by exe at run time. (6 Replies)
Discussion started by: ssahu
6 Replies
Login or Register to Ask a Question