Bug 229491 - postprocess-asm/resolve-asm-file-conflicts.rb build failure with GCC 11.1.0
Summary: postprocess-asm/resolve-asm-file-conflicts.rb build failure with GCC 11.1.0
Status: RESOLVED DUPLICATE of bug 228267
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Linux
: P2 Normal
Assignee: Michael Catanzaro
Depends on:
Reported: 2021-08-25 02:16 PDT by Adrian Perez
Modified: 2021-08-30 09:07 PDT (History)
3 users (show)

See Also:

Patch for landing (1.41 KB, patch)
2021-08-30 08:17 PDT, Michael Catanzaro
mcatanzaro: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2021-08-25 02:16:40 PDT
Today trying to build WebKitGTK 2.33.3 with GCC 11.1.0 this error was produced
(reformatted for clarity):

  Source/JavaScriptCore/CMakeFiles/LowLevelInterpreterLib.dir/llint/LowLevelInterpreter.cpp.s: Assembler messages:
    Error: file table slot 1 is already occupied by a different file
      (/home/aperez/webkitgtk-2.33.3/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp vs

While this was building 2.33.3, currently the “resolve-asm-conflicts.rb” script
is the same in trunk, so we have the issue there as well.

I got past the issue with the following, but I think it's not a correct solution
at all:

--- /home/aperez/WebKit/Source/JavaScriptCore/Scripts/resolve-asm-file-conflicts.rb	2021-03-25 16:41:56.741540337 +0200
+++ ./Source/JavaScriptCore/Scripts/resolve-asm-file-conflicts.rb	2021-08-25 12:07:38.225428021 +0300
@@ -86,8 +87,10 @@
     if not @s.eos?
       return ParseResultError.new("Expected end of line after #{ret2.str}")
-    return ParseResultSuccess.new((Pathname.new(ret1.str) / ret2.str).cleanpath.to_s)
+    # return ParseResultSuccess.new((Pathname.new(ret1.str) / ret2.str).cleanpath.to_s)
+    return ParseResultSuccess.new(Pathname.new(ret1.str).cleanpath.to_s)
   def parse_string_literal
     if @s.scan(/"/).nil?
       err = "Expected string literal at `#{@s.string}` (pos #{@s.pos})"
@@ -395,7 +399,7 @@
 # First, make sure our tests still pass. This only takes a fraction of
 # our runtime and ensures the tests will get run by anyone trying out
 # changes to this file.
+# selftest
 if ARGV.size != 2
   $stderr.puts("Usage: #{$0} input output")
Comment 1 Adrian Perez 2021-08-25 02:17:43 PDT
The last time the script was touched was in bug #223136 so CC'ing
Angelos in case he has some idea on how to go about this :)
Comment 2 Michael Catanzaro 2021-08-30 08:17:45 PDT
Unfortunately I didn't notice this because I had added -DGCC_OFFLINEASM_SOURCE_MAP=OFF to my build script in order to facilitate building. Now that I've removed it, I cannot build anymore due to this issue. I'm going to turn this option off for now in an unreviewed commit, to get the build working again for now.

I'm bamboozled as to why this didn't break any Fedora or GNOME builds.
Comment 3 Michael Catanzaro 2021-08-30 08:17:58 PDT
Created attachment 436773 [details]
Patch for landing
Comment 4 Michael Catanzaro 2021-08-30 08:19:29 PDT
Apparently it's already fixed in bug #228267. We just forgot to land that patch.

*** This bug has been marked as a duplicate of bug 228267 ***