|
From: | Dr. David Kirkby |
Subject: | [bug-gnu-libiconv] Re: Unable to build libiconv 1.13.1 on OpenSolaris |
Date: | Sat, 22 May 2010 00:31:10 +0100 |
User-agent: | Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.7) Gecko/20100214 Thunderbird/3.0.1 |
On 05/21/10 10:52 PM, Bruno Haible wrote:
Hi, Dr. David Kirkby wrote:I get the following message. libtool: link: gcc -shared -Wl,-z -Wl,text -Wl,-h -Wl,libiconv.so.2 -o .libs/libiconv.so.2.5.0 .libs/iconv.o .libs/localcharset.o .libs/relocatable.o -lc Text relocation remains referenced against symbol offset in file aliases_lookup 0x125c6 .libs/iconv.o aliases_lookup 0x12b04 .libs/iconv.o ld: fatal: relocations remain against allocatable but non-writable sections collect2: ld returned 1 exit status make[1]: *** [libiconv.la] Error 1 make[1]: Leaving directory `/tmp/iconv-1.13.1.p2/src/lib'Either libtool somehow did not infer the right option for your GCC to produce position-independent code (i.e. code without relocations in the .text segment). Or your GCC is broken. I would try to rebuild with CC="gcc -fPIC". If that succeeds, then libtool guessed the wrong option. If not, your GCC is unusable.
Thank you. The gcc in /usr/bin is very old - even on OpenSolaris 06/2009, which is the latest release. It it gcc 3.4.3, though it compiles iconv ok.
Using "gcc -fPIC" did not help with the newer gcc. I'll try another gcc version.What I find a bit annoying sometimes is that it is far from rare to find one has to use one version of gcc to build a bit of code, only to find that version will not build another bit of code. So one has to use different versions to build different bits of code. GCC is not as well tested on Solaris as it is on Linux.
Unfortunately, too much code in existence will not build with Sun's compiler, as it is very fussy. I believe Sun's compiler will build iconv, but that is not an option for me, as I need to build a lot of code (> 1 million lines), and can't expect a user to switch compilers during the build.
dave
[Prev in Thread] | Current Thread | [Next in Thread] |