| Summary: | undefined reference to `JSC::JSCell::structure() const | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kalev Lember <kalevlember> |
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | cgarcia, zan |
| Priority: | P3 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
Kalev Lember
2014-08-14 05:22:21 PDT
I was able to reproduce this a couple of times. Fixed it by including JSCellInlines.h where necessary. I'll try to reproduce it again and see where the method is being generated, just to have a concrete reason for the header inclusion (which will result in inlining the method). Right, the problem occurs if you're building with optimizations enabled but without passing -DNDEBUG among the compiler flags. Can you confirm that the problem disappears if you include -DNDEBUG? (In reply to comment #2) > Right, the problem occurs if you're building with optimizations enabled but without passing -DNDEBUG among the compiler flags. > > Can you confirm that the problem disappears if you include -DNDEBUG? Thanks for looking at this, shouldn't -DNDEBUG always be passed for release builds? Yes, that's the idea. -DNDEBUG is included by default in the preset CMAKE_C_FLAGS_RELEASE and CMAKE_CXX_FLAGS_RELEASE variables. Overriding those will cause -DNDEBUG to be left out of the final list of compiler flags. I'm quite sure CMAKE_C_FLAGS and CMAKE_CXX_FLAGS should be used for listing additional flags. The build-type-specific flags are then appended to that list, but beware that for instance CMAKE_C(XX)_FLAGS_RELEASE is by default set to '-O3 -DNDEBUG', so -O3 might trump over any previously-defined -On option. Ah, indeed, my build was missing a -DCMAKE_BUILD_TYPE=Release and adding that made things work. Thanks. Re Zan's comment #4, the cmake support macros that Fedora has for rpm builds actually seem to override both CFLAGS / CXXFLAGS and CMAKE_C_FLAGS_RELEASE / CMAKE_CXX_FLAGS_RELEASE. The former is used to pass extra compiler flags and CMAKE_C_FLAGS_RELEASE / CMAKE_CXX_FLAGS_RELEASE are overridden to omit the default -O3 and only pass -DNDEBUG. That setup seems to work fairly well with the way webkitgtk cmake builds are set up. Looks like no actual bug here so I'll close out the ticket. Thanks again for the help! |