Pen-Yuan Hsing wrote:
Hello,
I am trying to compile and install the latest libiconv 1.13.1 (downloaded
directly from the official GNU site) on my installation of i386 OpenSolaris
2009.06.
1. [i]./configure --prefix=/usr/gnu --enable-shared --with-pic[/i]
2. [i]make[/i] ends with this error:
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 -lsec -lc
Text relocation remains referenced
against symbol offset in file
aliases_lookup 0x129a6 .libs/iconv.o
aliases_lookup 0x12ee4 .libs/iconv.o
[b]ld: fatal: relocations remain against allocatable but non-writable
sections[/b]
collect2: ld returned 1 exit status
make[1]: *** [libiconv.la] Error 1
make[1]: Leaving directory `/src/libiconv-1.13.1/lib'
make: *** [all] Error 2
I have the latest binutils installed (2.20) and GCC 4.3.2 from Package Manager.
Also, the following configure options have been unsuccessfully atttempted:
./configure --prefix=/usr/gnu --enable-shared
./configure --prefix=/usr/gnu --with-pic
./configure --prefix=/usr/gnu
Any help would be appreciated! Thanks.
libtool is passing ld the option '-z text'. This option,
which is a very good thing to use, tells the link-editor
to disallow relocations against readonly text:
-z text
In dynamic mode only, forces a fatal error if any relo-
cations against non-writable, allocatable sections
remain. For historic reasons, this mode is not the
default when building an executable or shared object.
However, its use is recommended to insure that the text
segment of the dynamic object being built is shareable
between multiple running processes. A shared text seg-
ment incurs the least relocation overhead when loaded
into memory.
The use of -ztext is not your problem --- it's simply allowing
the linker to catch the problem, which is that the object iconv.o
has relocations against the text segment.
The most likely reason for this is that .libs/iconv.o was not
compiled PIC. I recommend starting with a fresh clean workspace,
and when you build it, capture all the output into a log file
that you can examine later:
make 2>&1 | tee output.log
and then look at the output.log file and note which flags are
being passed to the compiler. You'll want to see an option like
-pic, -fpic, -Kpic, or -KPIC, depending on the compiler.
- Ali
_______________________________________________
opensolaris-discuss mailing list
[email protected]