[Webkit-unassigned] [Bug 155427] [GTK] Fails to build randomly when generating LLIntDesiredOffsets.h

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 27 00:51:48 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=155427

--- Comment #1 from Alberto Garcia <berto at igalia.com> ---
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160427/17d71b06/attachment.html>


More information about the webkit-unassigned mailing list