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
Created attachment 165716 [details] Patch
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.
(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.
(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.
(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.
Created attachment 165807 [details] Simple test code for dlopen and static library problem.
(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.
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.
(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 :)
Created attachment 166342 [details] Patch
Comment on attachment 166342 [details] Patch Looks good, thanks!
Comment on attachment 166342 [details] Patch Clearing flags on attachment: 166342 Committed r129976: <http://trac.webkit.org/changeset/129976>
All reviewed patches have been landed. Closing bug.