Bug 139126 - Failed to load LLVM library at libllvmForJSC.so
Summary: Failed to load LLVM library at libllvmForJSC.so
Status: RESOLVED DUPLICATE of bug 140049
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-01 06:52 PST by Seo Sanghyeon
Modified: 2015-01-20 07:51 PST (History)
1 user (show)

See Also:


Attachments
test (697 bytes, patch)
2014-12-02 05:54 PST, Csaba Osztrogonác
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Seo Sanghyeon 2014-12-01 06:52:32 PST
r176590.

To reproduce:
Tools/Scripts/build-jsc --gtk --ftl-jit
WebKitBuild/Release/bin/jsc --verboseFTLCompilation=true some.js

This is a regression. If I set USE_LD_GOLD to OFF it works fine.
https://bugs.webkit.org/show_bug.cgi?id=137953

My understanding is that ld and gold have different defaults so that ld sets RPATH, but gold sets RUNPATH. RPATH is applied transitively but RUNPATH is not. Before, jsc had RPATH, jsc links to libjavascriptcoregtk-4.0.so, which dlopen libllvmForJSC.so using RPATH from jsc, but this doesn't happen with RUNPATH. To use RUNPATH, libjavascriptcoregtk-4.0.so should have RUNPATH, not jsc. Here is a good explanation:
http://blog.qt.digia.com/blog/2011/10/28/rpath-and-runpath/
Comment 1 Csaba Osztrogonác 2014-12-02 05:18:07 PST
I can't reproduce this bug on Ubuntu 14.04. 
Maybe your ld and ld.gold have different default settings.

Could you check if passing --enable-new-dtags or --disable-new-dtags
to your linker fixes this issue or not?
Comment 2 Seo Sanghyeon 2014-12-02 05:48:43 PST
How can I pass --disable-new-dtags to my linker? I am not that familiar with the build system to know.
Comment 3 Seo Sanghyeon 2014-12-02 05:53:24 PST
By the way, I am on Ubuntu 14.04 too.

I needed to do clean rebuild to get USE_LD_GOLD change to take effect. Maybe you are still using ld?
Comment 4 Csaba Osztrogonác 2014-12-02 05:54:26 PST
Created attachment 242406 [details]
test

(In reply to comment #2)
> How can I pass --disable-new-dtags to my linker? I am not that familiar with
> the build system to know.

Try the attached patch.
Comment 5 Csaba Osztrogonác 2014-12-02 05:57:05 PST
(In reply to comment #3)
> Maybe you are still using ld?
No, I do use ld.gold.
Comment 6 Seo Sanghyeon 2014-12-02 06:06:18 PST
Passing --disable-new-dtags using the attached patch does fix the issue. Thanks.
Comment 7 Seo Sanghyeon 2014-12-02 06:20:42 PST
I found that although my system is Ubuntu 14.04, my binutils package is from Ubuntu 14.10. I installed GCC 4.9 from Ubuntu 14.10 repository, which also pulled binutils, but I forgot about it.

Sorry for confusion.
Comment 8 Csaba Osztrogonác 2015-01-20 07:51:52 PST

*** This bug has been marked as a duplicate of bug 140049 ***