Bug 207890 - [WPE] undefined reference to `JSC::ExecutableBase::hasJITCodeForCall() const'
Summary: [WPE] undefined reference to `JSC::ExecutableBase::hasJITCodeForCall() const'
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Charlie Turner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-18 08:10 PST by Charlie Turner
Modified: 2020-03-01 16:06 PST (History)
10 users (show)

See Also:


Attachments
Patch (1.40 KB, patch)
2020-02-18 08:13 PST, Charlie Turner
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie Turner 2020-02-18 08:10:26 PST
Hitting this on arm-buildroot-linux-gnueabihf with GCC 9.2.0,

[ 74%] Linking CXX executable ../../../bin/jsc
/home/cht/igalia/buildroot/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/9.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: ../../../lib/../Source/JavaScriptCore/CMakeFiles/JavaScriptCore.dir/__/__/DerivedSources/JavaScriptCore/unified-sources/UnifiedSource-f2e18ffc-25.cpp.o: in function `JSC::ExecutableBase::hasJITCodeFor(JSC::CodeSpecializationKind) const':
/home/cht/igalia/buildroot/output/build/wpewebkit-2.26.4/Source/JavaScriptCore/runtime/ExecutableBase.h:183: undefined reference to `JSC::ExecutableBase::hasJITCodeForCall() const'
/home/cht/igalia/buildroot/output/host/lib/gcc/arm-buildroot-linux-gnueabihf/9.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: /home/cht/igalia/buildroot/output/build/wpewebkit-2.26.4/Source/JavaScriptCore/runtime/ExecutableBase.h:185: undefined reference to `JSC::ExecutableBase::hasJITCodeForConstruct() const'
collect2: error: ld returned 1 exit status

Adding #include "ExecutableBaseInlines.h" to Source/JavaScriptCore/runtime/NativeExecutable.cpp fixes the issue, not sure if that's the best solution.
Comment 1 Charlie Turner 2020-02-18 08:13:04 PST
Created attachment 391047 [details]
Patch
Comment 2 Carlos Alberto Lopez Perez 2020-02-19 04:45:39 PST
Comment on attachment 391047 [details]
Patch

Not sure if this its the best fix.

Source/JavaScriptCore/runtime/ExecutableBase.h declares the function prototype for hasJITCodeForCall() and hasJITCodeForConstruct() but ExecutableBase.cpp doesn't define the function hasJITCodeForCall() neither hasJITCodeForConstruct()

The functions hasJITCodeForCall() and hasJITCodeForConstruct() seem defined in ScriptExecutable.h

I wonder if a better fix would be to remove from ExecutableBase.h the prototypes of hasJITCodeForCall() and hasJITCodeForConstruct() and include ScriptExecutable.h inside ExecutableBase.h ?
Comment 3 Charlie Turner 2020-02-19 05:13:37 PST
(In reply to Carlos Alberto Lopez Perez from comment #2)
> Comment on attachment 391047 [details]
> Patch
> 
> Not sure if this its the best fix.
> 
> Source/JavaScriptCore/runtime/ExecutableBase.h declares the function
> prototype for hasJITCodeForCall() and hasJITCodeForConstruct() but
> ExecutableBase.cpp doesn't define the function hasJITCodeForCall() neither
> hasJITCodeForConstruct()
> 
> The functions hasJITCodeForCall() and hasJITCodeForConstruct() seem defined
> in ScriptExecutable.h

They're also in ExecutableBaseInlines.h, and I don't know what purpose this organisation serves. I guess for some sort of ODR-workaround?

> 
> I wonder if a better fix would be to remove from ExecutableBase.h the
> prototypes of hasJITCodeForCall() and hasJITCodeForConstruct() and include
> ScriptExecutable.h inside ExecutableBase.h ?

ScriptExectable is a subclass and the base needs visibility of these symbols, so removing their prototypes doesn't work correctly. This is a hairy organisation which I think is best left to the discretion of a JSC maintainer.
Comment 4 Yusuke Suzuki 2020-02-29 01:27:20 PST
Comment on attachment 391047 [details]
Patch

r=me
Comment 5 WebKit Commit Bot 2020-03-01 16:06:40 PST
Comment on attachment 391047 [details]
Patch

Clearing flags on attachment: 391047

Committed r257695: <https://trac.webkit.org/changeset/257695>
Comment 6 WebKit Commit Bot 2020-03-01 16:06:42 PST
All reviewed patches have been landed.  Closing bug.