WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
155427
[GTK] Fails to build randomly when generating LLIntDesiredOffsets.h
https://bugs.webkit.org/show_bug.cgi?id=155427
Summary
[GTK] Fails to build randomly when generating LLIntDesiredOffsets.h
Alberto Garcia
Reported
2016-03-14 02:23:45 PDT
Created
attachment 273945
[details]
Full build log (ppc64el) This error doesn't happen often, but I've seen it a few times. The last one with webkitgtk 2.10.8: [ 4%] Generating ../../DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h cd /«PKGBUILDDIR»/obj-powerpc64le-linux-gnu/Source/JavaScriptCore && /usr/bin/ruby /«PKGBUILDDIR»/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb -I/«PKGBUILDDIR»/obj-powerpc64le-linux-gnu/DerivedSources/JavaScriptCore/ /«PKGBUILDDIR»/Source/JavaScriptCore/llint/LowLevelInterpreter.asm /«PKGBUILDDIR»/obj-powerpc64le-linux-gnu/DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h /«PKGBUILDDIR»/Source/JavaScriptCore/offlineasm/parser.rb:64:in `processIncludeOptions': undefined method `[]' for nil:NilClass (NoMethodError) from /«PKGBUILDDIR»/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb:37:in `<main>' Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/build.make:86: recipe for target 'DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h' failed make[3]: *** [DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h] Error 1 make[3]: Leaving directory '/«PKGBUILDDIR»/obj-powerpc64le-linux-gnu' CMakeFiles/Makefile2:440: recipe for target 'Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/all' failed make[2]: *** [Source/JavaScriptCore/CMakeFiles/LLIntOffsetsExtractor.dir/all] Error 2 make[2]: *** Waiting for unfinished jobs.... This was built with make -j4. I'm attaching the full build log.
Attachments
Full build log (ppc64el)
(33.43 KB, application/x-xz)
2016-03-14 02:23 PDT
,
Alberto Garcia
no flags
Details
Patch
(1.42 KB, patch)
2016-04-27 00:54 PDT
,
Alberto Garcia
cgarcia
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alberto Garcia
Comment 1
2016-04-27 00:51:48 PDT
I found the problem. This is the line that fails: /usr/bin/ruby /«PKGBUILDDIR»/Source/JavaScriptCore/offlineasm/generate_offset_extractor.rb -I/«PKGBUILDDIR»/obj-i586-kfreebsd-gnu/DerivedSources/JavaScriptCore/ /«PKGBUILDDIR»/Source/JavaScriptCore/llint/LowLevelInterpreter.asm /«PKGBUILDDIR»/obj-i586-kfreebsd-gnu/DerivedSources/JavaScriptCore/LLIntDesiredOffsets.h This piece of code takes all -I arguments and puts them in the includeDirs list: def self.processIncludeOptions() while ARGV[0][/-I/] path = ARGV.shift[2..-1] if not path path = ARGV.shift end @@includeDirs << (path + "/") end end Since the last command-line arguments are not include directories but paths to files, the "while ARGV[0][/-I/]" condition will return false and the loop will exit. However in Debian the name of the build directory is generated randomly and it can happen to contain the "-I" string (e.g. '/tmp/build/webkit2gtk-IKCuVo'). The above code will treat that as an include dir and will continue looping. After all command-line arguments are parsed, ARGV[0] will be nil and ARGV[0][/-I/] will throw the "undefined method" error.
Alberto Garcia
Comment 2
2016-04-27 00:54:04 PDT
Created
attachment 277456
[details]
Patch And here's the patch. I think it's simple enough but someone with better ruby-fu than me please correct me if there's a better way to do it.
Carlos Garcia Campos
Comment 3
2016-04-27 03:07:21 PDT
Comment on
attachment 277456
[details]
Patch I have no idea about ruby, but this looks simple enough.
Alberto Garcia
Comment 4
2016-04-27 04:12:12 PDT
Committed
r200125
: <
http://trac.webkit.org/changeset/200125
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug