[webkit-dev] error compiling webkit-git on 64-bit

Yusuke Sato yusukes at chromium.org
Thu Jul 30 21:29:40 PDT 2009

I had the same problem with Ubuntu Hardy 64bit. I guess the easiest
way to work around the link error is to run the ./autogen.sh script
with --disable-jit (if you're not debugging JIT stuff, of course :-).

$ ./autogen.sh --disable-jit --enable-debug && make
$ ./Programs/GtkLauncher

When the --enable-debug option is specified (in other words, when
-DNDEBUG is not passed to GCC), the following JIT-related function in
JavaScriptCore/jit/JITStubs.cpp is defined and used,

asm volatile (
".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n"
SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n"
    "movq %rsp, %rdi" "\n"
    "call " SYMBOL_STRING(cti_vm_throw) "\n"
    "addq $0x48, %rsp" "\n"
    "popq %rbx" "\n"
    "popq %r15" "\n"
    "popq %r14" "\n"
    "popq %r13" "\n"
    "popq %r12" "\n"
    "popq %rbp" "\n"
    "ret" "\n"

but the call instruction in the function seems not to be PIC
compatible on x86_64. I'm not sure but maybe you could also fix the
link error by replacing the line with
    "call " SYMBOL_STRING(cti_vm_throw) "@PLT\n"
or something like that. If you can't use --disable-jit for some
reasons, please try this.


On Sat, Jul 11, 2009 at 8:19 PM, Luka Napotnik<luka.napotnik at gmail.com> wrote:
> Hello.
> I have a problem compiling the latest GIT version of webkit. My system
> is ArchLinux 64-bit and gcc 4.4. My configure looks like this:
> ./configure --prefix=/usr --enable-debug --disable-optimizations
> When compiling webkit I got the following error:
> -----------------
> /usr/bin/ld: ./.libs/libJavaScriptCore.a(libJavaScriptCore_la-JITStubs.o): relocation R_X86_64_PC32 against symbol `cti_vm_throw' can not be used when making a shared object; recompile with -fPIC
> /usr/bin/ld: final link failed: Bad value.
> -----------------
> I've set the CFLAGS and CXXFLAGS environment variables to -fPIC and ran
> configure again but got the same error. Any ideas how to fix this?
> Greets,
> Luka
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

More information about the webkit-dev mailing list