Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 10-18-2019, 05:04 AM   #1
LQ Newbie
Registered: Sep 2018
Distribution: win65
Posts: 15

Rep: Reputation: Disabled
tricky compilation and run

I have obtained an NFC reader. Together with this reader I obtained an SDK, which basically has this directory layout:

PHP Code:
some .h files
to compile the first example I used this command:

PHP Code:


$g++ \
./bin/one \
./Libraries/Linux/One/include \
L/home/pi/SDK/Libraries/Linux/One \
  - \
But that did not succeed since the compiler stopped with this message:

PHP Code:
/usr/bin/ by ./Libraries/Linux/One/ found (try using -rpath or -rpath-link
Going further down on this, I noticed that »« is part of the openssl package, which is actually installed on that system, but in a newer version.

PHP Code:
ldconfig -grep -i libcrypto
.so.1.1 (libc6,hard-float) => /usr/lib/arm-linux-gnueabihf/ 
That led me here where somebody suggested to create a symlink like so:

PHP Code:
$cd /home/pi/SDK/Libraries/Linux/One/
$ln -/usr/lib/arm-linux-gnueabihf/

.so.1.0.0 -> /usr/lib/arm-linux-gnueabihf/ 
So, than, I digged deeper and deeper and finally cam up with this:

PHP Code:

export LIB=$(pwd)/Libraries/Linux/One

++ \
Examples/One/main.cpp \
o bin/thin \
I$LIB/include \
Wl,-rpath=$LIB  \
  - \
This way the compilation actually succeeded. But

PHP Code:
/thinerror while loading shared open shared object fileNo such file or directory 
So the library is missing at runtime.

Is there any way make the executable use the one I just created as symlink?
Old 10-18-2019, 04:42 PM   #2
Registered: Sep 2005
Distribution: debian, linux from scratch
Posts: 181

Rep: Reputation: 39
The thing it's that the runtime linker only looks in some predefined directories during program start.
You could test by setting LD_PRELOAD
And for doing this you need top be sure that the library versions are compatible, I guess that it's the case.
Also maybe your distro has a crypto-1.0.0 in a package.


compilation, executables, library

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Stealthy, tricky to remove rootkit targets Linux systems on ARM and x86 LXer Syndicated Linux News 0 09-08-2016 06:03 AM
[SOLVED] Graphical Compilation/ IDE Compilation monika.2dec Ubuntu 4 08-22-2012 07:53 PM
X11 auto login and disable users shell - tricky business drkstr Slackware 10 08-29-2006 02:54 PM
Networking:socket ip address and port??? Tricky situations!!! Igor007 Programming 14 11-20-2005 03:26 AM
Tricky alsa and kernel 2.6 problem. raid517 Linux - Hardware 1 10-01-2003 04:42 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration