Linux running on ARDrone is missing /lib/libc.so - linux

I wanted to run an OpenCV project on ARDrone (which is powered by arm7l).
So I cross compiled OpenCV for arm processor, moved the .so files to the drone and updated the LD_LIBRARY_PATH.
Now running the cross compiled OpenCV project throws the following error:
/lib/libc.so.6: version `GLIBC_2.15' not found (required by /data/video/opencvlib/libopencv_highgui.so.2.4)
Where do I get this libc.so

As #Notlikethat suggested I tried copying my cros-toolchain's shared libraries to ARM, it solved the above issue but caused other problems.
For a more permanent solution I followed #Chris 's suggestions and recompiled opencv with board's cross compiler.

Related

Cmake libssh.so.4: version LIBSSH_4_8_1 not found

I've been trying to build libyang on Ubuntu 22.04, and I keep running into this issue when running cmake:
cmake: usr/local/lib/libssh.so.4: version `LIBSSH_4_8_1' not found (required by /lib/x86_64-linux-gnu/libcurl.so.4)
I couldn't find anything on this anywhere. I have libssh-dev 0.9.6-2build1 installed and cmake version 3.22.1-1ubuntu1.
The error comes up when running cmake from anywhere, so I guess it's related to cmake itself?
Edit: For extra context, I've been trying to set up Netopeer2 using this guide: http://www.seguesoft.com/index.php/netconfc/free-trial-netconfc/2-uncategorised/1-setup-netopeer2

Cross-compiling Rust project fails due to missing libraries

I'm trying to cross compile a Rust project from x86-64 to armv7 (Raspberry Pi 3B+). That project uses the cxx for some of its functionality.
I set up the toolchain, installed the armv7-unknown-linux-gnueabihf target with rustup, and after some trial and error, I copied the required header files to /usr/arm-none-linux-gnueabihf/include. I also copied the /usr/lib/arm-linux-gnueabihf directory from a live Raspbian to /usr/arm-none-linux-gnueabihf/lib.
Then I executed cargo build --target armv7-unknown-linux-gnueabihf. That gives me the following error: https://pastebin.com/2LVZnQMQ.
I then made sure that libc.so.6 is in /usr/arm-none-linux-gnueabihf/lib and libc_nonshared.a is in /usr/arm-linux-gnueabihf/. That did not solve the issue.
I am lost as to what more the linker wants. What else do I need to copy to successfully compare the binary?

cross-compiling x264 for ARM

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)

Input/output error using Android ndk-build

Using Android NDK R10E, I am trying to build a shared library for all supported ABI's and I am getting the following error for some but not all ABI's:
[armeabi] SharedLibrary : libMyLib.so /home/user/android-ndk-r10e/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld:
fatal error: /home/user/source/MyLib/obj/local/armeabi/libMyLib.so: Input/output error
The project successfully builds for arm64-v8a, mips and mips64 but fails with the above error for armeabi, armeabi-v7a, x86 and x86_64.
I have a static library project and another shared library project and they both build successfully for all 7 ABI's.
If I compare the contents of obj/local/ for an ABI that builds and one that does not, they both contain all the same files except for libMyLib.so.
The difference between those two sets of ABIs is that the failing ones link using ld.gold and the working ones use ld.bfd.
Two things to try:
Use the 4.9 toolchain. It hopefully has the bug fix.
If that doesn't work, you can add -fuse-ld=bfd to your ldflags to use bfd even on the architectures that default to gold.
Same issue happened to me in r15c.
The fix was to copy
android-ndk-r15c/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/arm-linux-androideabi/bin/ld.bfd over ld.
I had to copy it because I could not easily find a way to specify this flag to CMake to use it while detecting the compiler features.

Can't install Vision Workbench

I am trying to install the Vision Workbench on my computer, following the instructions from this homepage: http://lunokhod.org/?p=13. I have installed all dependencies but I have libboost1.54-all-dev instead since I am using Mint 17 (Ubuntu 14.4).
After that I have created the config.options file I do ./autogen and ./configure.
However, I get the following in the logfile:
configure:20861: /usr/include/boost is missing these required libraries: BOOST_PROGRAM_OPTIONS BOOST_FILESYSTEM BOOST_THREAD
Checking for a boost in /usr/include/boost-*
Checking for a boost in /usr/local/cuda/include
Checking for a boost in /usr/local/cuda/include/boost-*
configure:20875: checking for package BOOST
HAVE_PKG_BOOST=no
However, in /usr/include/boost/ I have booth program_options, filesystem and thread.
The .so files are under /usr/lib/x86_64-linux-gnu/ for opencv, boost and flann, but somehow it can only find flann.
Does anyone have an idea about where the error might be?
EDIT: In the log-file I saw that the program looked for cxcore when it searched for opencv, but in the new version it is called opencv_core so I did a symbolic link from cxcore to opencv_core and then ./configure finds opencv. However, boost is still a problem and is necessary to build the program.
EDIT2:
I have now downloaded an earlier version of boost (1.42), and almost all boost programs are found except BOOST_THREAD. When I install the boost library I get the following messages:
error: #error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS"
/ Erik
try running
./configure --with-boost="path/to/boost"
if you have more than one version of boost installed, you may need to also set environment variables
HAVE_PKG_BOOST=yes
PKG_BOOST_CPPFLAGS=/path/to/boost
PKG_BOOST_LDFLAGS=/path/to/boost

Resources