Find the answer to your Linux question:
Results 1 to 2 of 2
Hello, I am developing an evolutionary program which needs to test a specific program many times, under different configurations. I decided to use dynamic linking in order to boost the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2013
    Posts
    1

    Problem with dynamically linking


    Hello,

    I am developing an evolutionary program which needs to test a specific program many times, under different configurations.
    I decided to use dynamic linking in order to boost the testing process and up to this point everything was ok.

    I used a script to run make and generate the new library, which was then included in the main program in order to be tested.
    In a previous version this seemed to work just fine.
    However, I had to perform a few changes so that the main program was executed in a process, and another program would load the linked dynamic library (used sockets to perform Inter Process Communication).

    The thing is, strangely, after sometime, around 1000 recompilations of the dynamic library, it fails, saying the following:

    gcc -c -m64 -O -Wall -fPIC -c -I /usr/local/include -Os DFuncDarwin.c
    gcc -o pizza DFuncDarwin.o Misc.o --trace --shared -Wl,--dynamic-linker=/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 -o dfuncDarwin.so.1.0 -lm
    /usr/bin/ld: cannot find /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
    collect2: ld returned 1 exit status
    make: *** [pizza] Error 1
    BEGINING GEN 3 DUDE 95

    I have no Idea why does this happen... and I cannot find any answer. It works for so many cases, and then it fails...

    Does any body has a clue about this ???

    I would really appreciate...

    I can improve the description if needed...

    Thanks
    Last edited by ams_pedro; 03-26-2013 at 10:30 PM.

  2. #2
    Linux Newbie
    Join Date
    Mar 2010
    Posts
    152
    Quote Originally Posted by ams_pedro View Post
    gcc -c -m64 -O -Wall -fPIC -c -I /usr/local/include -Os DFuncDarwin.c
    gcc -o pizza DFuncDarwin.o Misc.o --trace --shared -Wl,--dynamic-linker=/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 -o dfuncDarwin.so.1.0 -lm
    /usr/bin/ld: cannot find /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2
    collect2: ld returned 1 exit status
    make: *** [pizza] Error 1
    BEGINING GEN 3 DUDE 95
    What do the other (successful) commands look like? Does /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 exist?
    Programming and other random guff: cat /dev/thoughts > blogspot.com (previously prognix.blogspot.com)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •