Forum Replies Created
-
AuthorPosts
-
AntiBNIParticipant
YES!!!!WOHOOO
It was exactly what I said.
I will explain what I did because It might help some one in the internet.
When I tried the “readelf” command against the shared object “.so” file, It showed me that It was compiled for ARMv7 and since I was running Raspbian compiled for ARMv6, the ldd (<i>List Dynamic Dependencies) </i>will not find it, Even tho you have specified the correct LD_LIBRARY_PATH and it will tell you that the file could not be found for some odd reason.
So, After installing a full ARMv7 distro like ArchLinux I was able to successfully assign the “.so” library path to “LD_LIBRARY_PATH and run ldd against the binary and see that the ldd can now see and link the “.so” file as a dependency.
Thanks a lot for your time and knowledge Bazis, I really appreciate it!!
AntiBNIParticipantPedley,
for what ARM version is your shared object compiled for? I just found out that my Library is compiled for ARMV7 and since I’m running Raspbian which is compiled for ARMv6, That meant I had an ARMv6 distro with an ARMV7 Kernel. That might be one of the problems I am getting.
I’m right now installing Arch Linux, which is full ARMV7 and see if that fixes my issue.
I have read hundreds of articles and looks like a simple LD_LIBRARY_PATH assignment with the path of the lib will make the linker first look at that custom path before any other default path, so that makes me think something is off somewhere.
Is what I just said a valid statement Bazis??
AntiBNIParticipantI also, tried a file command on the libraries and they all output “ELF 32-bit LSB shared object,ARM,version 1 (SYSV),dynamically linked, stripped” hope that is of any help.
AntiBNIParticipantBazis,
Sorry for the delay on the answer.
Here is the Makefile and dump form the debuger an application:
Makefile:
#Generated by VisualGDB (http://visualgdb.com)
#DO NOT EDIT THIS FILE MANUALLY UNLESS YOU ABSOLUTELY NEED TO
#USE VISUALGDB PROJECT PROPERTIES DIALOG INSTEAD
BINARYDIR := Debug
#Toolchain
CC := gcc
CXX := g++
LD := $(CXX)
AR := ar
OBJCOPY := objcopy
#Additional flags
PREPROCESSOR_MACROS := DEBUG
INCLUDE_DIRS := /home/pi/BioFinger/inc/arm
LIBRARY_DIRS := /home/pi/BioFinger/lib/arm
LIBRARY_NAMES := fbiocpsb fbio4cap fbio4com fbio4bio fbio4smat
ADDITIONAL_LINKER_INPUTS :=
MACOS_FRAMEWORKS :=
LINUX_PACKAGES :=
CFLAGS := -ggdb -ffunction-sections -O2 -w -DUNIX -std=c99 -fsigned-char
CXXFLAGS := -ggdb -ffunction-sections -O2 -w -DUNIX -std=c99 -fsigned-char
ASFLAGS :=
LDFLAGS := -Wl,-gc-sections
COMMONFLAGS :=
LINKER_SCRIPT :=
START_GROUP := -Wl,--start-group
END_GROUP := -Wl,--end-group
#Additional options detected from testing the toolchain
IS_LINUX_PROJECT := 1
===========================Debug Log =================================
1>—— Build started: Project: BioFingerServer, Configuration: Debug Win32 ——
1>VisualGDB : warning : Found a source file with spaces in the path: “C:\Users\Dev\Documents\Visual Studio 2015\Projects\BioFingerServer\BioFingerServer\BioFingerServer.cpp”. If the build fails, please rename/move it.
1> VisualGDB: Sending 14 updated source files to build machine…
1> VisualGDB: Run “make CONFIG=Debug” in directory “/tmp/VisualGDB/c/Users/Dev/Documents/Visual Studio 2015/Projects/BioFingerServer/BioFingerServer” on pi@192.168.2.105 (SSH)
1> g++ -ggdb -ffunction-sections -O2 -w -DUNIX -std=c99 -fsigned-char -L/home/pi/BioFinger/lib/arm -I/home/pi/BioFinger/inc/arm -DDEBUG -c BioFingerServer.cpp -o Debug/BioFingerServer.o -MD -MF Debug/BioFingerServer.dep
1> g++ -ggdb -ffunction-sections -O2 -w -DUNIX -std=c99 -fsigned-char -L/home/pi/BioFinger/lib/arm -I/home/pi/BioFinger/inc/arm -DDEBUG -c FingerWrapper.cpp -o Debug/FingerWrapper.o -MD -MF Debug/FingerWrapper.dep
1> g++ -o Debug/BioFingerServer -Wl,-gc-sections -L/home/pi/BioFinger/lib/arm -Wl,–start-group Debug/BioFingerServer.o Debug/FingerWrapper.o -lfbiocpsb -lfbio4cap -lfbio4com -lfbio4bio -lfbio4smat -Wl,–rpath=’$ORIGIN’ -Wl,–end-group
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ================and application output======
/tmp/VisualGDB/c/Users/Dev/Documents/Visual Studio 2015/Projects/FingerScanServer/FingerScanServer/Debug/FingerScanServer: error while loading shared libraries: libfbiocpsb.so: cannot open shared object file: No such file or directory
what I did is re-image the Pi and tried compiling without messing with the “LD_LIBRARY_PATH” variable in linux but still doesn’t work.
The full LD_LIBRARY_PATH I’m trying to use is “/home/pi/BioFinger/lib/arm”
Let me know if you need more info and Thanks, your help is hugely appreciated!
AntiBNIParticipantI didn’t know about ldd command so thanks for that, It’s very helpful.
I did run it manually and tried the ldd command but still.. It will show the normal linux libraries like libgcc_s.so.1 and such but all my 5 libraries from the SDK say ‘SDKLibraryName.so => not found’
I wonder why it doesn’t find the lib when executing while It finds it compiling.
- This reply was modified 9 years, 2 months ago by AntiBNI.
AntiBNIParticipantI forgot to mention I am using Raspberry Pi 2 as the build system
-
AuthorPosts