New issue
Advanced search Search tips

Issue 779506 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug-Regression



Sign in to add a comment

Cross-compile issue with SwiftShader

Reported by milko.le...@mips.com, Oct 30 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0

Steps to reproduce the problem:
1. Cross-compile Chromium Linux for MIPS
2. 
3. 

What is the expected behavior?
Build is finished

What went wrong?
Build failure:
FAILED: obj/third_party/swiftshader/src/OpenGL/libGLESv2/swiftshader_libGLESv2_static/Fence.o 
...
-m32 -msse2 -march=i686 
...
-c ../../third_party/swiftshader/src/OpenGL/libGLESv2/Fence.cpp -o obj/third_party/swiftshader/src/OpenGL/libGLESv2/swiftshader_libGLESv2_static/Fence.o
clang++: error: argument unused during compilation: '-msse2' [-Werror,-Wunused-command-line-argument]

Did this work before? Yes Before https://chromium-review.googlesource.com/c/chromium/src/+/734904

Chrome version: r512334  Channel: n/a
OS Version: 
Flash Version: 

Issue started after mentioned commit, but root issue is in:
third_party/swiftshader/BUILD.gn

    if (target_cpu == "x64") {  # 64 bit version
      cflags += [
        "-m64",
        "-fPIC",
        "-march=core2",
      ]
    } else {  # 32 bit version
      cflags += [
        "-m32",
        "-msse2",
        "-march=i686",
      ]
    }

else will cover all arches other then x64, and for cross-compiling this adds x86_32 related flags to compile line.
 
Components: Internals>GPU>SwiftShader
Labels: TE-NeedsTraige-help
Seems it is out of scope from TE end, adding TE-NeedsTraige-help label to move this out of our triaging bucket.

Could someone from dev team please take a look into this issue.
Thanks..!
Owner: capn@chromium.org
Status: Assigned (was: Unconfirmed)
Nicolas, can you take a look?

Comment 4 by capn@chromium.org, Nov 4 2017

Cc: mmoroz@chromium.org cwallez@chromium.org
Status: Started (was: Assigned)
Thanks for reporting this. SwiftShader currently only supports x86, but I'm a little confused that you're running into this while just building Chrome. Change 734904 added a new fuzzer target, which as far as I know doesn't get built as part of the 'chrome' target.

Anyway, I'll add some checks for x86.
Thanks for looking into this issue.

I'm actually building "all" target which then includes this fuzzer target. 

Comment 6 by capn@chromium.org, Nov 6 2017

Ah, that makes sense. I wasn't aware that we don't have guards against that or tests that would have alerted us about it.

Could you check if https://chromium-review.googlesource.com/c/chromium/src/+/753789 fixes it for you? I don't have a MIPS system to verify.

Max, since the fuzzers are only intended to run on ClusterFuzz or Linux workstations (?), should we have a global check to not build them for other platforms, or do you think there's value in trying to build them?
We also build and run many of the fuzzers on Mac. In future, we are looking towards Windows as well, this is why we don't restrict fuzzers for Linux globally.

We do have some targets being declared inside of "if (is_linux) { }" switch, this is totally fine, as the most fuzzing is being done on Linux bots.
Project Member

Comment 8 by bugdroid1@chromium.org, Nov 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ba798bfcc3c542c796696ae988cbda12af8982c3

commit ba798bfcc3c542c796696ae988cbda12af8982c3
Author: Nicolas Capens <capn@google.com>
Date: Mon Nov 06 19:21:10 2017

Only build SwiftShader fuzzer on x86.

The 'all' target also builds all fuzzers on any platform, but
SwiftShader only supports x86.

BUG= 779506 

Change-Id: Ic5921d153ce105baeea81d5bf743832c3b4f91be
Reviewed-on: https://chromium-review.googlesource.com/753789
Reviewed-by: Max Moroz <mmoroz@chromium.org>
Commit-Queue: Nicolas Capens <nicolascapens@google.com>
Cr-Commit-Position: refs/heads/master@{#514204}
[modify] https://crrev.com/ba798bfcc3c542c796696ae988cbda12af8982c3/testing/libfuzzer/fuzzers/BUILD.gn

Change https://chromium-review.googlesource.com/c/chromium/src/+/753789 does solve the cross-compilation issue.

Thanks.

Comment 10 by capn@chromium.org, Nov 7 2017

Status: Verified (was: Started)
Splendid.

Sign in to add a comment