1

I have 64 bit solaris - sparc and opteron systems. Under /usr/local/lib , I can see libiconv.so for both systems. The file command on libiconv.so gives following output:-

ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped, no debugging information available

How do I build 64 bit libiconv w/o disturbing existing 32 bit on both sparc and opteron systems? Reason being, I am not aware of existing version of libiconv.

confused
  • 147
  • 3
  • 15

1 Answers1

2

This libiconv.so is not part of the OS being in the non standard /usr/local/lib. Should you want to build yourself or install from elsewhere a 64 bit version of this library, you would install it in /usr/local/lib/amd64 or /usr/local/lib/64.

However, this is probably useless in the first place as Solaris already includes the iconv library function in its standard C library so Gnu libiconv is basically redundant and unnecessary here.

jlliagre
  • 29,783
  • 6
  • 61
  • 72
  • @jilliagre..Thanks for your help. I had to use -liconv in makefile in order to link to libiconv. I have #include in .cpp file. If iconv is part of standard C lib, what should I be using in my makefile to link to both 32 and 64 bit iconv? – confused May 11 '11 at 16:28
  • @jilliagre..Thanks for your help. I had to use -liconv in makefile in order to link to libiconv. I have #include in .cpp file. If iconv is part of standard C lib, what should I be using in my makefile to link to both 32 and 64 bit iconv? I need to use -liconv to get rid of "undefined symbol" errors. And when I use -liconv, it will resolve to /usr/local/lib/libiconv.so which is 32 bit. – confused May 11 '11 at 17:00
  • You never link to both of the 32 and 64 bit libraries, its either one or the other depending on what you are building. What are the undefined symbols you observe ? – jlliagre May 11 '11 at 20:34
  • @jlliagre..Sorry, I meant I have 2 separate makefiles for 32/64 bit. If I do not use -liconv, I get "undefined symbol libiconv_open, libiconv_close". I am calling iconv_open() in my .cpp source to obtain iconv_t converter which is used in iconv() call. Again, thanks for your help. – confused May 11 '11 at 21:28
  • Why is iconv_open converted to libiconv_open ? There might be a bogus define somewhere in your code or in code you include. – jlliagre May 14 '11 at 12:52
  • @jilliagre..GNU libiconv's iconv.h was the culprit. Thanks for your help. – confused May 30 '11 at 04:28