When I run time/date config setup programme,the qnx says “can not find lib libphexlib.so.2”,but the file exists in the “/usr/lib”,why?I use “pidin -p mem” to find the needed lib for “phlocale” and find all libs exist,why it says “can’t find lib”?
Actually, it is most likly that it is a library libphexlib.so.2 is looking for. Try running your application with the DL_DEBUG environment variable set to 1. ie:
export DL_DEBUG=1
app
This will cause the linker/loader to print out lots of usefull information as it try to load the program.
the output is “attemp load of libphexlib.so.2,could not find library libphexlib.so.2”
Then your LD_LIBRARY_PATH does not include the location of that library.
I have include the path in LD_LIBRARY_PATH
this is my build file:
[virtual=x86,bios +compress] boot = {
startup-bios -s 64k -Npmu
PATH=/proc/boot:/bin:/photon/bin
LD_LIBRARY_PATH=/proc/boot:/dev/shmem:/lib:/usr/lib procnto
}
[+script] startup = {
PATH=/proc/boot:/bin:/usr/photon/bin
PHOTON_PATH=/usr/photon
PHOTON2_PATH=/usr/photon
LD_LIBRARY_PATH=/proc/boot:/usr/lib:/lib:/usr/photon/bin:/dev/shmem:/usr/photon/dll:/lib/dll
HOME=/root
SHELL=esh
PHWM=pwm
TMPDIR=/tmp
PHFONT=/usr/photon/font_repository
TERM=qansi
SYSNAME=nto
HOSTNAME=pmu
#display_msg “Step 1: Start the console and persud console…”
devc-con -n 10 &
devc-pty -n 32 &
reopen /dev/con1
#display_msg “Done”
#display_msg “Step 2: Scan the PCI device…”
seedres
pci-bios &
waitfor /dev/pci 30
#display_msg “Done”
#display_msg “Step 3: Start pipe,mqueue and slogger services…”
pipe &
mqueue &
slogger -l /var/log/slog
#display_msg “Done”
display_msg "Step4: Scan the CF card and mount it as / "
devb-eide blk automount=hd0t79:/:qnx4 cd dos exec=all cam quiet eide,ioport=ox1f0,irq=14 &
waitfor /dev/hd0t79 30
display_msg “Done”
HOME=/root
/bin/myph
[+session] esh &
}
/var/log/slog = {
}
/dev/log={
}
ldqnx.so.2 must be in the fixed place of /usr/lib
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
[type=link] /usr/lib/ldqnx.so.1=/proc/boot/libc.so
the following link is needed by the devb-eide
[type=link] /proc/boot/libcam.so.2=/proc/boot/libcam.so
shared library need by font server
[type=link] /usr/lib/libph.so.2=/usr/lib/libph.so
[type=link] /usr/lib/libph.so.1=/usr/lib/libph.so
shared library needed by the io-graphics
[type=link] /usr/lib/libphrender.so.2=/usr/lib/libphrender.so
[type=link] /usr/lib/libphrender.so.1=/usr/lib/libphrender.so
[type=link] /usr/lib/libdisputil.so.2=/usr/lib/libdisputil.so
[type=link] /usr/lib/libffb.so.2=/usr/lib/libffb.so
shared library needed by some photon application
[type=link] /usr/lib/libAp.so.2=/usr/lib/libAp.so
[type=link] /usr/lib/libAp.so.1=/usr/lib/libAp.so
[type=link] /usr/lib/libm.so.2=/usr/lib/libm.so
[type=link] /usr/lib/libphexlib.so.2=/usr/lib/libphexlib.so
[type=link] /usr/lib/libphimg.so.2=/usr/lib/libphimg.so
[type=link] /usr/lib/libz.so.2=/usr/lib/libz.so
[type=link] /usr/lib/libjpeg.so.2=/usr/lib/libjpeg.so
[type=link] /usr/lib/libexpat.so.2=/usr/lib/libexpat.so
libc.so
#Library needed by the harddisk access
libcam.so
io-blk.so
cam-disk.so
fs-qnx4.so
[data=c]
[perms=+r,+x]
seedres
pci-bios
devb-eide
slogger
devc-con
devc-pty
esh
shutdown
mount
ls
pipe
mqueue
pidin
#/usr =/fs/hd1-qnx4/usr
#/bin=/fs/hd1-qnx4/bin
#/root=/fs/hd1-qnx4/root
#/lib=/fs/hd1-qnx4/lib
#/etc=/fs/hd1-qnx4/etc
Your image doesn’t include the library though, it just sets up a symlink to a non-existant file.
Can you tell me how to include the library?
You need to include it like libc.so
libphexlib.so
libph.so
…
You will need to do that for all the libs you want to include. The symlinks are just that, symlinks.
I include the libphexlib.so in my build file as you said,but the system is dead when it reboots.
Dunno, you have a pretty messy build file there. You might want to start again, making it a little simpler. How big is the boot image? Some x86 systems cannot boot large boot images.
Could you give a compact boot image?
You can take a look in x86/boot/build for some examples.
I think the problem has no relation with image,because I can run “phlip”(netmanager) in the system,I use “pidin -p pid mem” to search the lib and found all libs for “phlip” is same as “phlocale”.