RESOLVED FIXED 153138
[GTK][OSX] libjavascriptcoregtk fails to link when building debug configuration
https://bugs.webkit.org/show_bug.cgi?id=153138
Summary [GTK][OSX] libjavascriptcoregtk fails to link when building debug configuration
Jeremy Huddleston Sequoia
Reported 2016-01-15 11:25:11 PST
Created attachment 269072 [details] build log After addressing previous build issues, webkit-gtk 2.11.3 succeeds in building the release configuration. When building the debug configuration, it fails when linking libjavascriptcoregtk: Undefined symbols for architecture x86_64: "JSC::JSCell::inherits(JSC::ClassInfo const*) const", referenced from: JSC::WriteBarrierBase<JSC::Structure>::set(JSC::VM&, JSC::JSCell const*, JSC::Structure*) in StructureStubInfo.cpp.o "JSC::JSCell::structure() const", referenced from: JSC::WriteBarrierBase<JSC::Structure>::set(JSC::VM&, JSC::JSCell const*, JSC::Structure*) in StructureStubInfo.cpp.o webkit-gtk was configured as: cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH=/opt/local/lib -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DPORT=GTK -DENABLE_X11_TARGET=ON -DENABLE_QUARTZ_TARGET=OFF -DENABLE_INTROSPECTION=OFF -DENABLE_OPENGL=OFF -DLLVM_CONFIG_EXE=/opt/local/bin/llvm-config-mp-3.7 -DENABLE_VIDEO=ON -DENABLE_PLUGIN_PROCESS_GTK2=ON -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.11" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_Volumes_MiniHD_opt_macports_users_devans_GNOME-3_stable_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.3'
Attachments
build log (49.44 KB, application/x-bzip2)
2016-01-15 11:25 PST, Jeremy Huddleston Sequoia
no flags
Jeremy Huddleston Sequoia
Comment 1 2016-01-15 11:38:31 PST
Looks like it's supposed to be from runtime/JSCellInlines.h inline bool JSCell::inherits(const ClassInfo* info) const { return classInfo()->isSubClassOf(info); } ... inline Structure* JSCell::structure() const { return Heap::heap(this)->structureIDTable().get(m_structureID); }
Jeremy Huddleston Sequoia
Comment 2 2016-01-15 11:52:18 PST
I suspect this is from one of the various ASSERT()s in some header. I didn't track down where it was, but adding '#include "JSCellInlines.h"' to StructureStubInfo.cpp.o allows me to work around this issue. That's obviously not the appropriate fix. The include should be done in the appropriate header that is consuming those methods.
Jeremy Huddleston Sequoia
Comment 3 2016-01-31 17:01:07 PST
Ah, I think it is coming from this in WriteBarrier.h: template<class T> inline void validateCell(T cell) { ASSERT_GC_OBJECT_INHERITS(cell, std::remove_pointer<T>::type::info()); } by way of WriteBarrierInlines.h: inline void WriteBarrierBase<T>::set(VM& vm, const JSCell* owner, T* value) { ASSERT(value); ASSERT(!Options::useConcurrentJIT() || !isCompilationThread()); validateCell(value); setEarlyValue(vm, owner, value); } Testing a fix.
Jeremy Huddleston Sequoia
Comment 4 2016-01-31 20:19:21 PST
Dang. Messy layering issues... Including JSCellInlines.h in WriteBarrier.h results in: In file included from /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/WriteBarrier.h:33: In file included from /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/JSCellInlines.h:33: In file included from /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/JSDestructibleObject.h:4: In file included from /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/JSObject.h:28: In file included from /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/ArrayStorage.h:30: /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/Butterfly.h:73:24: error: no template named 'WriteBarrier'; did you mean 'JITWriteBarrier'? typedef ContiguousData<WriteBarrier<Unknown>> ContiguousJSValues; ^~~~~~~~~~~~ JITWriteBarrier Including JSCellInlines.h in WriteBarrierInlines.h results in: In file included from /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/WriteBarrierInlines.h:31: In file included from /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/JSCellInlines.h:33: In file included from /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/JSDestructibleObject.h:4: In file included from /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/JSObject.h:34: /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/CustomGetterSetter.h:56:16: error: incomplete type 'JSC::Structure' named in nested name specifier return Structure::create(vm, globalObject, prototype, TypeInfo(CustomGetterSetterType, StructureFlags), info()); ^~~~~~~~~~~ /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit2-gtk/webkit2-gtk/work/webkitgtk-2.11.4/Source/JavaScriptCore/runtime/JSCJSValue.h:55:7: note: forward declaration of 'JSC::Structure' class Structure; ^
Jeremy Huddleston Sequoia
Comment 5 2016-11-06 01:36:55 PST
This is no loner an issue in 2.15.1
Note You need to log in before you can comment on or make changes to this bug.