trevorlinton / webkit.js

Pure JavaScript Port of WebKit
1.95k stars 87 forks source link

Build error: 'curlbuild.h' file not found #40

Open Macil opened 8 years ago

Macil commented 8 years ago

I get this error while attempting to build webkit.js:

[7/593] CXX obj/deps/WebKit/Source/Web...work/webcore_platform.ResourceHandle.o
FAILED: /Users/chris/Coding/webkit.js/install-tools/emsdk_portable/emscripten/tag-1.35.7/em++ -MMD -MF obj/deps/WebKit/Source/WebCore/platform/network/webcore_platform.ResourceHandle.o.d -DENABLE_CALENDAR_PICKER=0 -DENABLE_FAST_MOBILE_SCROLLING=0 -DENABLE_LEGACY_NOTIFICATIONS=0 -DENABLE_MEDIA_CAPTURE=0 -DENABLE_NOTIFICATIONS=0 -DENABLE_ORIENTATION_EVENTS=0 -DENABLE_PRINTING=0 -DENABLE_NAVIGATOR_CONTENT_UTILS=0 -DENABLE_3D_RENDERING=1 -DENABLE_ACCELERATED_2D_CANVAS=0 -DENABLE_ACCELERATED_OVERFLOW_SCROLLING=1 -DENABLE_BLOB=0 -DENABLE_CACHE_PARTITIONING=0 -DENABLE_CANVAS_PATH=1 -DENABLE_CANVAS_PROXY=0 -DENABLE_CHANNEL_MESSAGING=1 -DENABLE_CSP_NEXT=0 -DENABLE_CSS_BOX_DECORATION_BREAK=1 -DENABLE_CSS_COMPOSITING=1 -DENABLE_CSS_DEVICE_ADAPTATION=0 -DENABLE_CSS_EXCLUSIONS=1 -DENABLE_CSS_FILTERS=1 -DENABLE_CSS_IMAGE_ORIENTATION=0 -DENABLE_CSS_IMAGE_RESOLUTION=1 -DENABLE_CSS_REGIONS=1 -DENABLE_CSS_SHADERS=1 -DENABLE_CSS_SHAPES=1 -DENABLE_CSS_STICKY_POSITION=1 -DENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED=1 -DENABLE_CSS3_CONDITIONAL_RULES=0 -DENABLE_CSS3_TEXT=1 -DENABLE_CSS3_TEXT_DECORATION=1 -DENABLE_CSS3_TEXT_LINE_BREAK=1 -DENABLE_CURSOR_VISIBILITY=1 -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_DIRECTORY_UPLOAD=0 -DENABLE_DOM4_EVENTS_CONSTRUCTOR=0 -DENABLE_DRAGGABLE_REGION=0 -DENABLE_DRAG_SUPPORT=0 -DENABLE_ENCRYPTED_MEDIA=0 -DENABLE_ENCRYPTED_MEDIA_V2=0 -DENABLE_FILTERS=1 -DENABLE_FONT_LOAD_EVENTS=0 -DENABLE_FULLSCREEN_API=0 -DENABLE_GAMEPAD=0 -DENABLE_GEOLOCATION=0 -DENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING=0 -DENABLE_HIGH_DPI_CANVAS=1 -DENABLE_ICONDATABASE=0 -DENABLE_IFRAME_SEAMLESS=0 -DENABLE_INDEXED_DATABASE=0 -DENABLE_INDIE_UI=0 -DENABLE_INPUT_SPEECH=0 -DENABLE_INPUT_TYPE_COLOR=0 -DENABLE_INPUT_TYPE_COLOR_POPOVER=0 -DENABLE_INPUT_TYPE_DATE=0 -DENABLE_INPUT_TYPE_DATETIME_INCOMPLETE=0 -DENABLE_INPUT_TYPE_DATETIMELOCAL=0 -DENABLE_INPUT_TYPE_MONTH=0 -DENABLE_INPUT_TYPE_TIME=0 -DENABLE_INPUT_TYPE_WEEK=0 -DENABLE_IOS_AIRPLAY=0 -DENABLE_IOS_TEXT_AUTOSIZING=0 -DENABLE_JAVASCRIPT_DEBUGGER=0 -DENABLE_LEGACY_CSS_VENDOR_PREFIXES=1 -DENABLE_LEGACY_VENDOR_PREFIXES=1 -DENABLE_LEGACY_WEB_AUDIO=0 -DENABLE_LETTERPRESS=0 -DENABLE_LINK_PREFETCH=0 -DENABLE_MATHML=0 -DENABLE_MEDIA_CONTROLS_SCRIPT=0 -DENABLE_MEDIA_SOURCE=0 -DENABLE_MEDIA_STATISTICS=0 -DENABLE_METER_ELEMENT=0 -DENABLE_MHTML=0 -DENABLE_MOUSE_CURSOR_SCALE=0 -DENABLE_NOSNIFF=0 -DENABLE_PAGE_VISIBILITY_API=0 -DENABLE_PDFKIT_PLUGIN=0 -DENABLE_PLUGIN_PROXY_FOR_VIDEO=0 -DENABLE_PROGRESS_ELEMENT=1 -DENABLE_PROMISES=0 -DENABLE_PROXIMITY_EVENTS=0 -DENABLE_PUBLIC_SUFFIX_LIST=1 -DENABLE_QUOTA=0 -DENABLE_REQUEST_ANIMATION_FRAME=1 -DENABLE_REMOTE_INSPECTOR=0 -DENABLE_RESOLUTION_MEDIA_QUERY=0 -DENABLE_SCRIPTED_SPEECH=0 -DENABLE_SHADOW_DOM=0 -DENABLE_SHARED_WORKERS=0 -DENABLE_SPEECH_SYNTHESIS=0 -DENABLE_SQL_DATABASE=0 -DENABLE_SUBPIXEL_LAYOUT=1 -DENABLE_SUBTLE_CRYPTO=0 -DENABLE_SVG=1 -DENABLE_SVG_FONTS=1 -DENABLE_TEMPLATE_ELEMENT=1 -DENABLE_TEXT_AUTOSIZING=0 -DENABLE_THREADED_HTML_PARSER=0 -DENABLE_TOUCH_EVENTS=0 -DENABLE_TOUCH_ICON_LOADING=0 -DENABLE_USERSELECT_ALL=0 -DENABLE_VIDEO=0 -DENABLE_VIDEO_TRACK=0 -DENABLE_VIEW_MODE_CSS_MEDIA=0 -DENABLE_WEBGL=1 -DENABLE_WEB_ANIMATIONS=1 -DENABLE_WEB_AUDIO=0 -DENABLE_WEB_SOCKETS=0 -DENABLE_WEB_TIMING=0 -DENABLE_WORKERS=0 -DENABLE_XHR_TIMEOUT=0 -DENABLE_XSLT=0 -DENABLE_FTL_JIT=0 -DENABLE_JIT=0 -DENABLE_LLINT_C_LOOP=0 -DENABLE_LLINT=0 -DENABLE_GC_LOGGING=0 -DENABLE_SUPER_REGION=0 -DENABLE_DEBUG_JSSTACK=0 -DENABLE_INSPECTOR=0 -DENABLE_VMINSPECTOR=0 -DENABLE_ASSEMBLER=0 -DENABLE_DFG_REGISTER_ALLOCATION_VALIDATION=0 -DENABLE_DFG_JIT=0 -DENABLE_YARR_JIT=0 -DENABLE_BRANCH_COMPACTION=0 -DENABLE_DISASSEMBLER=0 -DENABLE_PARALLEL_GC=0 -DENABLE_OPCODE_STATS=0 -DENABLE_CODEBLOCK_SAMPLING=0 -DENABLE_BYTECODE_COMMENTS=0 -DENABLE_DEBUG_WITH_BREAKPOINT=0 -DENABLE_OBJECT_MARK_LOGGING=0 -DENABLE_GLOBAL_FASTMALLOC_NEW=0 -DWTF_PLATFORM_JS=1 -DWTF_PLATFORM_NIX=0 -DWTF_PLATFORM_WIN=0 -DWTF_PLATFORM_MAC=0 -DWTF_PLATFORM_IOS=0 -DWTF_PLATFORM_EFL=0 -DWTF_PLATFORM_X11=0 -DWTF_PLATFORM_GTK=0 -DWTF_PLATFORM_BLACKBERRY=0 -DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1 -DWTF_USE_GLIB=0 -DWTF_USE_LEVELDB=0 -DWTF_USE_NATIVE_FULLSCREEN_VIDEO=0 -DWTF_USE_WEBAUDIO_FFMPEG=0 -DWTF_USE_FASTMALLOC=0 -DWTF_USE_FAST_MALLOC=0 -DENABLE_NETSCAPE_PLUGIN_API=0 -DWTF_USE_PTHREADS=1 -DWTF_USE_WEB_THREAD=0 -DWTF_USE_FREETYPE=1 -DWTF_USE_HARFBUZZ=1 -DWTF_USE_CAIRO=1 -DWTF_USE_SKIA=0 -DWTF_USE_ICU_UNICODE=0 -DWTF_USE_WCHAR_UNICODE=1 -DWTF_USE_OPENGL=1 -DWTF_USE_OPENGL_ES_2=1 -DWTF_USE_EGL=1 -DWTF_USE_ACCELERATED_COMPOSITING=1 -DWTF_USE_GLX=0 -DWTF_USE_3D_GRAPHICS=1 -DWTF_USE_TEXTURE_MAPPER=1 -DWTF_USE_TEXTURE_MAPPER_GL=1 -DWTF_USE_TILED_BACKING_STORE=1 -DWTF_USE_COORDINATED_GRAPHICS=0 -DWTF_USE_GRAPHICS_SURFACE=0 -DENABLE_TEXTURE_MAPPER=1 -DENABLE_TEXTURE_MAPPER_GL=1 -DWTF_USE_UNIX_DOMAIN_SOCKETS=0 -DWTF_USE_CURL=1 -DCAIRO_HAS_FT_FONT -DCAIRO_HAS_FC_FONT -DCAIRO_HAS_EGL_FUNCTIONS -DNDEBUG -DTARGET_EMSCRIPTEN -D__EMSCRIPTEN__ -I/Users/chris/Coding/webkit.js/install-tools/emsdk_portable/emscripten/tag-1.35.7/system/include -I/Users/chris/Coding/webkit.js/install-tools/emsdk_portable/emscripten/tag-1.35.7/system/include/GLES2 -I/Users/chris/Coding/webkit.js/install-tools/emsdk_portable/emscripten/tag-1.35.7/system/include/EGL -I../deps/WebKit/Source/WTF -I../deps/zlib -I../deps/libpng -I../deps/WebKit/Source/WTF/wtf -Igen/WebCore -Igen/WebCore/bindings -I../deps/WebKit/Source/WebCore/accessibility -I../deps/WebKit/Source/WebCore/bridge -I../deps/WebKit/Source/WebCore/dom -I../deps/WebKit/Source/WebCore/css -I../deps/WebKit/Source/WebCore/icu -I../deps/WebKit/Source/WebCore/history -I../deps/WebKit/Source/WebCore/html -I../deps/WebKit/Source/WebCore/html/canvas -I../deps/WebKit/Source/WebCore/html/forms -I../deps/WebKit/Source/WebCore/html/parser -I../deps/WebKit/Source/WebCore/html/shadow -I../deps/WebKit/Source/WebCore/loader -I../deps/WebKit/Source/WebCore/loader/archive -I../deps/WebKit/Source/WebCore/loader/cache -I../deps/WebKit/Source/WebCore/loader/icon -I../deps/WebKit/Source/WebCore/editing -I../deps/WebKit/Source/WebCore/inspector -I../deps/WebKit/Source/WebCore/style -I../deps/WebKit/Source/WebCore/storage -I../deps/WebKit/Source/WebCore/page -I../deps/WebKit/Source/WebCore/page/animation -I../deps/WebKit/Source/WebCore/page/scrolling -I../deps/WebKit/Source/WebCore/page/scrolling/coordinatedgraphics -I../deps/WebKit/Source/WebCore/fileapi -I../deps/WebKit/Source/WebCore/platform -I../deps/WebKit/Source/WebCore/platform/animation -I../deps/WebKit/Source/WebCore/platform/network -I../deps/WebKit/Source/WebCore/platform/network/curl -I../deps/WebKit/Source/WebCore/platform/image-decoders -I../deps/WebKit/Source/WebCore/platform/image-decoders/bmp -I../deps/WebKit/Source/WebCore/platform/image-decoders/gif -I../deps/WebKit/Source/WebCore/platform/image-decoders/png -I../deps/WebKit/Source/WebCore/platform/image-decoders/ico -I../deps/WebKit/Source/WebCore/platform/image-decoders/jpeg -I../deps/WebKit/Source/WebCore/platform/graphics -I../deps/WebKit/Source/WebCore/platform/graphics/opengl -I../deps/WebKit/Source/WebCore/platform/graphics/surfaces -I../deps/WebKit/Source/WebCore/platform/graphics/filters -I../deps/WebKit/Source/WebCore/platform/graphics/transforms -I../deps/WebKit/Source/WebCore/platform/graphics/cairo -I../deps/WebKit/Source/WebCore/platform/graphics/gpu -I../deps/WebKit/Source/WebCore/platform/graphics/opentype -I../deps/WebKit/Source/WebCore/platform/graphics/freetype -I../deps/WebKit/Source/WebCore/platform/graphics/harfbuzz -I../deps/WebKit/Source/WebCore/platform/graphics/egl -I../deps/WebKit/Source/WebCore/platform/graphics/surfaces/egl -I../deps/WebKit/Source/WebCore/platform/graphics/texmap -I../deps/WebKit/Source/WebCore/platform/graphics/texmap/coordinated -I../deps/WebKit/Source/WebCore/platform/graphics/cpu/arm/filters -I../deps/WebKit/Source/WebCore/platform/mock -I../deps/WebKit/Source/WebCore/platform/sql -I../deps/WebKit/Source/WebCore/platform/text -I../deps/WebKit/Source/WebCore/platform/audio -I../deps/WebKit/Source/WebCore/rendering -I../deps/WebKit/Source/WebCore/rendering/shapes -I../deps/WebKit/Source/WebCore/rendering/style -I../deps/WebKit/Source/WebCore/rendering/svg -I../deps/WebKit/Source/WebCore/rendering/line -I../deps/WebKit/Source/WebCore/svg -I../deps/WebKit/Source/WebCore/svg/animation -I../deps/WebKit/Source/WebCore/svg/properties -I../deps/WebKit/Source/WebCore/svg/graphics -I../deps/WebKit/Source/WebCore/svg/graphics/filters -I../deps/WebKit/Source/WebCore -I../deps/WebKit/Source/WebCore/xml -I../deps/WebKit/Source/WebCore/Modules/websockets -I../deps/WebKit/Source/WebCore/Modules/webdatabase -I../deps/WebKit/Source/WebCore/Modules/speech -I../deps/WebKit/Source/WebCore/workers -I../deps/WebKit/Source/WebCore/xml/parser -I../deps/WebKit/Source/WebCore/plugins -I../deps/WebKit/Source/WebCore/mathml -I../deps/WebKit/Source/WebCore/bindings/generic -I../deps/WebKit/Source/WebCore/bridge/jsc -I../deps/WebKit/Source/WebCore/loader/appcache -I../deps/WebKit/Source/JavaScriptCore -I../deps/WebKit/Source/JavaScriptCore/API -I../deps/WebKit/Source/JavaScriptCore/bytecode -I../deps/WebKit/Source/JavaScriptCore/assembler -I../deps/WebKit/Source/JavaScriptCore/debugger -I../deps/WebKit/Source/JavaScriptCore/disassembler -I../deps/WebKit/Source/JavaScriptCore/dfg -I../deps/WebKit/Source/JavaScriptCore/heap -I../deps/WebKit/Source/JavaScriptCore/inspector -I../deps/WebKit/Source/JavaScriptCore/interpreter -I../deps/WebKit/Source/JavaScriptCore/jit -I../deps/WebKit/Source/JavaScriptCore/llint -I../deps/WebKit/Source/JavaScriptCore/parser -I../deps/WebKit/Source/JavaScriptCore/profiler -I../deps/WebKit/Source/JavaScriptCore/runtime -I../deps/WebKit/Source/WebCore/testing -I../deps/WebKit/Source/WebCore/bindings/js -I../deps/WebKit/Source/WebCore/bindings -I../deps/WebKit/Source/WebCore/crypto -I../deps/WebKit/Source/WebCore/Modules/geolocation -I../deps/WebKit/Source/WebCore/Modules/notifications -I../deps/WebKit/Source/WebCore/Modules/indexeddb -I../deps/WebKit/Source/WebCore/Modules/mediasource -I../deps/WebKit/Source/WebCore/Modules/mediastream -I../deps/WebKit/Source/WebCore/Modules/quota -I../deps/WebKit/Source/WebCore/Modules/plugins -I../deps/WebKit/Source/WebCore/Modules/indexeddb/leveldb -I../src/WebCoreDerived -I../src/WebCoreSupport -I../deps/harfbuzz/src -I../deps/freetype/include -I../deps/libjpeg_turbo -I../deps/curl/include -I../deps/cairo -I../deps/cairo/src -I../deps/libxml2/include -I../deps/WebKit/Source/ThirdParty/ANGLE/src -I../deps/WebKit/Source/ThirdParty/ANGLE/include -I../deps/fontconfig -include ../deps/WebKit/Source/WebCore/WebCorePrefix.h -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 -U__APPLE__ -U__WIN32__ -Ulinux -Wno-warn-absolute-paths -fshort-wchar -isysroot /Users/chris/Coding/webkit.js/install-tools/emsdk_portable/emscripten/tag-1.35.7/system/ -Oz -std=c++0x  -c ../deps/WebKit/Source/WebCore/platform/network/ResourceHandle.cpp -o obj/deps/WebKit/Source/WebCore/platform/network/webcore_platform.ResourceHandle.o
In file included from ../deps/WebKit/Source/WebCore/platform/network/ResourceHandle.cpp:28:
In file included from ../deps/WebKit/Source/WebCore/platform/network/ResourceHandleInternal.h:46:
../deps/curl/include/curl/curl.h:34:10: fatal error: 'curlbuild.h' file not found
#include "curlbuild.h"       /* libcurl build definitions */
         ^
1 error generated.
ERROR:root:compiler frontend failed to generate LLVM bitcode, halting
Macil commented 8 years ago

I worked around the issue by the following. This should be documented or automated.

cd deps/curl
./buildconf
emconfigure ./configure

and then I edited include/curl/curlbuild.h (not sure why emconfigure didn't prevent this issue) to have the following:

#define CURL_SIZEOF_LONG 4

Not completely sure if that's sufficient to get a working build. This gets me past the curl-related build errors just to the next error.

gabebear commented 5 years ago

Forcing 32bit got me past this.

emconfigure ./configure "CFLAGS=-m32" "CXXFLAGS=-m32" "LDFLAGS=-m32"