Challenging and Interesting Problem & Doubt

This is a discussion on Challenging and Interesting Problem & Doubt within the Linux Programming forums, part of the Platform Specific Boards category; Hi guys, Before reading this email, please open and read the "http://mulinux.dotsrc.org/lepton" website. 1) I Prepared Lepton Floppy Linux in ...

  1. #1
    Registered User
    Join Date
    Jan 2006
    Posts
    2

    Challenging and Interesting Problem & Doubt

    Hi guys,

    Before reading this email, please open and read the "http://mulinux.dotsrc.org/lepton" website.

    1) I Prepared Lepton Floppy Linux in one floppy disk and stored my executable C program file (compiled with gcc) in another floppy disk.

    2) I started Lepton linux from first floppy. It loaded successfully.

    3) I put the second floppy, which contained my C executable file and mounted into /a.

    4) When I applied "ls" command in /a, it is displaying files contained in the floppy.

    5) When i am trying to execute the C executable file, it is displaying an error message i.e., "File not found". This error is coming because of the incompatability of the shared library versions.

    6) Actually, Mulinux and Lepton linux distributions are developed using "libc.so.5" as shared library version. But, I am compiling and making my C program executable file using "libc.so.6" as shared library version. So, that Lepton linux is not able to execute my C executable file.

    7) But, in any way, I want to run my C executable file in Lepton linux.

    Now, What can I do? Please show me solution. I will be eagarly waiting for your reply.

    Thank you for your patience.

    With regards,
    Chandra.

  2. #2
    Sr. Software Engineer filker0's Avatar
    Join Date
    Sep 2005
    Location
    West Virginia
    Posts
    235
    I can think of a few solutions, but I'm not sure that any of them will work for you.

    In the old days on BSD and SysV Unix based systems, I could choose whether I linked against shared libraries or static libraries. Building with static libraries left no dependencies at runtime other than that the kernel was compatible. I don't know if this is practical on Linux these days or not.

    The other solution is to have a copy of the shared libs from the target system on your development system and use -L to specify the directory from which the shared libraries are selected when doing the link.

    I hope this is helpful.
    Insert obnoxious but pithy remark here

  3. #3
    puu
    puu is offline
    Registered User
    Join Date
    Dec 2005
    Posts
    4
    I don't think that you can run libc 6 compiled executables with libc 5, but you can always try to make a link(libc.so.6) that points to libc.so.5.

    You could try to getting the libc 5 libraries on the machine, where you compile and compile the program with that instead of libc 6.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21