Bug 49208 - [Gtk] Build fails when features are disabled (--disable-database, --disable-svg, etc.)
Summary: [Gtk] Build fails when features are disabled (--disable-database, --disable-s...
Status: RESOLVED DUPLICATE of bug 51327
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Minor
Assignee: Martin Robinson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-08 14:11 PST by Michael Smith
Modified: 2011-01-11 03:40 PST (History)
4 users (show)

See Also:


Attachments
Patch to fix --disable-database, --disable-svg, etc. (10.54 KB, patch)
2010-11-08 14:18 PST, Michael Smith
no flags Details | Formatted Diff | Diff
Fix build with --disable-database (40.35 KB, patch)
2010-11-09 13:30 PST, Michael Smith
no flags Details | Formatted Diff | Diff
Fix build with --disable-database (40.17 KB, patch)
2010-11-09 13:47 PST, Michael Smith
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Smith 2010-11-08 14:11:45 PST
Hi,

webkit-gtk fails to build when database storage and/or SVG are disabled. I have a patch to fix the build in r68244; looking at the affected files, I think it'll apply to trunk.

The affected flags are --disable-database, --disable-dom-storage, --disable-offline-web-applications, and --disable-svg.

I'm using the following configure flags:
                --disable-debug \
                --disable-channel-messaging \
                --disable-database \
                --disable-datalist \
                --disable-dom-storage \
                --disable-eventsource \
                --disable-filters \
                --disable-geolocation \
                --disable-icon-database \
                --disable-javascript-debugger \
                --disable-offline-web-applications \
                --disable-svg \
                --disable-svg-animation \
                --disable-svg-as-image \
                --disable-svg-fonts \
                --disable-svg-foreign-object \
                --disable-svg-use \
                --disable-video \

The stripped-down builds get broken once in a while - previous fixes include #37761, r53645, and r52245. (Changesets breaking the builds include r64151, r58801, and r67392.) --disable-database is especially prone to breaking. I think it'd be worth it to have a buildbot slave doing builds with features disabled.
Comment 1 Michael Smith 2010-11-08 14:18:43 PST
Created attachment 73284 [details]
Patch to fix --disable-database, --disable-svg, etc.
Comment 2 Alexey Proskuryakov 2010-11-08 22:32:22 PST
Comment on attachment 73284 [details]
Patch to fix --disable-database, --disable-svg, etc.

>-#include "JSSQLStatementErrorCallback.h"
> 
>#if ENABLE(DATABASE)
>
>+#include "JSSQLStatementErrorCallback.h"

This is not the right way to fix this. Preprocessor guards should be in header files, so that one doesn't need to to at extra lengths in .cpp files. That also means that generated header files need to be generated even for disabled features.

Not marking r-, because changing derived files generator is somewhat more challenging, but please consider fixing this the right way. And yes, there is quite a bit of precedent for preprocessor guards being in .cpp, unfortunately.
Comment 3 Michael Smith 2010-11-09 04:56:49 PST
Comment on attachment 73284 [details]
Patch to fix --disable-database, --disable-svg, etc.

It looks like most or all of the relevant .idl files have conditionals set, so this may not be too difficult - I think all I've got to do is go into GNUmakefile.am and move the webkit_built_sources from ENABLE_DATABASE up to the main block.
Comment 4 Michael Smith 2010-11-09 13:30:18 PST
Created attachment 73405 [details]
Fix build with --disable-database

I've reworked the patch. It's mostly just moving chunks around in GNUmakefile.am now.

Unfortunately, since I'm using r68244, I suspect the GNUmakefile.am hunks won't apply without some manual help.
Comment 5 Alexey Proskuryakov 2010-11-09 13:45:21 PST
Thanks! Leaving for a Gtk person to review.

+        * ../../../../../GNUmakefile.am: Always generate derived sources
+		for database and SVG features.
+        * ../../../../../platform/sql/SQLValue.cpp:
+        * ../../../../../platform/sql/SQLValue.h:
+        * ../../../../../platform/sql/SQLiteAuthorizer.cpp:
+        * ../../../../../platform/sql/SQLiteDatabase.cpp:
+        * ../../../../../platform/sql/SQLiteDatabase.h:
+        * ../../../../../platform/sql/SQLiteFileSystem.cpp:
+        * ../../../../../platform/sql/SQLiteFileSystem.h:
+        * ../../../../../platform/sql/SQLiteStatement.cpp:
+        * ../../../../../platform/sql/SQLiteStatement.h:
+        * ../../../../../platform/sql/SQLiteTransaction.cpp:
+        * ../../../../../platform/sql/SQLiteTransaction.h: Add feature guards.

There should be no backpaths here.
Comment 6 Michael Smith 2010-11-09 13:47:42 PST
Created attachment 73409 [details]
Fix build with --disable-database

Oops. backpaths fixed.
Comment 7 Martin Robinson 2010-11-10 12:44:26 PST
Comment on attachment 73409 [details]
Fix build with --disable-database

Looks good, though this doesn't apply cleanly to ToT. Perhaps I'll have some time later today to update it.
Comment 8 Eric Seidel (no email) 2010-12-14 15:16:50 PST
Ping? :)  Seems this should be landed or r-'d for being out of date.
Comment 9 Michael Smith 2010-12-14 20:43:50 PST
Unfortunately, any patch I make to GNUmakefile.am is likely to be out of date as it changes so frequently. Perhaps someone with commit access would be willing to fix it up?
Comment 10 Martin Robinson 2010-12-30 13:23:21 PST
Philippe, do you know what the status of this bug is after your recent changes?
Comment 11 Philippe Normand 2010-12-30 13:42:08 PST
(In reply to comment #10)
> Philippe, do you know what the status of this bug is after your recent changes?

Looks like a dupe of bug 51327
Mike, can you please check your build is fine now? My patch fixed the minimal build: build-webkit --minimal
Comment 12 Philippe Normand 2011-01-11 03:40:09 PST
Please reopen if needed

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