Results 1 to 6 of 6

Thread: standalone linux app problems

  1. #1
    Join Date
    May 2012
    Beans
    103

    standalone linux app problems

    hey, I created a C openGL glx application. I need to link to libx11. so and other standard libs. Im little worried about the linker: I typed ./libcustom to link to custom lib in working directory. -l libX11 to link to x11, but I tested the app on another Ubuntu. It failed to open shared object libx11.so.6??? I thought libx was standard for Linux? So I really don't know how to robustly link with standalone applications on Linux. I do not want the user to install the libs (I don't even know how to code an installer). I know, my machine is x86, the other Ubuntu was x86_64, so a 32bit app linking to a 64 bit lib. Shouldn't be a problem? Do I need to provide 2 different executable, one for 32 bit and one for 64 bit, with the dependancies provided by me? I want to keep the distribution package as small as possible.

  2. #2
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: standalone linux app problems

    You need to install specific packages if you want to run 32-bit executables on 64-bit systems. The standard practice is to provide two executables (one for 32-bit and one for 64-bit).
    Last edited by Bachstelze; June 1st, 2013 at 11:29 AM.
    「明後日の夕方には帰ってるからね。」


  3. #3
    Join Date
    Apr 2007
    Location
    (X,Y,Z) = (0,0,0)
    Beans
    3,715

    Re: standalone linux app problems

    Not sure on how Ubuntu manages multiarch, but in Debian we are able to mix 64-bits and 32-bits by adding an architecture to dpkg:

    Code:
    # dpkg --add-architecture i386
    # apt-get update
    You may have to install the Ubuntu-equivalent of the Debian ia32-libs package, and then the relevant 32-bits versions of the libraries you need.

  4. #4
    Join Date
    May 2012
    Beans
    103

    Re: standalone linux app problems

    so I need to create 32bit and 64 bit of app? But I run a 32 bit OS. How do I compile for 64 bit? And I though 32 bit could run on 64bit without problems?

  5. #5
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: standalone linux app problems

    Quote Originally Posted by thedardanius View Post
    so I need to create 32bit and 64 bit of app? But I run a 32 bit OS. How do I compile for 64 bit?
    You could cross-compile, but it's a pain. You really can't get your hands on a 64-bit machine?

    And I though 32 bit could run on 64bit without problems?
    It can, once you have installed the necessary packages.
    「明後日の夕方には帰ってるからね。」


  6. #6
    Join Date
    May 2012
    Beans
    103

    Re: standalone linux app problems

    So for 32 bit and 64 bit you have separate libs? Uhm, should I provide themselves in my package I distribute?

Bookmarks

Posting Permissions

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