I am trying to search for
libc so that I can pass the
malloc function to a library.
ERROR: could not load library "libc"
/usr/lib/x86_64-linux-gnu/libc.so: invalid ELF header
 #dlopen#3(::Bool, ::Function, ::String, ::UInt32) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Libdl/src/Libdl.jl:109
 dlopen at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/Libdl/src/Libdl.jl:109 [inlined] (repeats 2 times)
 top-level scope at none:0
dllist gives me a different libc is loaded.
/lib/x86_64-linux-gnu/libc.so.6 not be loaded by
dlopen in the first place?
Instead of “libc” you should use “libc.so.6” then it should work.
Will check that. But that may be a bit platform specific.
works. But I am not fully convinced if this is the right approach. Is the
libc6 kind of standard on all Unix platforms Julia supports? In that case it’s fine.
I would assume
libc6 is kind of default. Libc 2-5 were released in 90s.
The GNU C Library, commonly known as glibc, is the GNU Project's implementation of the C standard library. Despite its name, it now also directly supports C++ (and, indirectly, other programming languages). It was started in the early 1990s by the Free Software Foundation (FSF) for their GNU operating system.
Released under the GNU Lesser General Public License, glibc is free software. The GNU C Library project provides the core libraries for the GNU system and GNU/Linux systems, as well as ma...
On my laptop with Lubuntu 16.04 libc.so.6 is a link to libc-2.23.so.
libc as POSIX standard library version and there glibc which is the GNU libc version. The libc-2.23.so is the glibc version. We cannot rely on that one much as that may vary from system to system.
glibc-2.x is all
sambit@ubutubu:/lib/x86_64-linux-gnu$ ls -l *libc*
-rwxr-xr-x 1 root root 2030544 Apr 17 2018 libc-2.27.so
lrwxrwxrwx 1 root root 12 Apr 17 2018 libc.so.6 -> libc-2.27.so
As far as I know, a new version of libc only changes the link from libc.so.6 to the new version. Or you can create your own local link to the latest version.