Issue 1:
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04):

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:

TensorFlow installed from (source or binary):

TensorFlow version:

Python version:

Installed using virtualenv? pip? conda?:

Bazel version (if compiling from source):

GCC/Compiler version (if compiling from source):

CUDA/cuDNN version:

GPU model and memory:

Describe the problem

Provide the exact sequence of commands / steps that you executed before running into the problem

Any other info / logs

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

Issue 2:
Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 16.04

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:

TensorFlow installed from (source or binary):

TensorFlow version:

Python version: 2.7

Bazel version (if compiling from source): 0.26.1

GCC/Compiler version (if compiling from source): 7.3.0

Describe the problem

I want to build a tensorflow C library for MIPS architecture.

So in order to do that, I specified the following options before building:

export CC=/usr/bin/mips64-linux-gnuabi64-gcc
export CXX=/usr/bin/mips64-linux-gnuabi64-g++

Those are cross-compilers for MIPS64.

So when I try to build bazel using:

bazel build //tensorflow/tools/lib_package:libtensorflow --spawn_strategy=standalone --verbose_failures

I get the following error:

ERROR: /root/.cache/bazel/_bazel_root/36c1970dc5e3eff66b396f9517eb3547/external/hwloc/BUILD.bazel:214:1: C++ compilation of rule '@hwloc//:hwloc' failed (Exit 1): mips64-linux-gnuabi64-gcc failed: error executing command
(cd /root/.cache/bazel/_bazel_root/36c1970dc5e3eff66b396f9517eb3547/execroot/org_tensorflow && \
exec env - \
PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Users/kprosvir/Downloads/cmder/vendor/conemu-maximus5/ConEmu/wsl:/mnt/c/Users/kprosvir/Downloads/cmder/vendor/conemu-maximus5/ConEmu/Scripts:/mnt/c/Users/kprosvir/Downloads/cmder/vendor/conemu-maximus5:/mnt/c/Users/kprosvir/Downloads/cmder/vendor/conemu-maximus5/ConEmu:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files (x86)/Sennheiser/SoftphoneSDK:/mnt/c/ProgramData/Webex/Webex/Applications:/mnt/c/Users/kprosvir/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/kprosvir/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Users/kprosvir/AppData/Local/hyper/app-3.0.0/resources/bin:/mnt/c/Users/kprosvir/AppData/Local/Box/Box Edit:/snap/bin:/usr/local/go/bin:/root/go//bin' \
PWD=/proc/self/cwd \
/usr/bin/mips64-linux-gnuabi64-gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections -fdata-sections -MD -MF bazel-out/host/bin/external/hwloc/_objs/hwloc/topology-x86.pic.d '-frandom-seed=bazel-out/host/bin/external/hwloc/_objs/hwloc/topology-x86.pic.o' -fPIC -iquote external/hwloc -iquote bazel-out/host/bin/external/hwloc -isystem external/hwloc/hwloc -isystem bazel-out/host/bin/external/hwloc/hwloc -isystem external/hwloc/include -isystem bazel-out/host/bin/external/hwloc/include -g0 -I. -Ihwloc -Iinclude -Wno-vla '-DHWLOC_DUMPED_HWDATA_DIR=' '-DRUNSTATEDIR=' -fno-canonical-system-headers -Wno-builtin-macro-redefined '-D__DATE__="redacted"' '-D__TIMESTAMP__="redacted"' '-D__TIME__="redacted"' -c external/hwloc/hwloc/topology-x86.c -o bazel-out/host/bin/external/hwloc/_objs/hwloc/topology-x86.pic.o)
Execution platform: @bazel_tools//platforms:host_platform
In file included from external/hwloc/hwloc/topology-x86.c:23:0:
external/hwloc/hwloc/topology-x86.c: In function 'cpuid_or_from_dump':
external/hwloc/include/private/cpuid-x86.h:67:3: error: invalid 'asm': invalid use of '%k'
__asm__(
^~~~~~~
Target //tensorflow/tools/lib_package:libtensorflow failed to build

So the question is: is there any way to fix it and successfully build it for MIPS64?