comp.lang.ada
 help / color / mirror / Atom feed
From: Tero Koskinen <tero.koskinen@iki.fi>
Subject: Re: GLIBC_2.14  memcpy
Date: Tue, 22 Apr 2014 19:54:36 +0300
Date: 2014-04-22T19:54:36+03:00	[thread overview]
Message-ID: <lj66sh$sb0$1@loke.gir.dk> (raw)
In-Reply-To: <d740404d-05f1-4b4b-828e-f59923e26304@googlegroups.com>

22.4.2014 16:28, Ian Douglas wrote:
> Hi all
>
> So I write my first hello world program, and it runs fine. Upload to
> the server, but it does not run there.
>
> ./Hello1: /lib64/libc.so.6: version `GLIBC_2.14' not found (required
> by ./Hello1)
>
> Dev box is Gentoo linux, server is CentOS 6.2

This error message tells that the program is compiled against different
glibc version. The correct solution is to compile the program using
same glibc version in both environments (dev box / server).

For example, you can setup virtual CentOS 6.2 build machine for
compilation purposes only and then deploy the binary from there to your
server.


> Some analysis shows the problem to be memcpy wanting GLIBC_2.14
> while everything else is happy with GLIBC_2.25.
>
> I  can't find anything relevant in this newsgroup (surprising!), or
> on AdaCore's site (program was built with GPS), so I was wondering
> if anyone has a workaround ... the C people add a line to force the
> compiler to use a more recent version of memcpy, as per
>
> __asm__(".symver memcpy,memcpy@GLIBC_2.2.5");
>
> While I am horrified at the necessity of doing something like that
> (especially for a simple Hello World), how would I do this in Ada /
> Gnat?

You should not try to use force and make your binary application to use
different version of the glibc.

It is likely that the binary interface of the glibc has changed between
two versions and the program compiled against one version behaves
differently if used with another version. Like imagine, if the order
of some function arguments have changed and your program does Copy (Src,
Dest) instead of Copy (Dest, Src). (Probably not, but you get the idea.)

> Thanks, Ian
>

Yours,
  Tero

  reply	other threads:[~2014-04-22 16:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22 13:28 GLIBC_2.14 memcpy Ian Douglas
2014-04-22 16:54 ` Tero Koskinen [this message]
2014-04-22 19:41   ` Ian Douglas
2014-04-22 21:58     ` Jeffrey Carter
2014-04-23  7:47 ` Stephen Leake
2014-04-23 11:11   ` G.B.
2014-04-23 18:30   ` Ian Douglas
2014-04-23  7:53 ` anon
2014-04-23 18:37   ` Ian Douglas
2014-04-24  9:56     ` anon
2014-04-26 20:10       ` Ian Douglas
2014-04-28 12:23         ` anon
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox