RESOLVED FIXED 97622
[EFL] Fix build error : Link webkit2 library to ewk2UnitTestInjectedBundleSample.
https://bugs.webkit.org/show_bug.cgi?id=97622
Summary [EFL] Fix build error : Link webkit2 library to ewk2UnitTestInjectedBundleSam...
Byungwoo Lee
Reported 2012-09-25 18:39:53 PDT
When building efl for the first time, there is a build error as below. In file included from WebKitBuild/Debug/DerivedSources/WebKit2/include/WebKit2/WKBase.h:1:0, from Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleInitialize.h:29, from WebKitBuild/Debug/DerivedSources/WebKit2/include/WebKit2/WKBundleInitialize.h:1, from Source/WebKit2/UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp:26: Source/WebKit2/Shared/API/c/WKBase.h:41:32: fatal error: WebKit2/WKBaseSoup.h: No such file or directory
Attachments
Patch (1.54 KB, patch)
2012-09-25 19:00 PDT, Byungwoo Lee
no flags
Simple test code for dlopen and static library problem. (832 bytes, application/x-gzip)
2012-09-26 08:24 PDT, Byungwoo Lee
no flags
Patch (1.70 KB, patch)
2012-09-28 18:23 PDT, Byungwoo Lee
no flags
Byungwoo Lee
Comment 1 2012-09-25 19:00:10 PDT
Raphael Kubo da Costa (:rakuco)
Comment 2 2012-09-25 23:51:30 PDT
Comment on attachment 165716 [details] Patch Doesn't it make sense to link this library against ${EWK2UnitTests_LIBRARIES} instead? Right now the file only includes a few headers and does nothing, but in the future not only will it need these created headers, but also actual function calls, I guess.
Byungwoo Lee
Comment 3 2012-09-26 03:18:50 PDT
(In reply to comment #2) > (From update of attachment 165716 [details]) > Doesn't it make sense to link this library against ${EWK2UnitTests_LIBRARIES} instead? Right now the file only includes a few headers and does nothing, but in the future not only will it need these created headers, but also actual function calls, I guess. I understand your point. Actually, I have one doubt for linking EWK2UnitTests_LIBRARIES to injected bundle libraries. (about static library conflict issue) As you already know, EWK2UnitTests_LIBRARIES has wtf, javascriptcore and webcore library. And if SHARED_CORE is not ON, wtf, javascript, webcore will be a static library, and linked both WebProcess and injected bundle library. Isn't there any problem when WebProcess load the injected bundle library? I'm not sure but I simply understood that the EFL's build guide about SHARED_CORE=ON for the layout test is related with this issue.
Gyuyoung Kim
Comment 4 2012-09-26 05:01:20 PDT
(In reply to comment #3) > I'm not sure but I simply understood that the EFL's build guide about SHARED_CORE=ON for the layout test is related with this issue. We should support to enable | disable SHARED_CORE both.
Raphael Kubo da Costa (:rakuco)
Comment 5 2012-09-26 05:08:12 PDT
(In reply to comment #3) > As you already know, > EWK2UnitTests_LIBRARIES has wtf, javascriptcore and webcore library. > And if SHARED_CORE is not ON, wtf, javascript, webcore will be a static library, and linked both WebProcess and injected bundle library. > > Isn't there any problem when WebProcess load the injected bundle library? I don't think there should be an issue, but you can try it locally first and see if you experience any sort of weird issues.
Byungwoo Lee
Comment 6 2012-09-26 08:24:31 PDT
Created attachment 165807 [details] Simple test code for dlopen and static library problem.
Byungwoo Lee
Comment 7 2012-09-26 08:25:27 PDT
(In reply to comment #5) > (In reply to comment #3) > > As you already know, > > EWK2UnitTests_LIBRARIES has wtf, javascriptcore and webcore library. > > And if SHARED_CORE is not ON, wtf, javascript, webcore will be a static library, and linked both WebProcess and injected bundle library. > > > > Isn't there any problem when WebProcess load the injected bundle library? > > I don't think there should be an issue, but you can try it locally first and see if you experience any sort of weird issues. I'm telling the general case about singleton instance or static/global variable in static library. I attached the simple example about this. A singleton is created in TestClass static library. WebProcess and libInjectedBundle.so link the static library and both uses the singleton. The address of the singleton instance is different as below. WebProcess instance: 0x0896a008 InjectedBundle instance: 0x0896a410 InjectedBundle instance: 0x0896a410 InjectedBundle instance: 0x0896a410 WebProcess instance: 0x0896a008 WebProcess instance: 0x0896a008 WebProcess and InjectedBundle has different singleton instance because the static library is linked WebProcess and InjectedBundle statically.
Raphael Kubo da Costa (:rakuco)
Comment 8 2012-09-27 07:31:14 PDT
Right. I was talking to Kenneth about this; I guess you can simply link against the webkit2 library itself to avoid this sort of problem -- injected bundles are not really supposed to call WebCore/WTF/whatever.
Byungwoo Lee
Comment 9 2012-09-27 19:23:20 PDT
(In reply to comment #8) > Right. I was talking to Kenneth about this; I guess you can simply link against the webkit2 library itself to avoid this sort of problem -- injected bundles are not really supposed to call WebCore/WTF/whatever. Ok. That makes sense. Thanks :)
Byungwoo Lee
Comment 10 2012-09-28 18:23:23 PDT
Raphael Kubo da Costa (:rakuco)
Comment 11 2012-09-29 05:02:03 PDT
Comment on attachment 166342 [details] Patch Looks good, thanks!
WebKit Review Bot
Comment 12 2012-09-29 05:51:16 PDT
Comment on attachment 166342 [details] Patch Clearing flags on attachment: 166342 Committed r129976: <http://trac.webkit.org/changeset/129976>
WebKit Review Bot
Comment 13 2012-09-29 05:51:20 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.