From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!matrix.darkstorm.co.uk!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Tero Koskinen Newsgroups: comp.lang.ada Subject: Re: GLIBC_2.14 memcpy Date: Tue, 22 Apr 2014 19:54:36 +0300 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: 87-95-72-87.bb.dnainternet.fi Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: loke.gir.dk 1398185682 29024 87.95.72.87 (22 Apr 2014 16:54:42 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 22 Apr 2014 16:54:42 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:19496 Date: 2014-04-22T19:54:36+03:00 List-Id: 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