Bug 131277 - [CMake] Include the ICU directories after everything else
Summary: [CMake] Include the ICU directories after everything else
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Raphael Kubo da Costa (:rakuco)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-06 05:08 PDT by Raphael Kubo da Costa (:rakuco)
Modified: 2016-01-03 17:27 PST (History)
7 users (show)

See Also:


Attachments
Patch (2.23 KB, patch)
2014-04-06 05:14 PDT, Raphael Kubo da Costa (:rakuco)
mcatanzaro: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Kubo da Costa (:rakuco) 2014-04-06 05:08:58 PDT
[CMake] Include the ICU directories after everything else
Comment 1 Raphael Kubo da Costa (:rakuco) 2014-04-06 05:14:43 PDT
Created attachment 228698 [details]
Patch
Comment 2 Martin Robinson 2014-04-06 09:15:44 PDT
Comment on attachment 228698 [details]
Patch

I'm not sure I understand the danger. If we are using the system version of libicu, don't we want t compile against the system version's headers?
Comment 3 Raphael Kubo da Costa (:rakuco) 2014-04-06 09:24:20 PDT
This isn't really about ICU, but rather that we want to include all WebKit paths before system ones. This isn't normally a problem on Linux where most headers are in /usr/include, which isn't passed explicitly to the compiler.

However, if I try to build WebKitGTK on another platform such as FreeBSD, where most headers are in /usr/local/include (including ICU's), I end up in a situation where the compiler gets passed something like this:

  g++ -I/path/to/WebKit/Source/WebCore -I/path/to/WebKit/Source/WebCore/html
      -I/path/to/WebKit/Source/WebCore/css [...]
      -I/usr/local/include -I/path/to/WebKit/Source/ThirdParty/ANGLE/include

This causes my system's GL headers to be picked up instead of ANGLE's, which can cause build failures when they differ because of constant names and other things.
Comment 4 Martin Robinson 2014-04-06 09:42:45 PDT
Sounds almost like Source/ThirdParty/ANGLE/include/GLES2/ shouldn't be on the include path.
Comment 5 Raphael Kubo da Costa (:rakuco) 2014-04-06 09:48:33 PDT
(In reply to comment #4)
> Sounds almost like Source/ThirdParty/ANGLE/include/GLES2/ shouldn't be on the include path.

Isn't it needed to build ANGLE and doesn't the code in platform/graphics/opengl assume ANGLE is used?
Comment 6 Martin Robinson 2014-04-06 10:08:18 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > Sounds almost like Source/ThirdParty/ANGLE/include/GLES2/ shouldn't be on the include path.
> 
> Isn't it needed to build ANGLE and doesn't the code in platform/graphics/opengl assume ANGLE is used?

At least for WebKitGTK+, the headers and GL library from the system should be used. ANGLE is only used now to convert GLES shaders to desktop shaders.
Comment 7 Raphael Kubo da Costa (:rakuco) 2014-04-06 10:26:20 PDT
At the moment, if I try to use my system (Mesa) GL headers and libraries, the build fails because Extensions3DOpenGLES.h references PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG and PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG, which have had different names for years.

Should this code be made to work with the system GL libraries? How about platforms that have to use ANGLE?
Comment 8 Martin Robinson 2014-04-06 10:28:01 PDT
(In reply to comment #7)
> At the moment, if I try to use my system (Mesa) GL headers and libraries, the build fails because Extensions3DOpenGLES.h references PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG and PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG, which have had different names for years.

Yes, I think we should correct the names, if possible.

> Should this code be made to work with the system GL libraries? How about platforms that have to use ANGLE?

I don't know of any platforms that use ANGLE for the GLES2 implementation.
Comment 9 Martin Robinson 2014-04-06 10:29:23 PDT
(In reply to comment #8)

> I don't know of any platforms that use ANGLE for the GLES2 implementation.

Actually, it is possible that ANGLE is used by the Windows ports.
Comment 10 Raphael Kubo da Costa (:rakuco) 2014-04-07 01:17:26 PDT
I'm trying to create a patch that removes the ANGLE directories from the list of include paths, but the fact that GLSLANG/ is also in Source/ThirdParty/ANGLE/include along GLES2/ and friends makes things difficult.
Comment 11 Michael Catanzaro 2016-01-03 17:27:38 PST
Comment on attachment 228698 [details]
Patch

Moving ${ICU_INCLUDE_DIRS} and ${ICU_LIBRARIES} is a strange hack; I don't want to do this.