Glibc version ‘glibc_2.17’ not found
This is the 13th day of my participation in the August More Text Challenge.More challenges in August
Version ‘glibc_2.17’ not found ‘version’ glibc_2.17 ‘not found’ version ‘glibc_2.17’ not found ‘ The bottom line is that the gliBC environment on which the application depends is not supported on the target platform. However, previous programs compiled using the same cross-compiler have been fine. Looking at the linux-serial-test source code, there is no place to declare the use of the glibC-2.17 environment. The arm-none-linux-gnueabi-nm tool can be used to view the symbol information contained in linux-serial-test, and sure enough, the linux-serial-test tool can be used to view the symbol information contained in linux-serial-test. The function that depends on glibc-2.17 is found as follows:
Arm - none - Linux - gnueabi - nm Linux - serial - test | grep U clock_gettime @ @ 2.17 GLIBC_2. 17Copy the code
The clock_gettime function is dependent on the glibc_2.17 environment.
Link with -lrt (only for glibc versions before 2.17).
Copy the code
We can confirm that clock_gettime compilation requires the -lRT connection attribute for the clock_gettime function before glibc 2.17. Recall the previous linux-serial-test compilation:
arm-none-linux-gnueabi-gcc linux-serial_test.c -o linux-serial_test
Copy the code
Therefore, the applications generated by the above compilation method depend on the glibc_2.17 (and above) environment. Recompile as follows:
arm-none-linux-gnueabi-gcc linux-serial_test.c -o linux-serial_test -lrt
Copy the code
Run the arm-none-linux-gnueabi-nm command to check whether the linux-serial_test symbol dependency environment is no longer dependent on glibc_2.17.
Note: the solution I mentioned above only relies on similar problems I have encountered. However, the root cause of this problem is the mismatch between the GLIBC version in the running environment and the application environment. There are two solutions to this problem:
- Modify application compilation options or configurations to remove higher environment dependencies, similar to this workaround;
- Reconfigure the run environment’s GLIBC to fit the environment on which the application depends.