- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: GNU libiconv for HP-UX
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2015 07:16 PM - edited 10-01-2015 07:20 PM
10-01-2015 07:16 PM - edited 10-01-2015 07:20 PM
GNU libiconv for HP-UX
Hi
I use the gnu compiler on a HP integrity server (HP-UX 11i v2).
When I use the function iconv() defined in iconv.h, I need to add '-liconv' option in the compile command line.
I also had to install the GNU libiconv portage from here: http://hpux.connect.org.uk/hppd/hpux/Development/Libraries/libiconv-1.14/
In the past, I compiled the same program using the IBM compiler and I did not need to add this option nor to add any additional library (I noticed there is already libiconv installed on the system when I run '/usr/sbin/swlist -l product': Libiconv 1.6.1.13 Libiconv - Character set conversion library).
Now if I execute the 'ldd' command on the binary of my program, I can see that it has a dependency to libiconv:
/usr/local/lib/hpux32/libiconv.a (libiconv.so.2)
It seems like a static librairy cause it's a '.a' file but it behaves like a shared library. I mean my program is dependent of the libiconv.
My questions: Why libiconv from GNU is a shared library whereas it is a static librairy which is embedded in the binaries of the program when compiling with the IBM compiler ? Is there a way to also use libiconv as a static librairy when compiling with GNU ?
PS: I also compiled the same program on linux with gcc and I did not need to add the '-liconv' option in the compile command line. It seems like a problem specific to HP-UX.
Please don't hesitate to ask for any additional information.
Thank you in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-01-2015 10:26 PM - edited 10-01-2015 10:27 PM
10-01-2015 10:26 PM - edited 10-01-2015 10:27 PM
Re: GNU libiconv for HP-UX
>I noticed there is already libiconv installed on the system when I run '/usr/sbin/swlist -l product': Libiconv 1.6.1.13 Libiconv - Character set conversion library).
This is probably only for /opt/gnome/.
>It seems like a static library cause it's a '.a' file but it behaves like a shared library.
Somebody pulled a fast one. ldd(1) will only show shlibs. And file(1) will tell you it's a shlib.
> Is there a way to also use libiconv as a static library when compiling with GNU?
You may have to build it yourself:
http://hpux.connect.org.uk/hppd/hpux/Development/Libraries/libiconv-1.14/
>It seems like a problem specific to HP-UX.
Using archive system libs is frowned upon on HP-UX. libc, etc only come in shared flavor.
Perhaps GNU agreed with that when porting to HP-UX?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2015 01:57 AM - edited 10-02-2015 02:24 AM
10-02-2015 01:57 AM - edited 10-02-2015 02:24 AM
Re: GNU libiconv for HP-UX
Thank you for your answer.
>Somebody pulled a fast one. ldd(1) will only show shlibs. And file(1) will tell you it's a shlib.
"shlibs" stands for "shared librairies", right?
But I am still not sure if these info tell me whether the library is shared or static.
> You may have to build it yourself:
http://hpux.connect.org.uk/hppd/hpux/Development/Libraries/libiconv-1.14/
Ah yes, this is the link I posted in my first post. But it doesn't include the sources. However I think I can build from here:
ftp://ftp.mirrorservice.org/pub/gnu/libiconv/
I will give it a try.
I still don't get why I did not need this library when compiling with the IBM compiler and I need it when compiling with GCC...
EDIT: I am very sorry to post from a different account. I lost my password, so I asked for an email to recreate it but nothing came in my mailbox. Then I recreated an account with the same email (I was said the email is free so I thought my old account may have been deleted). Now when I connect using my email it brings me to my old account.. very strange..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2015 04:20 PM
10-02-2015 04:20 PM
Re: GNU libiconv for HP-UX
>I am still not sure if these info tell me whether the library is shared or archive.
I've told you two ways to confirm that it is a shlib. ldd(1) and file(1). And you can also use elfdump(1).
>it doesn't include the sources.
Huh? At the bottom of the page is: Tarred/Gzipped Source Code
>I still don't get why I did not need this library when compiling with the IBM compiler and I need it when compiling with GCC...
There is nothing to get, that's just the way the compiler tool chain and run time architecture works on both machines. Perhaps it is included in libc on IBM?