Bug 17415 - GTK Build (using autotools) on Mac OS (DarwinPorts) Fails
Summary: GTK Build (using autotools) on Mac OS (DarwinPorts) Fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
: 17517 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-02-17 16:48 PST by Brent Fulgham
Modified: 2008-03-02 21:12 PST (History)
2 users (show)

See Also:


Attachments
Build log showing the failure (167.90 KB, text/plain)
2008-02-17 16:55 PST, Brent Fulgham
no flags Details
Update build rules for Mac OS (GTK+) (1.85 KB, patch)
2008-03-01 23:03 PST, Brent Fulgham
darin: review+
Details | Formatted Diff | Diff
Revised patch using ICU_CPPFLAGS instead of "$(prefix)/include" (1.94 KB, patch)
2008-03-02 20:00 PST, Brent Fulgham
alp: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brent Fulgham 2008-02-17 16:48:05 PST
Mac OS does not have a standard ICU installation at /usr/include/unicode (and obviously does not have a GTK installation either).

Using DarwinPorts to install GTK, CURL, ICU, and the other GTK build requirements results in a build failure (see attached buildlog).  The problem seems to be that certain macro defines required by ICU are not specified when WebKit builds.

Relevant libraries:

OS X (10.5.2) on Intel
gcc 4.0.1
autoconf 2.61
automake 1.10.1
libtool 1.5.24
GTK+ 2.12.4
GTK-- 2.12.0
ICU 3.8 (also tried with 3.6)
Cairo 1.4.14
Curl 7.18.0
Comment 1 Brent Fulgham 2008-02-17 16:55:33 PST
Created attachment 19181 [details]
Build log showing the failure
Comment 2 Brent Fulgham 2008-02-29 22:10:07 PST
*** Bug 17517 has been marked as a duplicate of this bug. ***
Comment 3 Brent Fulgham 2008-02-29 22:20:50 PST
The specific cause of the build failure is that it is attempting to load ${SYSTEM}/include/unicode/utf8.h (the installed ICU header directory).  But because of the include path priorities, it finds Webkit/JavaScriptCore/wtf/unicode/UTF8.h

On many systems this wouldn't be a problem, but on the Mac the directory structure can be case insensitive, so it accepts the UTF8.h header, which does not define the necessary elements (e.g., UCONFIG_NO_NORMALIZATION) to properly configure and build.
Comment 4 Brent Fulgham 2008-03-01 12:03:46 PST
Correcting the GNUmakefile include path ordering so that the system ICU (/opt/local in my case) allows the compile to continue.  Unfortunately, a linker error is encountered later, but I do not believe this is related to the original problem.
Comment 5 Brent Fulgham 2008-03-01 23:03:17 PST
Created attachment 19480 [details]
Update build rules for Mac OS (GTK+)

Proposed correction to support GTK+ build on Mac OS X.
Comment 6 Darin Adler 2008-03-02 18:32:48 PST
Comment on attachment 19480 [details]
Update build rules for Mac OS (GTK+)

Looks fine to me, although I'm not an expert on the GTK port. Setting review+.

GTK folks, please let me know if I'm being too liberal reviewing GTK-specific patches and if so, I'll steer clear in the future.
Comment 7 Alp Toker 2008-03-02 18:45:04 PST
(In reply to comment #6)
> (From update of attachment 19480 [details] [edit])
> Looks fine to me, although I'm not an expert on the GTK port. Setting review+.
> 
> GTK folks, please let me know if I'm being too liberal reviewing GTK-specific
> patches and if so, I'll steer clear in the future.
> 

In this case Brent was just trying out an alternative to this fix on #webkit but it's fine to be liberal on build fixes and WebCore changes. We wouldn't land it until it worked right anyway.

We could actually do with advice (but not necessarily r+) on the API changes currently waiting for review if you have some time to spare. I've been a bit short of time to investigate the impact of these changes.
Comment 8 Brent Fulgham 2008-03-02 20:00:15 PST
Created attachment 19487 [details]
Revised patch using ICU_CPPFLAGS instead of "$(prefix)/include"

Revised patch using ICU_CPPFLAGS instead of "$(prefix)/include"
Comment 9 Alp Toker 2008-03-02 21:12:50 PST
Landed in r30707 with a couple of tweaks.