Hello Jerry,
Sorry to boder you with my pacakger questions…
I made a very simple shared object library with one function inside:
| #include <stdio.h>
| void printHello(void)
| {
| printf(“Hello world!\n”);
| }
To compile my shared object, I used the following code seen in the help
software in QNX OS
qcc -Vgcc_ntox86 -shared -c -libhelloworld.c
qcc -Vgcc_ntox86 -shared -o libhelloworldso -libhelloworld.o
When I do a “objdump -x libhelloworld.so | grep NEEDED”
I got this dependency:
NEEDED libc.so.2
I can build my pacakge with the packager command
But when I use the pkg-installer -u libExample.qpr
I have this dependecy error:
| “Library Example 1.0” requires that you install “A package with a
ContainsLibrary of libhellowordl.so, and a
| processor of X86” for the following reason:
|
| At least one program in this package requires that an external library
(libhelloworld.so) also be installed in order | | that it function
correctly.
I have a test program in my package that uses the libhelloworld.so file.
When I do a “objdump -x testlib | grep NEEDED” I got
NEEDED libhelloworld.so
NEEDED libc.so.2
Should I specify to the packager that the testlib program needs the
libhelloworld.so file? If yes How should I do that? Is the testlib program
responsable of the missing dependencies?
Also
How do you specify the SONAME in the the shared object file? I made a
search on the QNX web site without
success.
Thank you very much for your help
Maxime Barbeau
“Jerry Chappell” <jchappell@qnx.com> wrote in message
news:as7lld$bk2$1@nntp.qnx.com…
Well it all works the same way. As long as the ones that are installed
have
the SONAME reference, then the package that installed it will have either
a
QPM:ContainsLibrary> or a QPM:ProvidesLibrary tag with the same name.
The
installer sees that it’s already installed, so the dependency is satisfied
and no errors are shown during install.
True, if that package was built incorrectly, then the dependency check
would
fail, and you would have to do some sort of hack to make your package
install without the error. You could even re-include the required library
in
your new package–just remember that in that case, it will be difficult to
get a newer version of the lib, if it becomes available.
Jerry
“Maxime Barbeau” <> maxime.barbeau@mindready.com> > wrote in message
news:as60il$p56$> 1@inn.qnx.com> …
Hi Jerry
Ok, I understand.
But what happen if the NEEDED library are already installed on the QNX
PC?
Maybey they are not remembered by the system, or the previous package
was
not built correctely…
Maxime
“Jerry Chappell” <> jchappell@qnx.com> > wrote in message
news:artb5g$qqm$> 1@nntp.qnx.com> …
If you do an “objdump -x hello_world | grep NEEDED” you will see what
packager sees. There are lines called NEEDED which specify the shared
object
libraries which are required for hello_world to run. When packager
sees
these lines, it puts the corresponding QPM:RequiresLibrary tag into
your
QPM file. This tag will not be in the QPM, if you also package up the
required .so file in the same packaging session.
While Jiri Kristek’s suggestion will allow you to install, it’s more
of
a
hack, not an actual fix. You should locate the .so files and make sure
they
are packaged too, so that users of your product are guaranteed to get
the
required libraries.
Jerry Chappell
“Maxime Barbeau” <> maxime.barbeau@mindready.com> > wrote in message
news:arj9nf$on6$> 1@inn.qnx.com> …
Hi!
I am building my own QNX package using the “packager” and
“pkg-installer”
applications,
I can build it easely but I get a problem when installing the *.so
(shared
objets) files with pkg-installer.
When the pkg-installer tries to install the lib*.so files, I shows a
Missing
Dependencies warning windows
Hoverwer, If I ignore this warning and clicking on
[contiue]-[install]
buttons, the installation proceds correctlry to the end.
I then decided to do a test with a mimimum package that contains 1
single
so
file
with a “hello world” like function: I still have the same problem
I compile my so with this command: cc- shared -o libtest.so
test.c -v
(from the QNX help files)
This problem occurs on QNX 6.1.0a and 6.2.0.
Maybe I forgot to include some imporant linking
variables/modules/definitions?
Does anyone else already had encountered this problem before ?
Thank
Maxime Bareau
maxime.barbeu@mindready.com
\