- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: 64 bit iconv - mismatched ABI /usr/local/lib/l...
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
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
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
тАО05-11-2011 01:14 PM
тАО05-11-2011 01:14 PM
64 bit iconv - mismatched ABI /usr/local/lib/libiconv.a
However, this is a 32 bit archive and not 64 bit.Hence, when I try to build 64 bit application, I get an error:-
"ld: Mismatched ABI (not an ELF file) for /usr/local/lib/libiconv.a"
My understanding was HP-UX shipped native 32/64 bit iconv. But, if I do not link to /usr/local/lib/libiconv.a for 32/64 build, I get
"undefined sysmbol - iconv_open(), iconv_close()".
Hence, I link with /usr/local/lib/libiconv.a.
Do I have to download iconv source and build it with 64 bit options? If yes, I need some help on HPUX 64 bit flags required for building iconv. If no, how do I link to 64 bit iconv?
- Tags:
- IConv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2011 02:05 PM
тАО05-11-2011 02:05 PM
Re: 64 bit iconv - mismatched ABI /usr/local/lib/libiconv.a
At this point you are at the code level and code is not the responsibility of the SA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2011 02:28 PM
тАО05-11-2011 02:28 PM
Re: 64 bit iconv - mismatched ABI /usr/local/lib/libiconv.a
I am the owner of the application which I am trying to link with libiconv.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2011 02:45 PM
тАО05-11-2011 02:45 PM
Re: 64 bit iconv - mismatched ABI /usr/local/lib/libiconv.a
You may think that that's a useful
description, but it's not. Useful would be
actual output from, say:
uname -a
> My understanding was HP-UX shipped native
> 32/64 bit iconv. [...]
Then why are you trying to link with stuff
from "/usr/local"?
> [...] But, if I do not link to
> /usr/local/lib/libiconv.a for 32/64 build,
> I get [...]
You get that from what, exactly?
As usual, showing actual commands with their
actual output might be more helpful than
vague descriptions or interpretations.
man 3C iconv
[...]
WARNINGS
If you use iconv() and compile/link your application archive on PA-
RISC systems, note that iconv() has a dependency on libdld.sl that
will require a change to the compile/link command:
[...]
If I knew which kind of "64 bit HP-UX B.11.31
system" you were using, then I might know if
this warning was relevant. But I don't.
If you supplied a simple test case, and the
commands you use to compile and link, then a
reader who is too lazy to write his own (and
guess how you're building yours) might be
able to run an experiment more easily. Just
a thought.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2011 02:48 PM
тАО05-11-2011 02:48 PM
Re: 64 bit iconv - mismatched ABI /usr/local/lib/libiconv.a
From "My application", and the fact that you
were trying to link the thing, that much was
obvious to some of us. (Other things were
less so.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2011 03:32 PM
тАО05-11-2011 03:32 PM
Re: 64 bit iconv - mismatched ABI /usr/local/lib/libiconv.a
1) uname -a
Output:- HP-UX hpuxsys B.11.31 U 9000/800 1774488355
2) Makefile:-
gcc -Wall -fPIC -DHPUX_64 -D_PSTAT64 -DOS_HPUX -D_V2 -o sampleApp sampleApp.o $(LIB) -lstdc++ -lm -lnsl -lintl -L/lib /usr/local/lib/libiconv.a
where LIB=-L./ -L/usr/local/lib64 ---> 64 bit make
LIB=-L/lib -L/usr/local/lib -L/usr/lib ---> 32 bit make
Now, if I do not use "/usr/local/lib/libiconv.a", I get below error:-
"undefined symbol - libiconv_open, libiconv_close"
However, makefile works for 32 bit, but does not work for 64 bit.
3) I did a search for libiconv.a under /usr and can see only 1 entry:-
/usr/local/lib/libiconv.a ---> 321 bit
4) Stripped down sample test code:-
#include
void convert()
{
char *current = NULL;
current = nl_langinfo(CODESET);
string from;
from.assign(current);
string to("UTF-8");
iconv_t converter = iconv_open(to.c_str(),from.c_str());
...////iconv() stuff
iconv_close(converter);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2011 04:00 PM
тАО05-11-2011 04:00 PM
Re: 64 bit iconv - mismatched ABI /usr/local/lib/libiconv.a
> Output:- HP-UX hpuxsys B.11.31 U 9000/800 1774488355
Ok. So, PA-RISC, yes?
> man 3C iconv
>
> [...]
> WARNINGS
> If you use iconv() and compile/link your application archive on PA-
> RISC systems, note that iconv() has a dependency on libdld.sl that
> will require a change to the compile/link command:
> [...]
Did you read that? Did you try any of it?
> If you supplied a simple test case, [...]
> 4) Stripped down sample test code:-
You can compile and link that? My idea of a
test case and yours seem to differ.
> Now, if I do not use
> "/usr/local/lib/libiconv.a", I get below
> error:-
I understand that you have trouble when you
don't use the library from "/usr/local". But
you don't seem to have a 64-bit version of
that library. If you want to use the HP
iconv() stuff, then don't use the
"/usr/local" stuff. If you want to use the
"/usr/local" stuff, then get a more complete
set of iconv() stuff there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2011 04:43 PM
тАО05-11-2011 04:43 PM
Re: 64 bit iconv - mismatched ABI /usr/local/lib/libiconv.a
1) Yes, its a PA-RISC system
2) Sample code compiles and links for 32 bit version , but fails for 64 bit version.
3) I am more than willing to use HP's iconv() stuff. But, again I doubt if it supports iconv_open() and iconv_close() calls.
iconv() requires iconv_t converter - which is obtained through iconv_open().
That means HP's native iconv() should have .a/.sl (archive/shared object) file somewhere - which I am unable to find inside /usr.
4) I will investigate on native iconv's dependency on libsdl - but that is secondary as I do not know where HP's native iconv shared object resides?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2011 05:04 PM
тАО05-11-2011 05:04 PM
Re: 64 bit iconv - mismatched ABI /usr/local/lib/libiconv.a
Or it's in the normal C RTL stuff, or its
name is different from that of the GNU iconv
stuff, or ...
> But, again I doubt [...]
man iconv
man iconv_open
Or do I need to fire up my HP-UX system
again?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-11-2011 08:20 PM
тАО05-11-2011 08:20 PM
Re: 64 bit iconv - mismatched ABI /usr/local/lib/libiconv.a
Regards
-Rajesh