www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - dmd 2.098.0: version `GLIBC_2.14' not found (required by

reply kdevel <kdevel vogtner.de> writes:
In previous versions I used the linux32/dmd with the -m64 switch 
in order to generate 64-bit code. But this does not work anymore:

    $ linux/bin32/dmd
linux/bin32/dmd: /lib/libc.so.6: version `GLIBC_2.28' not found 
(required by linux/bin32/dmd)

The reason for presence of these symbol versions are memcpy and 
fcntl:

    $ nm --with-symbol-versions -D linux/bin64/dmd|grep GLIBC_2.14
                     U memcpy GLIBC_2.14

    $ nm --with-symbol-versions -D linux/bin32/dmd|grep GLIBC_2.28
             U fcntl GLIBC_2.28

Is it possible to build the compiler and the tools with more 
"backward compatible" glibc version numers like 
memcpy GLIBC_2.2.5 and fcntl GLIBC_2.2.5? IIRC this is 
accomplished by using

    asm (".symver memcpy, memcpy GLIBC_2.2.5");
    asm (".symver fcntl, fcntl GLIBC_2.2.5");

in the source code.
Nov 08 2021
parent reply jfondren <julian.fondren gmail.com> writes:
On Monday, 8 November 2021 at 23:55:02 UTC, kdevel wrote:
 In previous versions I used the linux32/dmd with the -m64 
 switch in order to generate 64-bit code. But this does not work 
 anymore:

    $ linux/bin32/dmd
 linux/bin32/dmd: /lib/libc.so.6: version `GLIBC_2.28' not found 
 (required by linux/bin32/dmd)
dmd version v2.089.0 should work for you, and you can use that to build a newer version of dmd. You can get it from http://downloads.dlang.org/releases/2019/ You can use this on an older Linux system to generate more compatible binaries, or you can try building static binaries. I've got a short guide for LDC on Alpine Linux in a docker container at https://d.minimaltype.com/index.cgi/wiki?name=statically-linked+binaries
 Is it possible to build the compiler and the tools with more 
 "backward compatible" glibc version numers like 
 memcpy GLIBC_2.2.5 and fcntl GLIBC_2.2.5? IIRC this is 
 accomplished by using

    asm (".symver memcpy, memcpy GLIBC_2.2.5");
    asm (".symver fcntl, fcntl GLIBC_2.2.5");

 in the source code.
... I'd hope that the version numbers aren't so meaningless that dmd could get away with just lying about them and not have horrible problems. I'd prefer that dmd work out of the box on old Linux systems too, but you're probably past EOL in other big ways as well, there. A stock CentOS6 system comes with a root privilege escalation vuln in sudoedit
Nov 08 2021
parent kdevel <kdevel vogtner.de> writes:
On Tuesday, 9 November 2021 at 00:22:35 UTC, jfondren wrote:
 On Monday, 8 November 2021 at 23:55:02 UTC, kdevel wrote:
 In previous versions I used the linux32/dmd with the -m64 
 switch in order to generate 64-bit code. But this does not 
 work anymore:

    $ linux/bin32/dmd
 linux/bin32/dmd: /lib/libc.so.6: version `GLIBC_2.28' not 
 found (required by linux/bin32/dmd)
dmd version v2.089.0 should work for you,
2.098.0 in 64 Bit works for me as well. I used patchelf to change the dynamic loader and the rpath to use a local build of a more modern glibc. [...]
 Is it possible to build the compiler and the tools with more 
 "backward compatible" glibc version numers like 
 memcpy GLIBC_2.2.5 and fcntl GLIBC_2.2.5? IIRC this is 
 accomplished by using

    asm (".symver memcpy, memcpy GLIBC_2.2.5");
    asm (".symver fcntl, fcntl GLIBC_2.2.5");

 in the source code.
... I'd hope that the version numbers aren't so meaningless that dmd could get away with just lying about them and not have horrible problems. I'd prefer that dmd work out of the box on old Linux systems too, but you're probably past EOL in other big ways as well, there. A stock CentOS6 system comes with a root privilege escalation vuln in sudoedit
I am the only user on my machine and know the root password. In environments with multiple non-root-users setuid-programs like sudo are usually not executable by untrusted users. If you take a look at SUSE's products [1] you will find that SUSE Linux Enterprise Server 11 long term support ends as late as on 31 Mar 2022. Its glibc is based on GNU glibc 2.11.3. [1] https://www.suse.com/de-de/lifecycle/
Nov 09 2021