Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsc build broken #1093

Closed
inferno-chromium opened this issue Jan 19, 2018 · 7 comments
Closed

jsc build broken #1093

inferno-chromium opened this issue Jan 19, 2018 · 7 comments
Assignees

Comments

@inferno-chromium
Copy link
Collaborator

https://oss-fuzz-build-logs.storage.googleapis.com/index.html

Step #4: In file included from ../../Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:28:
Step #4: In file included from ../../Source/JavaScriptCore/bytecode/ArrayProfile.h:28:
Step #4: In file included from ../../Source/JavaScriptCore/runtime/ConcurrentJSLock.h:28:
Step #4: In file included from ../../Source/JavaScriptCore/heap/DeferGC.h:29:
Step #4: In file included from ../../Source/JavaScriptCore/heap/Heap.h:24:
Step #4: In file included from ../../Source/JavaScriptCore/runtime/ArrayBuffer.h:35:
Step #4: In file included from ../../Source/WTF/wtf/text/WTFString.h:31:
Step #4: ../../Source/WTF/wtf/text/StringImpl.h:27:10: fatal error: 'unicode/ustring.h' file not found
Step #4: #include <unicode/ustring.h>
Step #4: ^~~~~~~~~~~~~~~~~~~
Step #4: 1 error generated.
Step #4: ninja: build stopped: subcommand failed.
Finished Step #4
ERROR
ERROR: build step 4 "gcr.io/oss-fuzz/jsc" failed: exit status 1

@ddkilzer
Copy link

Step #4: FAILED: /usr/local/bin/clang++   -DBUILDING_JSCONLY__ -DBUILDING_WITH_CMAKE=1 -DHAVE_CONFIG_H=1 -DSTATICALLY_LINKED_WITH_WTF -I. -I../../Source/JavaScriptCore -I../../Source/JavaScriptCore/.. -I../../Source/JavaScriptCore/API -I../../Source/JavaScriptCore/ForwardingHeaders -I../../Source/JavaScriptCore/assembler -I../../Source/JavaScriptCore/b3 -I../../Source/JavaScriptCore/b3/air -I../../Source/JavaScriptCore/bindings -I../../Source/JavaScriptCore/builtins -I../../Source/JavaScriptCore/bytecode -I../../Source/JavaScriptCore/bytecompiler -I../../Source/JavaScriptCore/dfg -I../../Source/JavaScriptCore/disassembler -I../../Source/JavaScriptCore/disassembler/udis86 -I../../Source/JavaScriptCore/disassembler/ARM64 -I../../Source/JavaScriptCore/domjit -I../../Source/JavaScriptCore/ftl -I../../Source/JavaScriptCore/heap -I../../Source/JavaScriptCore/debugger -I../../Source/JavaScriptCore/inspector -I../../Source/JavaScriptCore/inspector/agents -I../../Source/JavaScriptCore/inspector/augmentable -I../../Source/JavaScriptCore/inspector/remote -I../../Source/JavaScriptCore/interpreter -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/wasm -I../../Source/JavaScriptCore/wasm/js -I../../Source/JavaScriptCore/yarr -IDerivedSources/ForwardingHeaders -IDerivedSources/JavaScriptCore -IDerivedSources/JavaScriptCore/inspector -IDerivedSources/JavaScriptCore/runtime -IDerivedSources/JavaScriptCore/yarr -I../../Source/bmalloc -I../../Source/WTF -IDerivedSources -I../../Source/ThirdParty -fdiagnostics-color=always -fcolor-diagnostics -Wno-parentheses-equality -Wno-noexcept-type -Qunused-arguments -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -Wextra -Wall -O1 -fno-omit-frame-pointer -gline-tables-only -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -fsanitize=address -fsanitize-address-use-after-scope  -stdlib=libc++ -DU_STATIC_IMPLEMENTATION  -fno-strict-aliasing -fno-exceptions -std=c++14 -fno-rtti -gsplit-dwarf -g -fPIE -MMD -MT Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o -MF Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o.d -o Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/llint/LLIntOffsetsExtractor.cpp.o -c ../../Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp
Step #4: In file included from ../../Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp:28:
Step #4: In file included from ../../Source/JavaScriptCore/bytecode/ArrayProfile.h:28:
Step #4: In file included from ../../Source/JavaScriptCore/runtime/ConcurrentJSLock.h:28:
Step #4: In file included from ../../Source/JavaScriptCore/heap/DeferGC.h:29:
Step #4: In file included from ../../Source/JavaScriptCore/heap/Heap.h:24:
Step #4: In file included from ../../Source/JavaScriptCore/runtime/ArrayBuffer.h:35:
Step #4: In file included from ../../Source/WTF/wtf/text/WTFString.h:31:
Step #4: ../../Source/WTF/wtf/text/StringImpl.h:27:10: fatal error: 'unicode/ustring.h' file not found
Step #4: #include <unicode/ustring.h>
Step #4:          ^~~~~~~~~~~~~~~~~~~
Step #4: 1 error generated.
Step #4: ninja: build stopped: subcommand failed.
Finished Step #4

The WPE and GTK Linux ports are compiling without errors on WebKit's buildbots (scroll to the bottom), although they aren't doing clean builds every time: https://build.webkit.org/dashboard/

Is the <unicode/ustring.h> header installed with the ICU package(s) on the builder?

It appears that the compiler command for Source/JavaScriptCore/llint/LLIntOffsetsExtractor.cpp is not including a path to the ICU headers. If so, this may be a CMake configuration issue, and Source/JavaScriptCore/CMakeLists.txt may need something like this for the LLIntOffsetsExtractor target:

set(JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES
    "${ICU_INCLUDE_DIRS}"
)

@ddkilzer
Copy link

@ddkilzer
Copy link

I added a patch to WebKit Bug 181871: https://bugs.webkit.org/attachment.cgi?id=331769

Can you test it to see if that fixes the build failure?

@ddkilzer
Copy link

Latest patch (fixed bug title in ChangeLog): https://bugs.webkit.org/attachment.cgi?id=331770

@inferno-chromium
Copy link
Collaborator Author

Yes that cl works.

You can also test this by

python infra/helper.py build_fuzzers jsc
see compile failure

python infra/helper.py shell jsc
echo "target_include_directories(LLIntOffsetsExtractor SYSTEM PUBLIC ${JavaScriptCore_SYSTEM_INCLUDE_DIRECTORIES})" >> Source/JavaScriptCore/CMakeLists.txt
compile

@inferno-chromium
Copy link
Collaborator Author

@jfbastien - as fyi and keeping info here for future reference.

@ddkilzer
Copy link

Fixed by WebKit trunk commit:
Committed r227233: https://trac.webkit.org/changeset/227233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants