bug-gnu-libiconv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnu-libiconv] Re: Unable to build libiconv 1.13.1 on OpenSolaris


From: Dr. David Kirkby
Subject: [bug-gnu-libiconv] Re: Unable to build libiconv 1.13.1 on OpenSolaris
Date: Sat, 22 May 2010 20:38:17 +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.

address@hidden:/tmp/iconv-1.13.1.p2/src$ gcc -v
Using built-in specs.
Target: i386-pc-solaris2.11
Configured with: ../gcc-4.3.4/configure
--prefix=/usr/local/gcc-4.3.4-GNU-assembler-Sun-linker
--with-as=/usr/local/binutils-2.20/bin/as --with-ld=/usr/ccs/bin/ld
--with-gmp=/usr/local --with-mpfr=/usr/local
Thread model: posix
gcc version 4.3.4 (GCC)

This matches the recommendations given in
   <http://gcc.gnu.org/install/specific.html#ix86-x-solaris210>.
Good.

Have you any suggestions how I might resolve this?

Other than the suggestion above, I would suggest using a different compiler or
GCC version. Why not just use /usr/bin/cc or /usr/bin/gcc? That is certainly
well tested. A libiconv built by any C compiler is usable by any other C
compiler.

In this thread:
<https://de.opensolaris.org/jive/thread.jspa?threadID=116065&tstart=143>
a person with a similar name as yours reports that GCC 4.5.0 prereleases went
well. Now gcc 4.5.0 is released.

Bruno

Thank you. The person on the OpenSolaris forum with a similar name to me was in fact me! I'd overlooked I'd solved this problem once before. It does appear to be either a bug in some versions of gcc, or a bug in the way my gcc was built.

I've used gcc 4.4.4 and iconv built with that. I don't have 4.5.0 (apart from a pre-release) on the system, but as you can see, I remarked before it did build with the 4pre-release.

Dave




reply via email to

[Prev in Thread] Current Thread [Next in Thread]