Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - lld: FATAL: (7 Items)
   
lld: FATAL  
I'm using QNX 7.

I've rebuilt our PCI driver and when I tried to load it says it can't find the pcilib.so.2.0 and it's in the system. Any
 hint on how to move forward, any help is appreciated.

Thanks.
Hasan

# /tmp/devc-serCtiPciUart
ldd:FATAL: Could not load library libpci.so.2.0
# ls -l /proc/boot/libpci*
lrwxrwxrwx   1 root      root             13 Jun 19  2017 /proc/boot/libpci.so -> libpci.so.2.0
-rwxrwxrwx   1 root      root          94295 Jun 19  2017 /proc/boot/libpci.so.2.0
# use -i /proc/boot/libpci.so.2.0
QNX_BUILDID=(GNU)d6e3d34b1d0f7e65c178042ce4a49299
NAME=libpci.so
DESCRIPTION=PCI Server Library
DATE=2017/01/19-14:17:30-EST
STATE=stable
HOST=sdp700-node1
USER=builder
VERSION=7.0.0
TAGID=700-SDP_3_build-x86_64-8
Re: lld: FATAL  
Since this is a dynamic library, the program expects to find it in the same place as it was when compiled.   So it 
probably lives in /lib or /usr/lib or on the outside /usr/local/lib.

You want to create a link in the build file that mimics this eg.

libx.so -> /usr/lib/libx.so

Re: lld: FATAL  
It looks like a Makefile issue, I find in the map file that the pcilib used there as 32 bit but our actual target is 64 
bit.

LOAD H:/QNX700/target/qnx7/x86/lib/libpci.so
OUTPUT(C:/Users/super7/ide-7.0-workspace/CTI-QNX-700/src/ctiser/x86/o/devc-serCtiPciUart elf32-i386)

It will need to point to x86_64. We used the same make file that we used for QNX 6.6. I think if I get the makefile for 
64 bit then the issue will be solved.

We've been using sample serial driver for our serial cards for ~30 years. I don't see the sample serial driver  for QNX 
7, where do I get it? 

Thanks,
Hasan
Re: lld: FATAL  
> You want to create a link in the build file that mimics this eg. libx.so -> /usr/lib/libx.so

How do I do this?

I've tried this in the build file 
[type=link] libpci.so.2.0=/proc/boot/libpci.so.2.0

Then it does not load pci server, saying that it can't find libpci.so.2.0.


#---------------------------------------------------------------------------------------------------
# libraries for new PCI driver
#---------------------------------------------------------------------------------------------------
libpci.so
[type=link] libpci.so.2.0=/proc/boot/libpci.so.2.0
[-followlink search=${QNX_TARGET}/${PROCESSOR}] /lib/dll/pci/=lib/dll/pci
Re: lld: FATAL  
> 
> > You want to create a link in the build file that mimics this eg. libx.so -> 
> /usr/lib/libx.so
> 
> How do I do this?
> 
> I've tried this in the build file 
> [type=link] libpci.so.2.0=/proc/boot/libpci.so.2.0
> 

Shouldn't the link line be as follows to create a link from /lib/libpci... to /proc/boot/libpci.... :

[type=link] /lib/libpci.so.2.0=libpci.so.2.0

giving you the following sequence in your build file:

#---------------------------------------------------------------------------------------------------
# libraries for new PCI driver
#---------------------------------------------------------------------------------------------------
libpci.so
[type=link] /lib/libpci.so.2.0=libpci.so.2.0
[-followlink search=${QNX_TARGET}/${PROCESSOR}] /lib/dll/pci/=lib/dll/pci


Re: lld: FATAL  
> It looks like a Makefile issue, I find in the map file that the pcilib used 
> there as 32 bit but our actual target is 64 bit.
> 

How did you add the x86_64 to your project? Did you use the 'addvariant' tool?

Re: lld: FATAL  
That's it, I needed to use addvariant tool for 64 bit binary, this is the reason for ldd error. Thanks a lot.