lotem / rimeime

Legacy codebase of Rime, automatically exported from code.google.com/p/rimeime
48 stars 23 forks source link

Failed to Compile Rime under 64bit Linux #199

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Error message during "make":

Linking CXX shared library ../lib/librime.so
/usr/bin/ld: /usr/local/lib/libyaml-cpp.a(parser.cpp.o): relocation R_X86_64_32 
against `.bss' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libyaml-cpp.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [lib/librime.so.0.9.2] Error 1
make[1]: *** [src/CMakeFiles/rime.dir/all] Error 2
make: *** [all] Error 2

As far as I know, there are two patches which can fix this problem.
But I don't know where to get it.
Sorry for posting in English, but I have no Chinese input currently.

Original issue reported on code.google.com by zcn...@gmail.com on 27 Jul 2012 at 2:03

GoogleCodeExporter commented 9 years ago
Sorry, messages about the patch has been lost since the wiki named 'IBusRime' 
went out of service, reporting 500 - Internal Server Error.

Thus I created a new Wiki page with the same content but a different name here:
http://code.google.com/p/rimeime/wiki/RimeWithIBus

By default, yaml-cpp builds into a static library(.a), compiled without the 
`-fPIC` flag; that why users of x64 linux had problem linking to it.
Later I found a solution suggested by yaml-cpp's author, that is, to turn on 
this cmake option (see Wiki 
RimeWithIBus#ibus-rime_on_Ubuntu_12.04_安裝手記):
{{{
cmake -DBUILD_SHARED_LIBS=ON ..
}}}
so that a shared library `yaml-cpp.so` is built and is then linked to Rime 
instead of the static library.

I haven't tested this approach though; hope it will work for you.

Original comment by chen....@gmail.com on 27 Jul 2012 at 2:34

GoogleCodeExporter commented 9 years ago
Any news?

Original comment by chen....@gmail.com on 13 Aug 2012 at 6:47