<?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>40328</bug_id>
          
          <creation_ts>2010-06-08 13:28:06 -0700</creation_ts>
          <short_desc>GtkLauncher fails to build: Undefined references to openFile, readFromFile, and seekFile</short_desc>
          <delta_ts>2010-08-11 05:36:49 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Clemmitt Sigler">cmsigler</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>gustavo</cc>
    
    <cc>kent.hansen</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>235480</commentid>
    <comment_count>0</comment_count>
    <who name="Clemmitt Sigler">cmsigler</who>
    <bug_when>2010-06-08 13:28:06 -0700</bug_when>
    <thetext>Hi,

In trying to build WebKitGtk on generic Linux (a Gentoo Linux installation) on x86_64, linking GtkLauncher fails with these three errors in particular:

./.libs/libwebkit-1.0.so: undefined reference to `WebCore::openFile(WebCore::String const&amp;, WebCore::FileOpenMode)&apos;
./.libs/libwebkit-1.0.so: undefined reference to `WebCore::readFromFile(int, char*, int)&apos;
./.libs/libwebkit-1.0.so: undefined reference to `WebCore::seekFile(int, long long, WebCore::FileSeekOrigin)&apos;

(Other linking errors are dealt with in Bug 40326.)

These file access problems seem to be related to WebCore/platform/gtk/FileSystemGtk.cpp.  These three methods aren&apos;t defined in this file as they are in, e.g., WebCore/platform/posix/FileSystemPOSIX.cpp.  Of course, when I tried including the posix module in the build, there were namespace collisions.  It seems the fix may be to add these missing methods to WebCore/platform/gtk/FileSystemGtk.cpp.

I&apos;m not sure how to go about coding the fix for this problem.  I just hope some of the Gtk devs. read this report and can add these required methods.  Thanks.

Clemmitt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>235762</commentid>
    <comment_count>1</comment_count>
    <who name="Clemmitt Sigler">cmsigler</who>
    <bug_when>2010-06-09 06:32:28 -0700</bug_when>
    <thetext>(In reply to comment #0)
&lt;snip&gt;
&gt; ./.libs/libwebkit-1.0.so: undefined reference to
&gt; `WebCore::openFile(WebCore::String const&amp;, WebCore::FileOpenMode)&apos;
&gt; ./.libs/libwebkit-1.0.so: undefined reference to
&gt; `WebCore::readFromFile(int, char*, int)&apos;
&gt; ./.libs/libwebkit-1.0.so: undefined reference to
&gt; `WebCore::seekFile(int, long long, WebCore::FileSeekOrigin)&apos;
&lt;snip&gt;
&gt; These file access problems seem to be related to
&gt; WebCore/platform/gtk/FileSystemGtk.cpp.  These three
&gt; methods aren&apos;t defined in this file as they are in,
&gt; e.g., WebCore/platform/posix/FileSystemPOSIX.cpp.

Additional info:

As a QnD test I&apos;ve added dummy stubs that return -1 (error) for these three methods to WebCore/platform/gtk/FileSystemGtk.cpp.  Doing that at least gets the build to complete w/o error.

A little investigation leads me to believe that:

1.) To implement &apos;PlatformFileHandle openFile(const String&amp; path, FileOpenMode mode)&apos; for the GTK platform, a wrapper for &apos;int g_open(const gchar *filename, int flags, int mode)&apos; is needed.

2.) To implement &apos;int readFromFile(PlatformFileHandle handle, char* data, int length)&apos; for the GTK platform, a wrapper for &apos;gboolean g_file_get_contents(const gchar *filename, gchar **contents, gsize *length, GError **error)&apos; is needed.

3.) To implement &apos;long long seekFile(PlatformFileHandle handle, long long offset, FileSeekOrigin origin)&apos; for the GTK platform, a wrapper for &apos;GIOStatus g_io_channel_seek_position(GIOChannel *channel, gint64 offset, GSeekType type, GError **error)&apos; is needed.

I&apos;m not a low-level GTK developer, having only done some simple GUI design/use, so I&apos;d say I&apos;m not the best person to implement these.  Any GTK developer out there, for whom this is a half-hour hack?  TIA!

Clemmitt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>236001</commentid>
    <comment_count>2</comment_count>
    <who name="Clemmitt Sigler">cmsigler</who>
    <bug_when>2010-06-09 14:12:26 -0700</bug_when>
    <thetext>(In reply to comment #1)
&lt;snip&gt;
&gt; A little investigation leads me to believe that:
&lt;snip&gt;

I&apos;ve got some more info now.  The only place the methods openFile, readFromFile and seekFile seem to be called is in WebCore/html/FileStream.cpp.  I observe that these changes were introduced in Rev. 58832 --&gt; http://trac.webkit.org/changeset/58832

Therefore, it&apos;s my speculation that since that rev. -- when building GTK with all the bells and whistles turned on, at least -- Programs/GtkLauncher hasn&apos;t been able to link without error.  As for me, I hadn&apos;t run a build since rev. 55083 until recently.

{FWIW, the two FileStream methods that call these three are:

void FileStream::openForRead(Blob* blob)
void FileStream::read(char* buffer, int length)}

I&apos;m still proposing that these three need to be implemented in WebCore/platform/gtk/FileSystemGtk.cpp by someone who knows what they&apos;re doing with basic GTK ops. to match similar implementation in, e.g., WebCore/platform/posix/FileSystemPOSIX.cpp as provided by Revision 57182.

(As a lark I may try rolling my tree back to rev. 58831 and see if this problem goes away, as it should.)

HTH some more.

Clemmitt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237202</commentid>
    <comment_count>3</comment_count>
    <who name="Clemmitt Sigler">cmsigler</who>
    <bug_when>2010-06-11 18:37:09 -0700</bug_when>
    <thetext>(In reply to comment #1)

I found some time to look at stuff, so I just did an implementation of these methods myself.  Not sure if the code meets standards for GTK use.  Patch is coming next.  HTH.

Clemmitt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237203</commentid>
    <comment_count>4</comment_count>
      <attachid>58535</attachid>
    <who name="Clemmitt Sigler">cmsigler</who>
    <bug_when>2010-06-11 18:38:36 -0700</bug_when>
    <thetext>Created attachment 58535
Patch to add missing methods to FileSystemGtk.cpp

Patch as described in previous comment.  HTH.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237204</commentid>
    <comment_count>5</comment_count>
      <attachid>58536</attachid>
    <who name="Clemmitt Sigler">cmsigler</who>
    <bug_when>2010-06-11 18:39:28 -0700</bug_when>
    <thetext>Created attachment 58536
Patch to add missing methods to FileSystemGtk.cpp

Patch as described in previous comment.  HTH.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237244</commentid>
    <comment_count>6</comment_count>
      <attachid>58536</attachid>
    <who name="Dirk Schulze">krit</who>
    <bug_when>2010-06-11 23:19:21 -0700</bug_when>
    <thetext>Comment on attachment 58536
Patch to add missing methods to FileSystemGtk.cpp

This is not an official review, but i would like to give some hints.WebCore/ChangeLog:5
 +          Add to FileSystemGtk.cpp methods openFile, readFromFile
The order in Changelogs is normally bug title, bug link, description to the patch and added tests. The patch WebKitTools/Scripts/prepare-ChangeLog -bug &lt;bug-number&gt; will help you to create the changelog.

WebCore/platform/gtk/FileSystemGtk.cpp:34
 +  #include &lt;unistd.h&gt;
You added this include twice now.

WebCore/platform/gtk/FileSystemGtk.cpp:267
 +  // Following the implementation for closeFile above, implement openFile
Please indent all comments with the code.

WebCore/platform/gtk/FileSystemGtk.cpp:286
 +  // as the pattern for implementing readFromFile
dito.

WebCore/platform/gtk/FileSystemGtk.cpp:292
 +  // Handle EOF on read
dito.

WebCore/platform/gtk/FileSystemGtk.cpp:305
 +  // just use code from WebCore/platform/posix/FileSystemPOSIX.cpp
dito.

You either added a new feature, or fixed a regression. Both need layouttesting...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>237293</commentid>
    <comment_count>7</comment_count>
    <who name="Clemmitt Sigler">cmsigler</who>
    <bug_when>2010-06-12 07:21:09 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; (From update of attachment 58536 [details])
&gt; This is not an official review, but i would like to give some hints.

Thank you very much, Dirk.  I&apos;ll make all these fixes.

As of now I don&apos;t know how to work with layouttests.  I need to review and digest the &quot;Writing New Tests&quot; webpage and then find time to do the work -- which may not happen until sometime next week :^(

Thanks again.

Clemmitt</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>255356</commentid>
    <comment_count>8</comment_count>
    <who name="Kent Hansen">kent.hansen</who>
    <bug_when>2010-07-23 07:04:13 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; (From update of attachment 58536 [details] [details])
&gt; &gt; This is not an official review, but i would like to give some hints.
&gt; 
&gt; Thank you very much, Dirk.  I&apos;ll make all these fixes.
&gt; 
&gt; As of now I don&apos;t know how to work with layouttests.  I need to review and digest the &quot;Writing New Tests&quot; webpage and then find time to do the work -- which may not happen until sometime next week :^(
&gt; 
&gt; Thanks again.
&gt; 
&gt; Clemmitt

Hi Clemmitt,
Please turn off the review flag if you don&apos;t intend to have the current patch reviewed anymore. That stops it from showing up in the list of patches pending review.

I&apos;ve also added the gtk keyword to this bug, since it&apos;s more likely to be spotted by gtk devs then.

As you commented already, the FileReader class was added in http://trac.webkit.org/changeset/58832, but it&apos;s still off by default. So the workaround until a gtk patch is landed is to build without that feature (--no-file-reader, or just don&apos;t pass --file-reader).

And I don&apos;t think you can write a LayoutTest for this; essentially the patch for the missing functions is needed in order to enable file-reader for the gtk port, and once that happens, the entry for fast/files/file-reader.html can be removed from platform/gtk/Skipped.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>263196</commentid>
    <comment_count>9</comment_count>
      <attachid>58536</attachid>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2010-08-11 05:28:26 -0700</bug_when>
    <thetext>Comment on attachment 58536
Patch to add missing methods to FileSystemGtk.cpp

 304 // Since above methods are implemented without GLib calls and variables,
 305 // just use code from WebCore/platform/posix/FileSystemPOSIX.cpp

Will these work on Windows? Why not use the glib tools that enable portability here? Also, yes, I think you can just remove the test from the skipped list =)

I&apos;ll r- given krit&apos;s comments and my own.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>263202</commentid>
    <comment_count>10</comment_count>
    <who name="Gustavo Noronha (kov)">gustavo</who>
    <bug_when>2010-08-11 05:36:49 -0700</bug_when>
    <thetext>Implementations for these seem to be written already. See r63308. I believe we should revisit FileSystemGtk, and implement all of it using GIO, though.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>58535</attachid>
            <date>2010-06-11 18:38:36 -0700</date>
            <delta_ts>2010-06-11 18:39:28 -0700</delta_ts>
            <desc>Patch to add missing methods to FileSystemGtk.cpp</desc>
            <filename>filesystemgtk_fix.patch</filename>
            <type>text/plain</type>
            <size>3002</size>
            <attacher name="Clemmitt Sigler">cmsigler</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA2MTA1MSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTkgQEAKKzIwMTAtMDYtMTEgIENsZW1taXR0IFNpZ2xlciAgPGNtc2lnbGVyQGdt
YWlsLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAg
ICBBZGQgdG8gRmlsZVN5c3RlbUd0ay5jcHAgbWV0aG9kcyBvcGVuRmlsZSwgcmVhZEZyb21GaWxl
CisgICAgICAgIGFuZCBzZWVrRmlsZS4KKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcv
c2hvd19idWcuY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FNlZWtGcm9tRW5kOgorICAgICAgICB3aGVuY2UgPSBT
RUVLX0VORDsKKyAgICAgICAgYnJlYWs7CisgICAgZGVmYXVsdDoKKyAgICAgICAgQVNTRVJUX05P
VF9SRUFDSEVEKCk7CisgICAgfQorICAgIHJldHVybiBzdGF0aWNfY2FzdDxsb25nIGxvbmc+KGxz
ZWVrKGhhbmRsZSwgb2Zmc2V0LCB3aGVuY2UpKTsKK30KKwogfQo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>58536</attachid>
            <date>2010-06-11 18:39:28 -0700</date>
            <delta_ts>2010-08-11 05:28:26 -0700</delta_ts>
            <desc>Patch to add missing methods to FileSystemGtk.cpp</desc>
            <filename>filesystemgtk_fix.patch</filename>
            <type>text/plain</type>
            <size>3002</size>
            <attacher name="Clemmitt Sigler">cmsigler</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA2MTA1MSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTkgQEAKKzIwMTAtMDYtMTEgIENsZW1taXR0IFNpZ2xlciAgPGNtc2lnbGVyQGdt
YWlsLmNvbT4KKworICAgICAgICBSZXZpZXdlZCBieSBOT0JPRFkgKE9PUFMhKS4KKworICAgICAg
ICBBZGQgdG8gRmlsZVN5c3RlbUd0ay5jcHAgbWV0aG9kcyBvcGVuRmlsZSwgcmVhZEZyb21GaWxl
CisgICAgICAgIGFuZCBzZWVrRmlsZS4KKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcv
c2hvd19idWcuY2dpP2lkPTQwMzI4CisKKyAgICAgICAgTm8gY2hhbmdlIGluIGZ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ORDsKKyAgICAgICAgYnJlYWs7CisgICAgZGVmYXVsdDoKKyAgICAgICAgQVNTRVJUX05P
VF9SRUFDSEVEKCk7CisgICAgfQorICAgIHJldHVybiBzdGF0aWNfY2FzdDxsb25nIGxvbmc+KGxz
ZWVrKGhhbmRsZSwgb2Zmc2V0LCB3aGVuY2UpKTsKK30KKwogfQo=
</data>
<flag name="review"
          id="44877"
          type_id="1"
          status="-"
          setter="gustavo"
    />
          </attachment>
      

    </bug>

</bugzilla>