KPIC makes programs running crash when libraries are recompiled

Discussion in 'C Programming' started by jortizclaver, Feb 22, 2006.

  1. jortizclaver

    jortizclaver Guest

    [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
     
    jortizclaver, Feb 22, 2006
    #1
    1. Advertising

  2. On 2006-02-22, jortizclaver <> wrote:
    > [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


    --
    Remove evomer to reply
     
    Richard G. Riley, Feb 22, 2006
    #2
    1. Advertising

  3. "jortizclaver" <> writes:
    > [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.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
    We must do something. This is something. Therefore, we must do this.
     
    Keith Thompson, Feb 22, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QXNwLm5ldCBwYWdlIG5vdCByZWNvbXBpbGVk?=

    Asp.net page not recompiled

    =?Utf-8?B?QXNwLm5ldCBwYWdlIG5vdCByZWNvbXBpbGVk?=, Jan 30, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    356
    Ken Cox [Microsoft MVP]
    Jan 31, 2004
  2. Erwin Moller
    Replies:
    6
    Views:
    2,722
    Chris Smith
    May 27, 2004
  3. jortizclaver
    Replies:
    0
    Views:
    311
    jortizclaver
    Feb 22, 2006
  4. NewToCPP

    Why does C/C++ programs crash

    NewToCPP, Jul 7, 2006, in forum: C++
    Replies:
    34
    Views:
    1,080
    Jim Langston
    Jul 13, 2006
  5. Aryeh M. Friedman

    ClassLoader not loading recompiled classes

    Aryeh M. Friedman, Oct 2, 2007, in forum: Java
    Replies:
    17
    Views:
    667
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Oct 4, 2007
Loading...

Share This Page