LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-14-2010, 12:39 AM   #1
tank junior
Member
 
Registered: Apr 2010
Posts: 42

Rep: Reputation: 0
Binary Dependency Hell, what the f..|<


Hi,

This is my first post and I recently dived into Linux. Please have mercy on me if you find some of my questions vague or inappropriate. One of the primary reason to shift on linux is to convert some of my python applications initially developed under windows.

These apps required python 2.6.4, wxPython, pyCairo etc. There are also couple of modules of some third party including mine that needs to be compiled first. Compilation is based on cython, makefile, python distutils and gcc.

Initially I started with ubuntu karmic 9.10 and things were looking easy to me until I discovered the ugly fact of binary dependency on linux platforms. The app that has been compiled on karmic 9.10 is refused to run on 8.04.4 LTS. The main culprit behind this glibc and and it's forward-backward compatibility issue. The easiest solution suggested by some users to use a bit older distribution for development, in another words, use a lower version of glibc. This make sense at least to me, correct me if I am wrong here.

Is it not possible to install an older version of glibc on karmic 9.10 and compile all you programs against it? If yes, but it would be a mess and open a can of worms then I would prefer to use older distribution method.

Choosing another distribution is again a problem here. So far I have used only ubuntu and open-suse once but for a very short period of time. As per my requirements goes, I have to choose one that uses a fairly old version of glibc, still actively in development and good support.(forums and mailing lists)

http://distrowatch.com is the place where I have compared various distros and it seems debian 4.0 etch is hopefully a correct choice. It's based on glibc 2.3.6, gcc 4.4.1 and gtk+ 2.8.20. I need some pointers here or if I am wrong here then please don't mind suggesting me a different distro.

One more way I can think of is to download and compile each and every thing I need to in my development environment(python, wxpython etc.) on older machine, once compiled, a .deb package can be created which can be used to install the requirements on any modern distro. This would be a one time job and bit safer if something goes wrong with your machine(crash or what ever), I can install them back again from backup. Is it really worth to go by this road?

Bottom line is, How to take care of this binary dependency issue and distribute your application confidently.

There are other questions banging in my head but I think I have explained my core problem. It may possible that I am completely wrong since the beginning and there is whole new approach to solve the issue of binary dependency. Please don't mind, shoot what ever blinks in your head first.

Best regards

Tank Junior
 
Old 04-14-2010, 12:50 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
Thats where these package management softwares come into play. Like synaptic or apt on Ubuntu and Debian like. Synaptic will install all the dependency packages for your installed software.
Are you writing a software? You can just write and distribute. Those who wish to install will have to take care of the dependencies.

Welcome to LQ though.
 
Old 04-14-2010, 12:59 AM   #3
tank junior
Member
 
Registered: Apr 2010
Posts: 42

Original Poster
Rep: Reputation: 0
This is not related to open source app but rather distributing commercial apps. From commercial point of it's not good practice to put burden on your end user. This has been suggested to me and make sense but still I would like to know about solving binary dependency issue for the matter.

Cheers

Tank Junior
 
Old 04-14-2010, 01:18 AM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
If you want to distribute binaries for different platforms you need to compile them for those platforms. You can run chroot environments or even virtual machines with different distros installed on them to do your building and testing.

Evo2.
 
Old 04-14-2010, 02:21 AM   #5
tank junior
Member
 
Registered: Apr 2010
Posts: 42

Original Poster
Rep: Reputation: 0
Yes, I do agree and this is what done by most companies. It's because they have resources(hardware, software & manpower) to support as many distros as they can support. Being an independent software developer it would be difficult to go by that road. It'll surely slow down the development cycle as you have to produce package for every distro that has been asked by user.

I think we are going little off topic here. My questions is related to solve the binary dependency issue using conventional or using off route methods.

I am expecting some pointers from people who has done this before either in an open source app or better in an commercial app.
I have seen couple of commercial app available on linux platforms where mostly of them requires glibc 2.3.2 or higher in system requirements. Latest glibc version used by modern distros is 2.11.x. They are making only two packages available which as based on the architectures(x86 & x64) rather then distro specific. Now this really makes sense and one should focus from the beginning if this can be done.

Cheers

Prashant
 
Old 04-14-2010, 02:49 AM   #6
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Hi Prashant

Generally when one chooses to install something in linux the first thing to do is look at the system requirements.
Assuming you place this information in a public place, I then agree with post #2 above that it is the package maintainers responsibility
to have the appropriate versions of necessary files installed prior to your applications.

Now I am not saying to not build based on older versions of files (such as glibc), but as someone who has assisted in package management
for a distro, you need to be aware that linux, very much unlike windows, uses linking to single copies of files as opposed to windows where applications
often install their own personal copy (hence the bloat on windows systems, both in files and registry entries).

Also as outlined in post #2, if a distro like Ubuntu were to adopt your application, they would add all the necessary dependencies.
If on the other hand a user decides to add it and it is not in the repositories, then it is up to them to get the necessary ones installed
prior to installing your application.

Hope that helps.
 
Old 04-14-2010, 03:51 AM   #7
tank junior
Member
 
Registered: Apr 2010
Posts: 42

Original Poster
Rep: Reputation: 0
Hi grail,

Fine, I agree with you. Now consider this situation:

I have compiled a module using it's sources on karmic 9.10 using gcc and executable is out. It's because I am compiling my module on karmic, where glibc version is 2.11.x, I am sure that I have to say to my end user glibc 2.11.x or higher is needed. Am I right? Now how do a user running ubuntu 8.04.4 LTS or any other version where glibc version is fairly older will install glibc 2.11.x, which actually is my requirement. Is it possible that end user can install higher version as any other package is getting installed. I have read that installing glibc version(higher) is not recommended. You might end up with a confused machine. I don't know if it's true or not.

Check one similar face here:
http://kbase.redhat.com/faq/docs/DOC-10853

Last edited by tank junior; 04-14-2010 at 03:53 AM.
 
Old 04-14-2010, 05:44 AM   #8
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Yes it is possible for the 8.04 user to upgrade their glibc should they require. For them it is probably in a dev package
as not part of the base system.

To look at it another way, if you are on Ubuntu 9.10 your standard gcc (once installed) will be in the order of 4.X.X, but
there are source packages that require you to have gcc 2.95 installed to be able to compile said sources.

as you can see, in linux it is quite common to have multiple levels of applications and files installed.
 
Old 04-14-2010, 06:23 AM   #9
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Another option to consider is static linking. That's not always possible though.
 
Old 04-15-2010, 02:56 AM   #10
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
For open source application solution is simple - just provide source and let the rest of the world to worry about building and satisfying dependencies.

For closed-source application or actually for any application that should be for some reason distributed in the binary form to different Linux distribution situation is worse.

I see following ways to deal with problem:
1. Build your software on the old distribution. The older, the better :)
It's not unusual to build software on such ancient platforms as Fedora Core 1 or Fedora Core 3
2. Build your software on your current platform and then use statifier
http://statifier.sf.net to pack dynamically linked executable and all required shared libraries into self-containing one. This executable can be copied to (almost) any Linux and run their without any dependencies trouble.
3. Some as 2) but instead of statifier use Ermine (http://magicErmine.com)
statifier is licensed under GPL, but he perform poor on systems with memory randomization (nearly all modern distros, including Ubuntu :(
Ermine is commercial, but able to deal with memory-randomization problem.
4. As was already mentioned, static build.

If you choose 2 3 or 4 to build executable without dependencies, one dependencies will remain anyway - kernel.

In order to know what minimal kernel version required to run your application on the build box you can run:
Code:
/sbin/ldconfig -p | grep ABI | grep libc.so.6
You'll get output something like that:
Code:
	libc.so.6 (libc6,x86-64, OS ABI: Linux 2.6.18) => /lib64/libc.so.6
	libc.so.6 (libc6, hwcap: 0x0018000000000000, OS ABI: Linux 2.6.18) => /lib/i686/nosegneg/libc.so.6
	libc.so.6 (libc6, OS ABI: Linux 2.6.18) => /lib/libc.so.6
In this case minimal kernel version required to run application is 2.6.18

Also this link may be of interest for your:
http://magicErmine.com/sesl.html
 
1 members found this post helpful.
Old 04-17-2010, 03:48 AM   #11
tank junior
Member
 
Registered: Apr 2010
Posts: 42

Original Poster
Rep: Reputation: 0
Thanks Valery,

I have been looking for these answers for a long time. The tools http://statifier.sf.net and http://magicErmine.com may solve the problem easily. I would give a try ASAP.

Considering myself is a newbie on linux and also with limited skill sets, I would like you to recommend an older distribution.I recently tried debian 4 etch, but failed to do stuff and more over I am out of luck in forums. The reason is that support has been stopped as the distro is dead. I do have a very limited requirements:

1. python 2.6.5
2. wxpython 2.8.10.1
3. libcairo 1.8.8
4. pycairo 1.8.8
5. bootloader

for wxpython, it's been suggested that it's not a good idea to build wxpython statically. for the rest of them you can do it. Need some advice here.



Thanks

Prashant
 
Old 04-18-2010, 02:38 AM   #12
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by tank junior View Post
Thanks Valery,

I have been looking for these answers for a long time. The tools http://statifier.sf.net and http://magicErmine.com may solve the problem easily. I would give a try ASAP.

Considering myself is a newbie on linux and also with limited skill sets, I would like you to recommend an older distribution.I recently tried debian 4 etch, but failed to do stuff and more over I am out of luck in forums. The reason is that support has been stopped as the distro is dead. I do have a very limited requirements:

1. python 2.6.5
2. wxpython 2.8.10.1
3. libcairo 1.8.8
4. pycairo 1.8.8
5. bootloader

for wxpython, it's been suggested that it's not a good idea to build wxpython statically. for the rest of them you can do it. Need some advice here.



Thanks

Prashant
I myself mostly work with RH/Fedora and with debian on only very rare occasions.
Satisfying you requirements in default installation is not an easy thing. For example, Fedora 12 has only python 2.6.2

On the bright side recently I compiled without too much trouble python 2.6.4 on Fedora Core 1.

If you use as build platform Fedora Core 1 (or 3) executable will be able to run on systems with kernel >= 2.2.5

If your will be satisfied with kernel >= 2.6.18 then you can build on Fedora 12.

The choice is really up to you - of more precisely - it depend on your decision about minimal supported kernel version.
 
  


Reply

Tags
binary, dependancies



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What dependency hell?? Chikne Slackware 69 02-10-2007 07:20 AM
dependency HELL vortmax Fedora 4 11-23-2006 03:28 PM
Dependency Hell Mithrilhall Linux - Newbie 5 04-28-2006 10:29 AM
dependency hell riseringseeker Linux - Newbie 3 09-22-2004 01:57 PM
Is this what they mean by dependency hell? john_walsh54 Linux - Software 1 10-10-2003 07:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration