I tried to compile an openCV application for RapsberryPi 2 with Lazarus-IDE(Pascal compiler) on Ubuntu x64 PC.
But, the compiler shows error :
ERROR IMAGE
Pre-compiled openCV library version : 2.4.8
Pre-compiled glibc library version : 2.19
Any idea?
The most likely explanation is that you are trying to link against a glibc version older than 2.15, while the library was compiled against glibc 2.15 or later.
If your target does not support glibc 2.15, you will have to recompile the library instead.
Related
I am trying to build a C library, that is internally implemented with C++ 17, that I can compile as a shared object on Ubuntu 20.04 and use in an executable that runs on Debian 10.x. The project is dependent on libsodium.
I got this to work by changing my project to build with g++7 (instead of g++9) and forced symbol versioning to use old glibc functions. For example, I forced the pow() function to pow#GLIBC_2.2.5. Without using symbol versioning, Debian 10.7 reports that there is a glibc 2.29 symbol that is required but missing and that my shared object is at fault. This error was unexpected because I was under the impression that g++7 comes with glibc 2.27 according to the libc6 package that comes with g++ (https://packages.ubuntu.com/focal/g++-7).
I have compiled the python3.6 program on CentOS 6.8 using pyinstaller and tested on a newer version of Linux. It's working as expected. CentOS 6.8 has installed GLIBC 2.12
pyinstaller --onefile --clean --hidden-import sqlite3 --hidden-import pycryptodome my_python.py
However, I'm getting the follwing error when execute the compiled program on Redhat 5.8 as it has installed the GLIBC 2.5
[24522] Error loading Python lib '/tmp/_MEIl16Rvq/libpython3.6m.so.1.0': dlopen: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by /tmp/_MEIl16Rvq/libpython3.6m.so.1.0)
Can you please help me how to compile the python3.6 program on CentOS 6 for Redhat 5.8?
P.S: I cannot update the GLIBC as I'm going to distribute the same program to the many Linux servers.
Answer to this question is listed in pyinstaller's FAQ as first one in GNU/Linux section. Here it is, a bit cut down version with my emphasis.
The executable that PyInstaller builds is not fully static, in that it still depends on the system libc. Under Linux, the ABI of GLIBC is [...] not forward compatible. [...] The supplied binary bootloader should work with older GLIBC. However, the libpython.so and other dynamic libraries still depends on the newer GLIBC. The solution is to compile the Python interpreter with its modules (and also probably bootloader) on the oldest system you have around, so that it gets linked with the oldest version of GLIBC.
I'm novice in cross-compiling and just started to cross-compile packages on my linux machine (amd64) for host (NAS) with ARMv5 (linux kernel 2.6.31.8). I installed crosstool-ng and with it created toolchain for compilation for ARM. According to some tutorials online I succeeded to compile x264 package. But now when I try to run it, I was given the following error message
./x264: /lib/libm.so.6: version 'GLIBC_2.15' not found (required by ./x264)
Ok now I see that I need libm library but what it is and how to compile x264 with it?
From the error message: the version of x264 you built requires version of glibc 2.15. The Glibc is built as part of your cross compilation toolchain (through crosstool-ng).
You need to build a new toolchain with the same version of glibc found on your NAS root filesystem (or compatible).
(edited after #NotLikeThat comment)
I am trying to build Rust for RHEL5 (Linux v2.6.18) with GNU C Library stable release version 2.5.
The pre-built bootstrap version of Rust, that is downloaded automatically when running the Rust make, is incompatible with glibc 2.5 -- I get the following error.
x86_64-unknown-linux-gnu/stage0/bin/rustc: /lib64/libc.so.6: version GLIBC_2.7' not found (required by x86_64-unknown-linux-gnu/stage0/bin/rustc)
x86_64-unknown-linux-gnu/stage0/bin/rustc: /lib64/libc.so.6: versionGLIBC_2.6' not found (required by x86_64-unknown-linux-gnu/stage0/bin/rustc)
Unfortunately, upgrading glibc is not an option for the target OS
Is there any way for me to build Rust on my platform?
You’ll need to build a newer copy of gcc and glibc first. Don’t worry, you can use it only for Rust stuff (stick it in a different directory and add that directory to LD_LIBRARY_PATH whenever running Rust things), but it does need some newer stuff.
Where is the canonical place on Linux to install a library, that was not compiled with the standard system compiler? /us/local/lib or /usr/local/mylib-1.0-gcc.version? Some place else? The same library compiled with the system gcc may be installed and used, too.
Background:
I am on CentOS 6.5. The standard compiler is gcc 4.4. I have a closed source program, that is compiled on CentOS 6.0 with gcc 4.1.2 (strange enough, gcc is also 4.4 there). I want to build a plugin for the program that uses a (open source) library. So I compile gcc 4.1.2 and the library with gcc 4.1.2. Where does the library go?