QNX packager problem

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

There was a discussion about this problem a time ago.
I had the same problem and I was unable to solve it so I remove
RequiresLibrary section from qpm file in a batch file.

sed -e/RequiresLibrary/d file.qpm > filenew.qpm

Jiri Kristek
RETIA, a.s.


Maxime Barbeau wrote:

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
\

Thank you very much

It works!




“Jiri Kristek” <jkristek@retia.cz> wrote in message
news:arld7g$646$1@inn.qnx.com

There was a discussion about this problem a time ago.
I had the same problem and I was unable to solve it so I remove
RequiresLibrary section from qpm file in a batch file.

sed -e/RequiresLibrary/d file.qpm > filenew.qpm

Jiri Kristek
RETIA, a.s.


Maxime Barbeau wrote:
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

\

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
\

Jerry Chappell wrote:

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.

In my case, qnxinstaller is reporting Missing libraries for those ones I
have included in my package in /usr/lib directory. Along to your advice
these ones should not be even listed in the qpm file.Where can be the
problem?

I run the packager in that way:

popt="-d -v2"
#upg=-u
packager $popt $upg -k -m $qprvzor -f $pkgdir $basedir
mv -v $newqpr $newqpr.z
cd $pkgdir

mv -v ReDat3-$verze-x86-Retia.qpm ReDat3-$verze-x86-Retia.qpm.orig
sed -e/RequiresLibrary/d ReDat3-$verze-x86-Retia.qpm.orig >
ReDat3-$verze-x86-Retia.qpm
pax -wv ReDat3-$verze*.qp[mk] | gzip -v > …/$newqpr
cd …




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



\

In that case, do the objdump on your libraries:

objdump -x my_lib.so.1 | grep SONAME

Again, this is what packager does to determine what libraries are provided
by the files that you are packaging. Check that the SONAME in the lib
exactly matches the NEEDED in the application. If it doesn’t match (or
SONAME is missing), it’s not going to work correctly.

Jerry Chappell

“Jiri Kristek” <jkristek@retia.cz> wrote in message
news:3DE397D8.4060303@retia.cz

Jerry Chappell wrote:
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.


In my case, qnxinstaller is reporting Missing libraries for those ones I
have included in my package in /usr/lib directory. Along to your advice
these ones should not be even listed in the qpm file.Where can be the
problem?

I run the packager in that way:

popt="-d -v2"
#upg=-u
packager $popt $upg -k -m $qprvzor -f $pkgdir $basedir
mv -v $newqpr $newqpr.z
cd $pkgdir

mv -v ReDat3-$verze-x86-Retia.qpm ReDat3-$verze-x86-Retia.qpm.orig
sed -e/RequiresLibrary/d ReDat3-$verze-x86-Retia.qpm.orig
ReDat3-$verze-x86-Retia.qpm
pax -wv ReDat3-$verze*.qp[mk] | gzip -v > …/$newqpr
cd …




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





\

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


\

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




\

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






\