Unsolved Add library to cross compile RPi4
-
I downloaded from GitHub and built "realsense" library directly on raspberry pi 4. I noticed that the library has built itself in the "build" folder. I found in it, among others:
librealsense2.so
librealsense2.so.2.39
librealsense2.so.2.39.0Do I want to be able to use these libraries when cross compiling it is enough if I just move these three libraries to the "usr / lib" folder on raspberry and then run rsync on my ubuntu?
-
Hi,
The usual way is to call "make install" after a successful build.
-
@SGaist I already did "make install" and it didn't add librealsense2.so to the "usr / lib" path
-
When calling that you usually see in the terminal where it has been installed.
Since it's a custom library I would guess it went to /usr/local/lib
-
@SGaist You're right. I found these libraries in "/usr/local/lib". Now how do I move these libraries to my sysroot on ubuntu? When at the beginning of setting up the environment, folder sync I did:
rsync -avz pi@raspberrypi_ip:/lib sysroot rsync -avz pi@raspberrypi_ip:/usr/include sysroot/usr rsync -avz pi@raspberrypi_ip:/usr/lib sysroot/usr rsync -avz pi@raspberrypi_ip:/opt/vc sysroot/opt
but there is no "/usr/local/lib" path here. Is it enough if I make a new folder and sync it? e.g
rsync -avz pi@raspberrypi_ip:/usr/local/lib sysroot/local/lib
-
@Creatorczyk said in Add library to cross compile RPi4:
Is it enough if I make a new folder and sync it? e.g
Should be. Did you try?
But you should change to:rsync -avz pi@raspberrypi_ip:/usr/local/lib sysroot/usr/local
You also should sync /usr/local/include to be able to cross compile.