<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>127776</bug_id>
          
          <creation_ts>2014-01-28 06:53:06 -0800</creation_ts>
          <short_desc>Fix linking failure on EFL and GTK for the jsCStack branch merge</short_desc>
          <delta_ts>2014-01-28 09:20:11 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>JavaScriptCore</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P1</priority>
          <bug_severity>Blocker</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>127782</dependson>
          <blocked>127763</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mhahnenberg</cc>
    
    <cc>msaboff</cc>
    
    <cc>ossy</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>972900</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-01-28 06:53:06 -0800</bug_when>
    <thetext>After adding the missing files to the cmake buildsystem and removed
the dead code I managed to build EFLWebKit. But I got linking failure
with SHARED_CORE=ON build. Unfortunately it is necessary to be able
run layout tests. (https://bugs.webkit.org/show_bug.cgi?id=80683)

Additionally I got the same linking failure with WebKitGTK build.


GTK build failure:
-------------------
/usr/bin/ld: Source/JavaScriptCore/llint/.libs/libjavascriptcoregtk_3_0_la-LowLevelInterpreter.o: relocation R_X86_64_PC32 against symbol `llint_throw_stack_overflow_error&apos; can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value


EFL build failure with SHARED_CORE=ON:
---------------------------------------
Linking CXX shared library ../../lib/libjavascriptcore_efl.so
/usr/bin/ld: CMakeFiles/JavaScriptCore.dir/llint/LowLevelInterpreter.cpp.o: relocation R_X86_64_PC32 against symbol `llint_throw_stack_overflow_error&apos; can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>972907</commentid>
    <comment_count>1</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-01-28 07:30:09 -0800</bug_when>
    <thetext>Additional info: The build fails on GTK always and fails on EFL bots, 
because ENABLE_DRT=1 environment variable forces the SHARED_CORE=ON build.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>972923</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-01-28 08:33:41 -0800</bug_when>
    <thetext>After reading a little bit about this error, it seems that gcc requires that code linked into a shared library should, by default, be compiled with -fpic due to the constraints of the small code model and the size of the address space on 64-bit platforms. I can see two obvious solutions:

(1) Use -fpic to enable position independent code when building shared libraries.
(2) Use -mcmodel=large to enable the large code model when building shared libraries.

Either one of these should work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>972925</commentid>
    <comment_count>3</comment_count>
    <who name="Mark Hahnenberg">mhahnenberg</who>
    <bug_when>2014-01-28 08:36:44 -0800</bug_when>
    <thetext>(In reply to comment #2)
&gt; After reading a little bit about this error, it seems that gcc requires that code linked into a shared library should, by default, be compiled with -fpic due to the constraints of the small code model and the size of the address space on 64-bit platforms. I can see two obvious solutions:
&gt; 
&gt; (1) Use -fpic to enable position independent code when building shared libraries.
&gt; (2) Use -mcmodel=large to enable the large code model when building shared libraries.
&gt; 
&gt; Either one of these should work.

This also might be the result of a lack of proper extern-ing for these symbols. Let me try that first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>972963</commentid>
    <comment_count>4</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2014-01-28 09:20:11 -0800</bug_when>
    <thetext>It seems https://bugs.webkit.org/show_bug.cgi?id=127782 solved the linking problem. Thanks for the quick fix.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>