[CentOS] Building for older versions

Mon Nov 23 17:27:58 UTC 2015
Michael Eager <eager at eagerm.com>

On 11/23/2015 09:10 AM, Nicolas Thierry-Mieg wrote:
> On 11/23/2015 06:00 PM, Michael Eager wrote:
>> On 11/23/2015 08:06 AM, Nicolas Thierry-Mieg wrote:
>>> On 11/23/2015 04:33 PM, Michael Eager wrote:
>>>> Hi --
>>>>
>>>> I'm trying to build an application on CentOS 7 which
>>>> can run on older versions of CentOS.  I'm running into
>>>> problems with versioning of memcpy in Glibc.  Executables
>>>> built on CentOS 7 require memcpy from glibc-2.14, which
>>>> causes the program not to load on systems with older
>>>> versions of glibc.
>>>>
>>>> My online search suggests to add an asm() with a .symver
>>>> option to select memcpy from glibc-2.2.5 in each of the
>>>> source files which reference memcpy().  This isn't practical
>>>> with a program with tens of thousands of source files.
>>>>
>>>> Does anyone have a reasonable solution?
>>>
>>> IMO you should really be building your app on an older Centos version
>>> (5 or 6). Then your binary
>>> should run everywhere, though it may sometimes require installing a
>>> -compat package.
>>
>> That causes a number of other problems,
>
> can you please provide some details? I'm genuinely curious as I've been faced with this occasionally
> and the only problem I've encountered is having to install a few *-compat packages.
> thanks.

Building on an older version of CentOS means using older compilers and
libraries.  Some applications require building with more current tools.

So you end up between a rock and a hard place.  You can try to build
on the older system for library compatibility, but then you have to
use development tools from newer versions.  Or you can build with the
newer tools, and you have compatibility issues running on the older system.



-- 
Michael Eager	 eager at eagercon.com
1960 Park Blvd., Palo Alto, CA 94306  650-325-8077