Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - $LD_LIBRARY_PATH not working: (5 Items)
   
$LD_LIBRARY_PATH not working  
Hi QNX,

       qnx sdp 6.6, qnx sdk for apps and media 1.1 release, qt-5.3.1-201503051558, qtcreator 3.5.1
       beaglebonedemo.ext.anm11.258.150325_2017

The beagleboneblack is booting from sdcard with MLO/u-boot.img/qnx-ifs/uEnv.txt extracted from beaglebonedemo.

I am testing qtcreator on TI beaglebone black with qnx 6.6. and got error message (in qtcreator on my PC):

ldd:FATAL: Could not load library libQt5Quick.so.5 

The library file is actually located at /base/usr/qt5-5.3/lib (on target device, i.e., beagleboneblack), and 

# echo $LD_LIBRARY_PATH
/base/usr/qt5-5.3/lib

However,

# ldd libQt5Quick.so.5
ldd ./libQt5Quick.so.5: No such file or directory

I tried 
# export $PATH=$PATH:/base/usr/qt5-5.3/lib

ldd still failed.

It appears that either $PATH or $LD_LIBRARY_PATH not functioning.

Please advise, thanks in advance

Mike



Re: $LD_LIBRARY_PATH not working  
Hi,

I can't comment on the LD_LIBRARY_PATH issue; one thing you definitely need to fix is your export syntax, which needs to
 read:

# export PATH=$PATH:/base/usr/qt5-5.3/lib

(note: no "$" left of "=")

regards
Michael

On Sun, 2019-01-06 at 03:09 -0500, mike scott wrote:

Hi QNX,

       qnx sdp 6.6, qnx sdk for apps and media 1.1 release, qt-5.3.1-201503051558, qtcreator 3.5.1
       beaglebonedemo.ext.anm11.258.150325_2017

The beagleboneblack is booting from sdcard with MLO/u-boot.img/qnx-ifs/uEnv.txt extracted from beaglebonedemo.

I am testing qtcreator on TI beaglebone black with qnx 6.6. and got error message (in qtcreator on my PC):

ldd:FATAL: Could not load library libQt5Quick.so.5

The library file is actually located at /base/usr/qt5-5.3/lib (on target device, i.e., beagleboneblack), and

# echo $LD_LIBRARY_PATH
/base/usr/qt5-5.3/lib

However,

# ldd libQt5Quick.so.5
ldd ./libQt5Quick.so.5: No such file or directory

I tried
# export $PATH=$PATH:/base/usr/qt5-5.3/lib

ldd still failed.

It appears that either $PATH or $LD_LIBRARY_PATH not functioning.

Please advise, thanks in advance

Mike







_______________________________________________

OSTech
http://community.qnx.com/sf/go/post119383
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com<mailto:ostech
-core_os-unsubscribe@community.qnx.com>;

Attachment: HTML sf-attachment-mime37351 1.94 KB
Re: $LD_LIBRARY_PATH not working  
Dear Michael Schuster,

you are absolutely right, should be export PATH=$PATH:xxxxx

After more tests, I realizes that LD_LIBRARY_PATH has no problem at all.

By default, ldd only seach ./ or the current directory. Therefore, ldd have to go with full path, for example (on BBB 
target device),

# echo $LD_LIBRARY_PATH
/proc/boot:/base/usr/anm/lib:/proc/boot:/base/usr/lib:/base/lib/dll:/base/lib:/base/lib/dll/font:/lib:/usr/lib:/lib/dll:
/opt/lib:/base/usr/photon/lib:/base/usr/qt5-5.3/lib:/base/usr/lib/torch-webkit

# ldd /base/usr/qt5-5.3/lib/libQt5Quick.so.5
/base/usr/qt5-5.3/lib/libQt5Quick.so.5:
	libQt5Quick.so.5 => /base/usr/qt5-5.3/lib/libQt5Quick.so.5.3.1 (0x78000000)
	libQt5Qml.so.5 => /base/usr/qt5-5.3/lib/libQt5Qml.so.5.3.1 (0x78400000)
	libQt5Network.so.5 => /base/usr/qt5-5.3/lib/libQt5Network.so.5.3.1 (0x78900000)
	libsocket.so.3 => /base/lib/libsocket.so.3 (0x783c0000)
	libQt5Gui.so.5 => /base/usr/qt5-5.3/lib/libQt5Gui.so.5.3.1 (0x78b00000)
	libQt5Core.so.5 => /base/usr/qt5-5.3/lib/libQt5Core.so.5.3.1 (0x79000000)
	libm.so.2 => /proc/boot/libm.so.2 (0x788a0000)
	libGLESv2.so.1 => /base/usr/lib/libGLESv2.so.1 (0x783e4000)
	libEGL.so.1 => /base/usr/lib/libEGL.so.1 (0x783ee000)
	libcpp.so.5 => /base/lib/libcpp.so.5 (0x78a60000)
	libz.so.2 => /base/usr/lib/libz.so.2 (0x788d0000)
	libpng14.so.0 => /base/usr/lib/libpng14.so.0 (0x788e2000)
	libslog2.so.1 => /base/lib/libslog2.so.1 (0x783f8000)
	libicui18n.so.49 => /base/usr/lib/libicui18n.so.49 (0x79500000)
	libicuuc.so.49 => /base/usr/lib/libicuuc.so.49 (0x79610000)
	libicudata.so.49 => /base/usr/lib/libicudata.so.49 (0x79700000)
	libpps.so.1 => /proc/boot/libpps.so.1 (0x78896000)
	libcpp-ne.so.5 => /base/lib/libcpp-ne.so.5 (0x78f90000)

it successfully identified other files from directories such as /base/lib/ and /proc/boot/ etc, which is defined in $
LD_LIBRARY_PATH.

It seems that qtcreator should tell  ldd where to find libQt5Quick.so.5, though $LD_LIBRARY_PATH also contains this 
directory of /base/usr/qt5-5.3/lib. I am working on that now.

Thanks for help

Mike
RE: $LD_LIBRARY_PATH not working  
You should use ldd with the absolute path of the program executable. 
e.g.
# ldd /bin/sh
/bin/sh:
        libc.so.3 => /usr/lib/ldqnx.so.2 (0xb0300000)

________________________________________
From: mike scott [community-noreply@qnx.com]
Sent: Sunday, January 06, 2019 09:09
To: ostech-core_os
Subject: $LD_LIBRARY_PATH not working

Hi QNX,

       qnx sdp 6.6, qnx sdk for apps and media 1.1 release, qt-5.3.1-201503051558, qtcreator 3.5.1
       beaglebonedemo.ext.anm11.258.150325_2017

The beagleboneblack is booting from sdcard with MLO/u-boot.img/qnx-ifs/uEnv.txt extracted from beaglebonedemo.

I am testing qtcreator on TI beaglebone black with qnx 6.6. and got error message (in qtcreator on my PC):

ldd:FATAL: Could not load library libQt5Quick.so.5

The library file is actually located at /base/usr/qt5-5.3/lib (on target device, i.e., beagleboneblack), and

# echo $LD_LIBRARY_PATH
/base/usr/qt5-5.3/lib

However,

# ldd libQt5Quick.so.5
ldd ./libQt5Quick.so.5: No such file or directory

I tried
# export $PATH=$PATH:/base/usr/qt5-5.3/lib

ldd still failed.

It appears that either $PATH or $LD_LIBRARY_PATH not functioning.

Please advise, thanks in advance

Mike







_______________________________________________

OSTech
http://community.qnx.com/sf/go/post119383
To cancel your subscription to this discussion, please e-mail ostech-core_os-unsubscribe@community.qnx.com
Re: RE: $LD_LIBRARY_PATH not working  
hi John Kearney 

you are right, I am trying to setup qtcreator now.

Thanks

Mike