1 |
Sebastian Redl wrote: |
2 |
> Hi, |
3 |
> |
4 |
> While trying to compile OpenOffice.org, I was blocked by the inability |
5 |
> to compile icu-3.4.1. |
6 |
> The compilation fails on linking the third library it tries to build, |
7 |
> libicui18n.so, with this message: |
8 |
> |
9 |
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: |
10 |
> warning: creating a DT_TEXTREL in object. |
11 |
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: |
12 |
> ucol_wgt.o: relocation R_X86_64_PC32 against `compareRanges' can not be |
13 |
> used when making a shared object; recompile with -fPIC |
14 |
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.1/../../../../x86_64-pc-linux-gnu/bin/ld: |
15 |
> final link failed: Bad value |
16 |
> collect2: ld returned 1 exit status |
17 |
|
18 |
It worked fine on my working system (CFLAGS="-O2 -march=opteron -pipe"), |
19 |
but failed the same way in my development chroot (CFLAGS="-ggdb |
20 |
-march=k8 -pipe"). |
21 |
|
22 |
I didn't look at the code yet, but I guess it has some #ifndef |
23 |
__OPTIMIZED__. __OPTIMIZED__ is set by gcc with -O2 and above. I guess |
24 |
if you switch back to your -O3 CFLAGS it will compile. |
25 |
|
26 |
> I even manually removed the previously built libraries (libicudata.so |
27 |
> and libicuuc.so) and relinked them with -fPIC, although I don't even |
28 |
> know whether the flag has any influence on linking. Same error. |
29 |
|
30 |
-fPIC only affects compilation |
31 |
|
32 |
> I have the same problem when manually trying to compile any |
33 |
> Mozilla-based application. However, most programs and libraries build |
34 |
> fine - I just finished merging KOffice without any problems. |
35 |
|
36 |
> |
37 |
> So, is my toolchain screwed up? Am I doing something wrong? Is the icu |
38 |
> ebuild simply broken? |
39 |
|
40 |
I have exactly the same versions of binutils in both working and |
41 |
development system and never had problems, so I'd say all is fine on |
42 |
your side. We'll have to fix the ebuild I guess. |
43 |
|
44 |
-- |
45 |
Kind Regards, |
46 |
|
47 |
Simon Stelling |
48 |
Gentoo/AMD64 developer |
49 |
-- |
50 |
gentoo-amd64@g.o mailing list |