RESOLVED FIXED111817
Source/ThirdParty/leveldb/db/builder.cc does not build on systems without <endian.h>
https://bugs.webkit.org/show_bug.cgi?id=111817
Summary Source/ThirdParty/leveldb/db/builder.cc does not build on systems without <en...
Jeremy Huddleston Sequoia
Reported 2013-03-07 20:45:10 PST
1.11.4 built fine on OS X, but 1.11.91 fails due to: libtool: compile: /usr/bin/clang++ -DHAVE_CONFIG_H -I. -DBUILDING_WebCore -DBUILDING_WEBKIT -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -DBUILDING_CAIRO__ -DBUILDING_GTK__ -I./Source/ThirdParty/ANGLE/src -I./Source/ThirdParty/ANGLE/include -I./Source/ThirdParty/ANGLE/include/GLSLANG -I./Source/ThirdParty/ANGLE/include/KHR -I./Source/WebCore -I./Source/WebCore/Modules/filesystem -I./Source/WebCore/Modules/gamepad -I./Source/WebCore/Modules/geolocation -I./Source/WebCore/Modules/indexeddb -I./Source/WebCore/Modules/mediasource -I./Source/WebCore/Modules/mediastream -I./Source/WebCore/Modules/navigatorcontentutils -I./Source/WebCore/Modules/notifications -I./Source/WebCore/Modules/proximity -I./Source/WebCore/Modules/quota -I./Source/WebCore/Modules/webaudio -I./Source/WebCore/Modules/webdatabase -I./Source/WebCore/Modules/websockets -I./Source/WebCore/accessibility -I./Source/WebCore/bindings -I./Source/WebCore/bindings/generic -I./Source/WebCore/bindings/js -I./Source/WebCore/bridge -I./Source/WebCore/bridge/c -I./Source/WebCore/bridge/jsc -I./Source/WebCore/css -I./Source/WebCore/dom -I./Source/WebCore/dom/default -I./Source/WebCore/editing -I./Source/WebCore/fileapi -I./Source/WebCore/history -I./Source/WebCore/html -I./Source/WebCore/html/canvas -I./Source/WebCore/html/parser -I./Source/WebCore/html/shadow -I./Source/WebCore/html/track -I./Source/WebCore/inspector -I./Source/WebCore/loader -I./Source/WebCore/loader/appcache -I./Source/WebCore/loader/archive -I./Source/WebCore/loader/archive/mhtml -I./Source/WebCore/loader/cache -I./Source/WebCore/loader/icon -I./Source/WebCore/mathml -I./Source/WebCore/page -I./Source/WebCore/page/animation -I./Source/WebCore/page/scrolling -I./Source/WebCore/platform -I./Source/WebCore/platform/animation -I./Source/WebCore/platform/audio -I./Source/WebCore/platform/graphics -I./Source/WebCore/platform/graphics/cpu/arm -I./Source/WebCore/platform/graphics/cpu/arm/filters/ -I./Source/WebCore/platform/graphics/filters -I./Source/WebCore/platform/graphics/filters/texmap -I./Source/WebCore/platform/graphics/freetype -I./Source/WebCore/platform/graphics/gpu -I./Source/WebCore/platform/graphics/harfbuzz -I./Source/WebCore/platform/graphics/harfbuzz/ng -I./Source/WebCore/platform/graphics/opengl -I./Source/WebCore/platform/graphics/opentype -I./Source/WebCore/platform/graphics/transforms -I./Source/WebCore/platform/image-decoders -I./Source/WebCore/platform/image-decoders/bmp -I./Source/WebCore/platform/image-decoders/gif -I./Source/WebCore/platform/image-decoders/ico -I./Source/WebCore/platform/image-decoders/jpeg -I./Source/WebCore/platform/image-decoders/png -I./Source/WebCore/platform/image-decoders/webp -I./Source/WebCore/platform/leveldb -I./Source/WebCore/platform/linux -I./Source/WebCore/platform/mediastream -I./Source/WebCore/platform/mediastream/gstreamer -I./Source/WebCore/platform/mock -I./Source/WebCore/platform/network -I./Source/WebCore/platform/network/gtk -I./Source/WebCore/platform/sql -I./Source/WebCore/platform/text -I./Source/WebCore/platform/text/transcoder -I./Source/WebCore/platform/win -I./Source/WebCore/plugins -I./Source/WebCore/plugins/win -I./Source/WebCore/rendering -I./Source/WebCore/rendering/mathml -I./Source/WebCore/rendering/style -I./Source/WebCore/rendering/svg -I./Source/WebCore/storage -I./Source/WebCore/svg -I./Source/WebCore/svg/animation -I./Source/WebCore/svg/graphics -I./Source/WebCore/svg/graphics/filters -I./Source/WebCore/svg/properties -I./Source/WebCore/testing -I./Source/WebCore/testing/js -I./Source/WebCore/websockets -I./Source/WebCore/workers -I./Source/WebCore/xml -I./Source/WebCore/xml/parser -I./WebCore/bindings/js -I./DerivedSources/WebCore -I./DerivedSources -I./DerivedSources/JavaScriptCore -DDATA_DIR=\"/opt/local/share\" -I./Source/WebCore/platform/graphics/texmap -DWTF_USE_LEVELDB=1 -I./Source/ThirdParty/leveldb -I./Source/ThirdParty/leveldb/include -DENABLE_3D_RENDERING=1 -DENABLE_ACCELERATED_2D_CANVAS=0 -DENABLE_BATTERY_STATUS=0 -DENABLE_BLOB=1 -DENABLE_CANVAS_PATH=1 -DENABLE_CANVAS_PROXY=0 -DENABLE_CHANNEL_MESSAGING=1 -DENABLE_CSP_NEXT=1 -DENABLE_CSS3_TEXT=1 -DENABLE_CSS_BOX_DECORATION_BREAK=1 -DENABLE_CSS_COMPOSITING=0 -DENABLE_CSS_DEVICE_ADAPTATION=0 -DENABLE_CSS_EXCLUSIONS=1 -DENABLE_CSS_FILTERS=1 -DENABLE_CSS_IMAGE_ORIENTATION=1 -DENABLE_CSS_IMAGE_RESOLUTION=1 -DENABLE_CSS_IMAGE_SET=1 -DENABLE_CSS_REGIONS=1 -DENABLE_CSS_SHADERS=1 -DENABLE_CSS_STICKY_POSITION=1 -DENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED=1 -DENABLE_CSS_VARIABLES=1 -DENABLE_CSS3_CONDITIONAL_RULES=0 -DENABLE_CUSTOM_SCHEME_HANDLER=0 -DENABLE_DASHBOARD_SUPPORT=0 -DENABLE_DATALIST_ELEMENT=0 -DENABLE_DATA_TRANSFER_ITEMS=0 -DENABLE_DETAILS_ELEMENT=1 -DENABLE_DEVICE_ORIENTATION=0 -DENABLE_DIALOG_ELEMENT=0 -DENABLE_DIRECTORY_UPLOAD=0 -DENABLE_DOM4_EVENTS_CONSTRUCTOR=1 -DENABLE_DOWNLOAD_ATTRIBUTE=0 -DENABLE_FILE_SYSTEM=0 -DENABLE_FILTERS=1 -DENABLE_FTPDIR=1 -DENABLE_FULLSCREEN_API=1 -DENABLE_GAMEPAD=0 -DENABLE_GEOLOCATION=1 -DENABLE_HIGH_DPI_CANVAS=0 -DENABLE_ICONDATABASE=1 -DENABLE_IFRAME_SEAMLESS=1 -DENABLE_INDEXED_DATABASE=1 -DENABLE_INPUT_SPEECH=0 -DENABLE_INPUT_TYPE_COLOR=0 -DENABLE_INPUT_TYPE_DATE=0 -DENABLE_INPUT_TYPE_DATETIME=0 -DENABLE_INPUT_TYPE_DATETIMELOCAL=0 -DENABLE_INPUT_TYPE_MONTH=0 -DENABLE_INPUT_TYPE_TIME=0 -DENABLE_INPUT_TYPE_WEEK=0 -DENABLE_INSPECTOR=1 -DENABLE_JAVASCRIPT_DEBUGGER=1 -DENABLE_LEGACY_CSS_VENDOR_PREFIXES=0 -DENABLE_LEGACY_NOTIFICATIONS=0 -DENABLE_LEGACY_VENDOR_PREFIXES=1 -DENABLE_LEGACY_WEB_AUDIO=1 -DENABLE_LINK_PREFETCH=1 -DENABLE_LINK_PRERENDER=0 -DENABLE_MATHML=1 -DENABLE_MEDIA_CAPTURE=0 -DENABLE_MEDIA_SOURCE=0 -DENABLE_MEDIA_STATISTICS=0 -DENABLE_MEDIA_STREAM=0 -DENABLE_METER_ELEMENT=1 -DENABLE_MHTML=1 -DENABLE_MICRODATA=1 -DENABLE_MOUSE_CURSOR_SCALE=0 -DENABLE_NAVIGATOR_CONTENT_UTILS=0 -DENABLE_NETSCAPE_PLUGIN_API=1 -DENABLE_NETWORK_INFO=0 -DENABLE_NOTIFICATIONS=0 -DENABLE_ORIENTATION_EVENTS=0 -DENABLE_PAGE_VISIBILITY_API=0 -DENABLE_PERFORMANCE_TIMELINE=1 -DENABLE_PROGRESS_ELEMENT=1 -DENABLE_PROXIMITY_EVENTS=0 -DENABLE_QUOTA=0 -DENABLE_RESOURCE_TIMING=1 -DENABLE_REQUEST_ANIMATION_FRAME=1 -DENABLE_SCRIPTED_SPEECH=0 -DENABLE_SHADOW_DOM=1 -DENABLE_SHARED_WORKERS=1 -DENABLE_SMOOTH_SCROLLING=1 -DENABLE_SPELLCHECK=1 -DENABLE_SQL_DATABASE=1 -DENABLE_STYLE_SCOPED=1 -DENABLE_SVG=1 -DENABLE_SVG_DOM_OBJC_BINDINGS=0 -DENABLE_SVG_FONTS=1 -DENABLE_TEMPLATE_ELEMENT=1 -DENABLE_TEXT_AUTOSIZING=0 -DENABLE_TOUCH_EVENTS=0 -DENABLE_TOUCH_ICON_LOADING=0 -DENABLE_USER_TIMING=1 -DENABLE_VIBRATION=0 -DENABLE_VIDEO=1 -DENABLE_VIDEO_TRACK=1 -DENABLE_WEBGL=1 -DENABLE_WEB_AUDIO=0 -DENABLE_WEB_SOCKETS=1 -DENABLE_WEB_TIMING=1 -DENABLE_WORKERS=1 -DENABLE_XHR_TIMEOUT=1 -DENABLE_XSLT=1 -DWEBKITGTK_API_VERSION_STRING=\"1.0\" -I./Source/WebCore/accessibility/atk -I./Source/WebCore/loader/gtk -I./Source/WebCore/page/gtk -I./Source/WebCore/platform/cairo -I./Source/WebCore/platform/audio/gstreamer -I./Source/WebCore/platform/geoclue -I./Source/WebCore/platform/graphics/cairo -I./Source/WebCore/platform/graphics/freetype -I./Source/WebCore/platform/graphics/glx -I./Source/WebCore/platform/graphics/harfbuzz -I./Source/WebCore/platform/graphics/harfbuzz/ng -I./Source/WebCore/platform/graphics/egl -I./Source/WebCore/platform/graphics/gstreamer -I./Source/WebCore/platform/graphics/gtk -I./Source/WebCore/platform/gtk -I./Source/WebCore/platform/network/soup -I./Source/WebCore/platform/text/enchant -I./Source -I./Source/JavaScriptCore -I./Source/JavaScriptCore/API -I./Source/JavaScriptCore/assembler -I./Source/JavaScriptCore/bytecode -I./Source/JavaScriptCore/bytecompiler -I./Source/JavaScriptCore/dfg -I./Source/JavaScriptCore/disassembler -I./Source/JavaScriptCore/heap -I./Source/JavaScriptCore/debugger -I./Source/JavaScriptCore/ForwardingHeaders -I./Source/JavaScriptCore/interpreter -I./Source/JavaScriptCore/jit -I./Source/JavaScriptCore/jit -I./Source/JavaScriptCore/llint -I./Source/JavaScriptCore/parser -I./Source/JavaScriptCore/profiler -I./Source/JavaScriptCore/runtime -I./Source/JavaScriptCore/tools -I./Source/JavaScriptCore/yarr -I./DerivedSources/JavaScriptCore -I./Source/WTF -fno-strict-aliasing -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng15 -D_REENTRANT -I/opt/local/include/enchant -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/libpng15 -I/opt/local/include/harfbuzz -D_REENTRANT -I/opt/local/include/gail-1.0 -I/opt/local/include/atk-1.0 -I/opt/local/include/gtk-2.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/cairo -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng15 -I/opt/local/include/harfbuzz -I/opt/local/include -I/opt/local/include/dbus-1.0 -I/opt/local/include/libxml2 -I/opt/local/lib/dbus-1.0/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -D_REENTRANT -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -D_REENTRANT -I/opt/local/include/gstreamer-1.0 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -D_REENTRANT -I/opt/local/include/gtk-2.0 -I/opt/local/lib/gtk-2.0/include -I/opt/local/include/atk-1.0 -I/opt/local/include/cairo -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/pango-1.0 -I/opt/local/include/gio-unix-2.0/ -I/opt/local/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/freetype2 -I/opt/local/include/libpng15 -I/opt/local/include/harfbuzz -D_REENTRANT -I/opt/local/include/libsecret-1 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -D_REENTRANT -I/opt/local/include/libsoup-2.4 -I/opt/local/include/libxml2 -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -DGTEST_USE_OWN_TR1_TUPLE=1 -fvisibility-inlines-hidden -fno-rtti -pipe -Os -Wno-c++11-extensions -arch x86_64 -O2 -MT Source/WebCore/plugins/gtk/libWebCoreGtk_la-PluginViewGtk.lo -MD -MP -MF Source/WebCore/plugins/gtk/.deps/libWebCoreGtk_la-PluginViewGtk.Tpo -c Source/WebCore/plugins/gtk/PluginViewGtk.cpp -fno-common -DPIC -o Source/WebCore/plugins/gtk/.libs/libWebCoreGtk_la-PluginViewGtk.o In file included from Source/ThirdParty/leveldb/db/builder.cc:7: In file included from ./Source/ThirdParty/leveldb/db/filename.h:14: In file included from ./Source/ThirdParty/leveldb/port/port.h:14: ./Source/ThirdParty/leveldb/port/port_posix.h:41:12: fatal error: 'endian.h' file not found #include <endian.h> ^
Attachments
config.log (74.56 KB, text/plain)
2013-03-07 22:34 PST, Jeremy Huddleston Sequoia
no flags
Patch (4.44 KB, patch)
2013-03-20 16:37 PDT, Martin Robinson
no flags
Patch (4.30 KB, patch)
2013-03-20 16:41 PDT, Martin Robinson
no flags
Jeremy Huddleston Sequoia
Comment 1 2013-03-07 20:46:54 PST
It looks like OS_MACOSX is undefined for some reason...
Jeremy Huddleston Sequoia
Comment 2 2013-03-07 20:49:10 PST
And sorry, the leading compilation line is from the wrong one due to a parallel build... It looks like the problem is that Source/ThirdParty/leveldb/db/builder.cc doesn't include the config.h file, so you always fall through to the else case of including <endian.h>
Jeremy Huddleston Sequoia
Comment 3 2013-03-07 20:55:41 PST
Actually, it looks like OS_MACOSX isn't really a valid preprocessor macro ... I was getting confused with the WTF_ prefixed macros ... in any event, I'm working around this by just defining OS_MACOSX, but this should be fixed in a portable way.
Martin Robinson
Comment 4 2013-03-07 21:39:35 PST
(In reply to comment #3) > Actually, it looks like OS_MACOSX isn't really a valid preprocessor macro ... I was getting confused with the WTF_ prefixed macros ... in any event, I'm working around this by just defining OS_MACOSX, but this should be fixed in a portable way. This seems to be a valid issue with the LevelDB build for WebKitGTK+, but LevelDB shouldn't be enabled unless indexed database is enabled. It seems that indexed database is enabled for your build so there's another bug here too, since it shouldn't be enabled for release builds.
Martin Robinson
Comment 5 2013-03-07 22:23:14 PST
(In reply to comment #3) > Actually, it looks like OS_MACOSX isn't really a valid preprocessor macro ... I was getting confused with the WTF_ prefixed macros ... in any event, I'm working around this by just defining OS_MACOSX, but this should be fixed in a portable way. Yes, it's likely that we just need to add OS_MACOSX for Mac builds. I'm still a bit surprised that indexed database is enabled for your build. There's no way to turn it on via configure. Did you have some previous configuration hanging around?
Jeremy Huddleston Sequoia
Comment 6 2013-03-07 22:33:53 PST
(In reply to comment #5) > (In reply to comment #3) > > Actually, it looks like OS_MACOSX isn't really a valid preprocessor macro ... I was getting confused with the WTF_ prefixed macros ... in any event, I'm working around this by just defining OS_MACOSX, but this should be fixed in a portable way. > > Yes, it's likely that we just need to add OS_MACOSX for Mac builds. I'm still a bit surprised that indexed database is enabled for your build. There's no way to turn it on via configure. Did you have some previous configuration hanging around? No, this is from completely clean. I'll attach config.log for: ./configure --prefix=/opt/local --with-gtk=2.0 --disable-webkit2 --disable-introspection --enable-svg --enable-geolocation --enable-webgl --enable-video
Jeremy Huddleston Sequoia
Comment 7 2013-03-07 22:34:25 PST
Created attachment 192147 [details] config.log
Jeremy Huddleston Sequoia
Comment 8 2013-03-07 22:38:48 PST
# For the moment we need to check whether or not indexed database is # enabled because it determines if we build leveldb or not. AM_WEBKIT_FEATURE_CONDITIONAL([ENABLE_INDEXED_DATABASE]) That just seems to grep for it in Source/WebCore/GNUmakefile.features.am and sure enough that file has ENABLE_INDEXED_DATABASE=1
Jeremy Huddleston Sequoia
Comment 9 2013-03-07 22:39:26 PST
So it seems like ENABLE_INDEXED_DATABASE is just enabled everywhere...
Martin Robinson
Comment 10 2013-03-14 16:56:52 PDT
(In reply to comment #9) > So it seems like ENABLE_INDEXED_DATABASE is just enabled everywhere... This seems to have been an issue with a stale feature profile in the unstable release. We've fixed that, so it shouldn't be an issue. We still need to fix the OS X build of leveldb though.
Martin Robinson
Comment 11 2013-03-20 16:37:32 PDT
Martin Robinson
Comment 12 2013-03-20 16:41:21 PDT
Jeremy, perhaps you could verify the patch I posted works on your system?
Martin Robinson
Comment 13 2013-03-20 16:41:42 PDT
WebKit Review Bot
Comment 14 2013-03-21 07:58:37 PDT
Comment on attachment 194144 [details] Patch Clearing flags on attachment: 194144 Committed r146468: <http://trac.webkit.org/changeset/146468>
WebKit Review Bot
Comment 15 2013-03-21 07:58:41 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.