KPIC makes programs running crash when libraries are recompiled

J

jortizclaver

[Solaris 2.8 && Sun Studio 10]

Hi,

I have a very simple library that wraps a Timer class and a test
program linked to it.

First of all, I compile the library and the main without the KPIC flag.
Then, I execute the program and, while it's running, I add some dummy
sentence to the library and recompile it. Nothing happens to the binary
running. It keep unaware of changes in the library and keeps running.

Now, I recompile everything with KPIC and try to make the same test.
Just when the library has been recompiled, execution is broken by a
core dump.

You'd say that it has an easy solution: do not use the KPIC but I'm
trying to develop my program in 64 bits and I'm forced - as far as I
know - to compile using the KPIC flag.

Any idea of how to make it work? I can't assume to stop all my programs
after any change in the library.

Thanks in advance
Jorge Ortiz
 
R

Richard G. Riley

[Solaris 2.8 && Sun Studio 10]

Hi,

I have a very simple library that wraps a Timer class and a test
program linked to it.

First of all, I compile the library and the main without the KPIC flag.
Then, I execute the program and, while it's running, I add some dummy
sentence to the library and recompile it. Nothing happens to the binary
running. It keep unaware of changes in the library and keeps running.

Now, I recompile everything with KPIC and try to make the same test.
Just when the library has been recompiled, execution is broken by a
core dump.

You'd say that it has an easy solution: do not use the KPIC but I'm
trying to develop my program in 64 bits and I'm forced - as far as I
know - to compile using the KPIC flag.

Any idea of how to make it work? I can't assume to stop all my programs
after any change in the library.

Thanks in advance
Jorge Ortiz

This might help:

http://forum.sun.com/thread.jspa?threadID=28050&messageID=100609
 
K

Keith Thompson

jortizclaver said:
[Solaris 2.8 && Sun Studio 10]

I have a very simple library that wraps a Timer class and a test
program linked to it.

C doesn't have classes; are you using C++?
First of all, I compile the library and the main without the KPIC flag.
Then, I execute the program and, while it's running, I add some dummy
sentence to the library and recompile it. Nothing happens to the binary
running. It keep unaware of changes in the library and keeps running.
[snip]

It looks like your problem isn't really related to the C programming
language; rather, it's specific to Solaris. You'll get much better
help in comp.unix.solaris.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top