Bug 229491

Summary: postprocess-asm/resolve-asm-file-conflicts.rb build failure with GCC 11.1.0
Product: WebKit Reporter: Adrian Perez <aperez>
Component: JavaScriptCoreAssignee: Michael Catanzaro <mcatanzaro>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: angelos, bugs-noreply, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Linux   
See Also: https://bugs.webkit.org/show_bug.cgi?id=223136
Attachments:
Description Flags
Patch for landing mcatanzaro: commit-queue-

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:
  Source/JavaScriptCore/CMakeFiles/LowLevelInterpreterLib.dir/llint/LowLevelInterpreter.cpp.s:114513:
    Error: file table slot 1 is already occupied by a different file
      (/home/aperez/webkitgtk-2.33.3/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp vs
       /home/aperez/webkitgtk-2.33.3/build-gtk//home/aperez/webkitgtk-2.33.3/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp)

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}")
     end
-    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)
   end
+
   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
+# 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 ***