shared libs install location

Don’t understand something:
During initial packaging session, a shared library is included to be
installed to /x86/lib. its symbolic link, as I talked about in a
previous article is also correctly included.
When we generate a qpg file we see the following tags:
<QPG:Add file=“nto/x86/so/libRieter_misc.so.1”
install="/lib/"/>
<QPG:Add file=“nto/x86/so/libRieter_misc.so.1” install="/lib/"
component=“slib”/>
<QPG:Add file=“nto/x86/so/libRieter_miscS.a”
install="/x86/lib/"/>

meaning that lib*.so will go to /lib instead of /x86/lib. But, it’s
correct for lib*S.a.

Why this difference?

Thanks,
Alain.

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

meaning that lib*.so will go to /lib instead of /x86/lib. But, it’s
correct for lib*S.a.

Why this difference?

Well, I’ve discussed this in an email with Jerry Chappell.
packager detects the architecture of the library (by doing and
objdump I think) and put correctly it in /ARCH/lib. It will also
union the filesystem correctly.

Here’s a part of the email:

I can simply use <QPG:Add file=“something”
install="/usr/photon/bin"> and packager will detect its
architecture, put it in /x86/usr/photon/bin and union the
filesystem directly or I have to do something else?

That is exactly what you do, and that is exactly what packager
will do.
And if for some files they are not put into the package that you
want,
you
can force it by adding a proc=“x86” in the QPG:Add statement.

Hope this helps

Thanks,
Alain.


Wave++

Wave++ a écrit :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
meaning that lib*.so will go to /lib instead of /x86/lib. But, it’s
correct for lib*S.a.

Why this difference?

Well, I’ve discussed this in an email with Jerry Chappell.
packager detects the architecture of the library (by doing and
objdump I think) and put correctly it in /ARCH/lib. It will also
union the filesystem correctly.

Here’s a part of the email:
I can simply use <QPG:Add file=“something”
install="/usr/photon/bin"> and packager will detect its
architecture, put it in /x86/usr/photon/bin and union the
filesystem directly or I have to do something else?

That is exactly what you do, and that is exactly what packager
will do.
And if for some files they are not put into the package that you
want,
you
can force it by adding a proc=“x86” in the QPG:Add statement.

Hope this helps

Thanks,
Alain.


Wave++

I think that it’s not exactly what I talk about. The problem here is that
lib*.so should be in /x86/lib and it’s what package do during first
packager session. Unfortunately, it’s not what happens when it generate
the qpg file.

Regards,
Alain.

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

I think that it’s not exactly what I talk about. The problem here is that
lib*.so should be in /x86/lib and it’s what package do during first
packager session. Unfortunately, it’s not what happens when it generate
the qpg file.

Uhm. I’m not sure of what you’re trying to do but I think you’re
generating a qpg file using an existing basedir using packager, right?

Regards,
Alain.


Wave++

Wave++ a écrit :

Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
I think that it’s not exactly what I talk about. The problem here is that
lib*.so should be in /x86/lib and it’s what package do during first
packager session. Unfortunately, it’s not what happens when it generate
the qpg file.

Uhm. I’m not sure of what you’re trying to do but I think you’re
generating a qpg file using an existing basedir using packager, right?

Regards,
Alain.


Wave++

Yes exactly, my basedir is:

/opt/Rieter_misc/x86/lib/libRieter_misc.so
/opt/Rieter_misc/x86/lib/libRieter_misc.so.1
/opt/Rieter_misc/x86/lib/libRieter_miscS.a

during inital packaging session, I can see that these all three files will go
to /x86/lib but, when I generate the qpg file, I can see:
<QPG:Add file=“Rieter_misc/lib/libRieter_misc.so.1” install="/lib/"/>
<QPG:Add file=“Rieter_misc/lib/libRieter_misc.so.1” install="/lib/"
component=“slib”/>
<QPG:Add file=“Rieter_misc/x86/lib/libRieter_miscS.a”
install="/x86/lib/"/>

Not sure it’s correct and don’t know how it can find
Rieter_misc/lib/libRieter_misc.so.1 to package it!!!
I’m also waiting for Jerry point of view.

Thanks,
Alain.

Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

QPG:Add file=“Rieter_misc/lib/libRieter_misc.so.1” install="/lib/"/
QPG:Add file=“Rieter_misc/lib/libRieter_misc.so.1” install="/lib/"
component=“slib”/
QPG:Add file=“Rieter_misc/x86/lib/libRieter_miscS.a”
install="/x86/lib/"/
Not sure it’s correct and don’t know how it can find
Rieter_misc/lib/libRieter_misc.so.1 to package it!!!
I’m also waiting for Jerry point of view.

Okay, here it is…
Packager has one (and only one) problem that I can see, and that
is that the -x option does not take symbolic links into account when
creating the QPG file. You can add them by hand, for now.

The QPG entries that you’ve shown are correct, as far as packager
knows. It reads your existing package, and finds libRieter_misc.so.1
packaged inside. So that is the QPG:Add entry that it writes to
the QPG. The second line (where component=“slib”) can be safely
removed from the QPG, since this will be done automatically anyway.

The install location is /lib/ because that’s where the existing package
says it is. And that’s fine. When packager repackages using the QPG,
it will look at libRieter_misc.so.1 and see that it’s an x86 shared lib,
and automatically redirect it to /x86/lib, as you want.

The fact that you have libRieter_misc.so.1 named libRieter_misc.so on
your hard drive simply means that you have to alter the QPG:Add
line to rename the file: file=“libRieter_misc.so”, so that packager can
find it on your hard drive, then rename in the install="" section:

<QPG:Add file=“Rieter_misc/lib/libRieter_misc.so” install=
“/lib/libRieter_misc.so.1”/>

The “missing feature” that packager does not put in the symlinks,
means that you also have to add another QPG:Add line:

<QPG:Add file=“libRieter_misc.so” install="/x86/lib/" filetype=
“symlink” linkto=“libRieter_misc.so.1”/>

Remember that the -x option simply gives you a QPG to start with,
so that you don’t have to create a QPG from scratch. Package your
product normally, then create a QPG, then edit the QPG to make it
do exactly what you want packager to do, then repackage using
the QPG. Sorry for any confusion that this caused.

I hope this has provided some help.

Jerry