ag123
Posts: 122
Joined: Sun Dec 18, 2016 7:54 am

Mixing 64 bits shared libraries on Raspbian buster

Thu May 28, 2020 10:49 am

As i'm running the 64 bit kernel in Raspbian Buster i.e.
/boot/config.txt

Code: Select all

[all]
arm_64bit=1
i used the sysroot shared library distribution from linaro
https://www.linaro.org/downloads/

created a directory

Code: Select all

/usr/lib64
and placed the libc.so in there

Code: Select all

libc-2.25.so  libc.so.6  libgcc_s.so.1
and placed the dynamic linker ld.so in /lib

Code: Select all

/lib/ld-linux-aarch64.so.1
created an entry for /etc/ld.so.conf

Code: Select all

/usr/lib64
ran sudo ldconfig

then i compiled a little c code aarch64 binary and ran it on the Pi4. apparently it seemed to work.
is this an appropriate way to setup both 64 bit shared libraries and 32 bits shared libraries in Raspbian Buster?
is there a better way to do it?

apparently when the 64 bit test binary ran, it gives a message

Code: Select all

ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (wrong ELF class: ELFCLASS32): ignored.
but otherwise the program ran ok, producing a 'hello world'.

satadru
Posts: 44
Joined: Thu Apr 18, 2013 5:18 pm

Re: Mixing 64 bits shared libraries on Raspbian buster

Thu May 28, 2020 3:23 pm

Perhaps now is the time to try the Raspberry Pi OS (64 bit) beta test version announced today?

viewtopic.php?f=117&t=275370

Return to “Advanced users”