0

I am using a shared C library on Linux that is distributed in binary form. The problem is that the dependencies are set to require exactly the versions available on the development machine. For example, each release requires the (at the time) latest glibc and only the exact version of libreadline on their system.

I have contacted the developers and they don't know what to do about this. As far as I can tell, they are not consciously using the latest features, so the library should continue to work with older dependencies. I think they are using gcc on Linux, but they are also using a complex make system to control other compilers to build for Windows and Unix.

How and to what extent can you manage the build process so that a library requires dependencies just of a sufficient version and will also accept later versions?

This was a related question.

Edit: To be clear, I want to know how to build programs so they will accept dependencies with a specific version number or later numbers. Whether the developers compile it or I do, I want to be able to distribute a binary that does not require exactly the versions of dependencies present in the build environment.

Edit 2: After rephrasing the question, I realized this has been covered many times before. Some of the best Q&A:

Deploying Yesod to Heroku, can't build statically

Compile with older libc

Linking against an old version of libc

How can I link to a specific glibc version?

Community
  • 1
  • 1
  • This is notably why I prefer using free open source software. You are dependent on the producer's good will to build the software for your system. – Basile Starynkevitch Jun 08 '14 at 21:22
  • Are they rpm/apt "dependencies" or is the library code calling libreadline itself? – Rob11311 Jun 08 '14 at 21:41
  • @Basile: Oops, sorry to imply that source is not available. The library is very large and rather hard to build, though. – user3720403 Jun 08 '14 at 23:53
  • @Rob11311: The library is calling the specific versions. – user3720403 Jun 08 '14 at 23:54
  • If the library has source available, then having a build service project for it, should be a better solution as it'll produce native packages for large range of systems. If it's runtime calls, then they should link in an older OS version, as newer library versions are assumed compatible. – Rob11311 Jun 09 '14 at 00:12

1 Answers1

1

It's not very confidence inspiring. They should be building on a stable baseline release, it could just be a virtual install. Some versions of Linux, copy a build environment so packages aren't linked to updated library versions.

The openSUSE build service, lets devolopers build binary packages, for a wide variety of http://openbuildservice.org/about/

IIRC readline is a GPL program and checking at http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html#Availability suggests it is GPL v 3 so they may be in violation of the GPL, if they are using libreadline functions and should provide you with the source to their library. I am not sure if you are meaning rpm/apt package dependencies, or their library is actually calling libreadline.

You can always extract files from rpm or apt packages, if necessary so avoiding software manager issues, caused by poor packaging.

Rob11311
  • 1,396
  • 8
  • 10
  • Your main point was a bit buried, that the basic solution is just to build on the oldest system that you want to support and rely on compatibility with newer library versions. – user3720403 Jun 09 '14 at 18:26