Operating System - HP-UX
1752579 Members
3256 Online
108788 Solutions
New Discussion юеВ

chatr -l not supported in HPUX Itanium??

 
SOLVED
Go to solution
Jithin Prakash
Advisor

chatr -l not supported in HPUX Itanium??

Hi,

I was building boost libraries on my HPUX Itanium box. The libboost_filesystem.sl.1.39.0 has a dependency on libboost_system.sl.1.39.0. But chatr shows the full path of libboost_system library in the shared libraries list.. Hence,
I tried to do chatr -l libboost_system.sl.1.39.0 /libboost_filesystem.sl.1.39.0.

It failed with the following error:
chatr(error): invalid -l argument: libboost_system.sl.1.39.0

Can somone please clarify what can be done for this? It would be a great help..

Thanks,
Jithin.
12 REPLIES 12
Dennis Handly
Acclaimed Contributor

Re: chatr -l not supported in HPUX Itanium??

>chatr shows the full path of libboost_system library in the shared libraries list.

What's your exact output?

>I tried to do chatr -l libboost_system.sl.1.39.0 /libboost_filesystem.sl.1.39.0.

Why do you think you need to do that?
-l is only available for PA32 or if you use +compat.
Jithin Prakash
Advisor

Re: chatr -l not supported in HPUX Itanium??

Hi Dennis,

Thanks for the quick turnaround. I am porting my application from HP PA-RISC to HP Itanium. While building my application on PA-RISC earlier, the libboost_filesystem was giving error saying cannot find /libboost_system. The fullpath is the path in the boost source. Hence, I had used chatr -l for PA-RISC and then had given the path to find libboost_system in SHLIB_PATH.

So, is there any equivalent for chatr -l in Itanium? If not, how do I build boost with +compat flag? Is this a compilation flag? I believe this flag works for cc only right? I am using gcc for compilation.

Thanks,
Jithin.

Jithin Prakash
Advisor

Re: chatr -l not supported in HPUX Itanium??

Hi,

Can someone please provide some insights on this one??

Thanks,
Jithin
Dennis Handly
Acclaimed Contributor

Re: chatr -l not supported in HPUX Itanium??

>is there any equivalent for chatr -l in Integrity?

There is no need to use that for Integrity.

>how do I build boost with +compat flag? Is this a compilation flag?

This is a linker option but I don't think you need it.

Again, what is your exact chatr(1) output, without that -l.
Jithin Prakash
Advisor

Re: chatr -l not supported in HPUX Itanium??

The chatr output is:

bash-4.1# chatr libboost_filesystem.sl.1.39.0
libboost_filesystem.sl.1.39.0:
32-bit ELF shared library
shared library dynamic path search:
LD_LIBRARY_PATH enabled first
SHLIB_PATH enabled second
embedded path enabled third
shared library list:
bin.v2/libs/system/build/gcc-4.2.3/release/threading-multi/libboost_system.sl.1.39.0
librt.so.1
libstdc++.so
libunwind.so.1
libm.so.1
shared library mapped private disabled
shared vtable support disabled
explicit unloading enabled
linkage table protection disabled
segments:
index type address flags size
7 text 04000000 z---c- D (default)
8 data 40010000 ---m-- D (default)
kernel assisted branch prediction enabled
lazy swap allocation for dynamic segments disabled
nulptr dereferences trap enabled
address space model: default
caliper dynamic instrumentation disabled

As you can see, the libboost_system has full path mentioned.. Can you please tell me how to solve this problem?

Thanks.
Jithin Prakash
Advisor

Re: chatr -l not supported in HPUX Itanium??

Also, if I execute ld, I get error as follows:

bash-4.1# ld libboost_filesystem.sl.1.39.0
ld: Can't find dependent library "bin.v2/libs/system/build/gcc-4.2.3/release/threading-multi/libboost_system.sl.1.39.0"
Fatal error.

This is the problem, exactly speaking. I was doing some research and saw that there is a linker flag +nodefaultrpath which can be given. Am I on the right track?
Dennis Handly
Acclaimed Contributor

Re: chatr -l not supported in HPUX Itanium??

>the libboost_system has full path mentioned. Can you please tell me how to solve this problem?

Ok, I was finally able to duplicate the problem. You are going to have to relink.

The proper link options are:
-Lbin.v2/libs/system/build/gcc-4.2.3/release/threading-multi -l:libboost_filesystem.sl.1.39.0

This splits the path from the file.

Note: On Integrity, you should use .so, not .sl for your shared libs.

>saw that there is a linker flag +nodefaultrpath which can be given. Am I on the right track?

No. Your "embedded path enabled third" is already empty. But you may need it when you add that -L above.
Jithin Prakash
Advisor

Re: chatr -l not supported in HPUX Itanium??

Hi,

I have the boost libraries. But, relinking seems to be difficult since boost is built with the help of bjam. It has some weird syntax and I can't find where to add -L..

Is there any alternative? Like how chatr -l solves this in PA. If I have the library already, can I do something on that to do away with the libboost_system full path?

Thanks a lot,
Jithin.
Dennis Handly
Acclaimed Contributor
Solution

Re: chatr -l not supported in HPUX Itanium??

>relinking seems to be difficult since boost is built with the help of bjam. It has some weird syntax and I can't find where to add -L.

I suppose you can build with "export CXXOPTS=-v" and then extract the link line and correct it.

>Like how chatr -l solves this in PA. If I have the library already, can I do something on that to do away with the libboost_system full path?

No. You are expected to link correctly, that's why there is no need for -l.

Other than use a binary editor, no.
(Since it doesn't start with a "/", it isn't really a full or absolute path.)