English 中文(简体)
Compiler error while compiling tensorflow_io in curve25519.c
原标题:

I am trying to compile tensorflow_io onto my Ubuntu 22.04.2 target machine that does not offer GPU nor AVX instruction. I am finding that the compile errors out on curve25519.c. Is there a dependency that I need pre-installed before compiling? Here is the trace:

ERROR: /home/user/.cache/bazel/_bazel_user/d7752e78d6f81d5a4b8e51449d25c837/external/boringssl/BUILD:130:11: Compiling src/third_party/fiat/curve25519.c failed: (Exit 1): gcc failed: error executing command 
  (cd /home/user/.cache/bazel/_bazel_user/d7752e78d6f81d5a4b8e51449d25c837/sandbox/linux-sandbox/242/execroot/org_tensorflow_io && 
  exec env - 
    PATH=/home/user/.cache/bazelisk/downloads/bazelbuild/bazel-5.1.1-linux-x86_64/bin:/home/user/miniconda3/envs/tf/bin:/home/user/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin 
    PWD=/proc/self/cwd 
    TF_HEADER_DIR=/home/user/miniconda3/envs/tf/lib/python3.9/site-packages/tensorflow/include 
    TF_SHARED_LIBRARY_DIR=/home/user/miniconda3/envs/tf/lib/python3.9/site-packages/tensorflow 
    TF_SHARED_LIBRARY_NAME=libtensorflow_framework.so.2 
    avariable=2 
  /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -MD -MF bazel-out/k8-fastbuild/bin/external/boringssl/_objs/crypto/curve25519.pic.d  -frandom-seed=bazel-out/k8-fastbuild/bin/external/boringssl/_objs/crypto/curve25519.pic.o  -fPIC -iquote external/boringssl -iquote bazel-out/k8-fastbuild/bin/external/boringssl -isystem external/boringssl/src/include -isystem bazel-out/k8-fastbuild/bin/external/boringssl/src/include  -fvisibility=hidden   -D_GLIBCXX_USE_CXX11_ABI=1   -DEIGEN_MAX_ALIGN_BYTES=64   -march=native  -Wno-sign-compare -Wa,--noexecstack  -D_XOPEN_SOURCE=700  -Wall -Werror  -Wformat=2  -Wsign-compare -Wmissing-field-initializers -Wwrite-strings -Wshadow -fno-common  -std=c11  -Wmissing-prototypes -Wold-style-definition -Wstrict-prototypes -fno-canonical-system-headers -Wno-builtin-macro-redefined  -D__DATE__="redacted"   -D__TIMESTAMP__="redacted"   -D__TIME__="redacted"  -c external/boringssl/src/third_party/fiat/curve25519.c -o bazel-out/k8-fastbuild/bin/external/boringssl/_objs/crypto/curve25519.pic.o)
# Configuration: 683c4395567a3d925cdf6244b42f976fe0687d86f7973f0af39694471ed5243f
# Execution platform: @local_execution_config_platform//:platform

Use --sandbox_debug to see verbose messages from the sandbox
external/boringssl/src/third_party/fiat/curve25519.c:511:57: error: argument 2 of type  const uint8_t[32]  {aka  const unsigned char[32] } with mismatched bound [-Werror=array-parameter=]
  511 | int x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t s[32]) {
      |                                           ~~~~~~~~~~~~~~^~~~~
In file included from external/boringssl/src/third_party/fiat/curve25519.c:41:
external/boringssl/src/third_party/fiat/internal.h:117:58: note: previously declared as  const uint8_t *  {aka  const unsigned char * }
  117 | int x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t *s);
      |                                           ~~~~~~~~~~~~~~~^
external/boringssl/src/third_party/fiat/curve25519.c:831:57: error: argument 2 of type  const uint8_t *  {aka  const unsigned char * } declared as a pointer [-Werror=array-parameter=]
  831 | void x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t *a) {
      |                                          ~~~~~~~~~~~~~~~^
In file included from external/boringssl/src/third_party/fiat/curve25519.c:41:
external/boringssl/src/third_party/fiat/internal.h:125:56: note: previously declared as an array  const uint8_t[32]  {aka  const unsigned char[32] }
  125 | void x25519_ge_scalarmult_base(ge_p3 *h, const uint8_t a[32]);
      |                                          ~~~~~~~~~~~~~~^~~~~
cc1: all warnings being treated as errors
INFO: Elapsed time: 619.024s, Critical Path: 20.71s
INFO: 305 processes: 65 internal, 240 linux-sandbox.

Background: I am working on building out CPU only instance of tensorflow. I have made several successful tensorflow wheel files and they successfully install and run. Intructions followed from https://www.tensorflow.org/install/source

The trouble comes when I install the Object Detection Framework. https://github.com/tensorflow/models/tree/master/research/object_detection First problem (solved) was object detection wants tensorflow 2.12.0 which it installed (over my compiled 2.14.0 latest) and failed on illegal instruction, probably AVX. So I compiled tensorflow 2.12.0 with which object detection is happy and leaves my self compiled installation in place.

Which leads to my current problem: Object Detection installs tensorflow_io which is not part of the base source compiled for tensorflow. After installation of tensorflow_io I m plagued again with "illegal instruction".

So trying to compile tensorflow_io from here https://github.com/tensorflow/io/blob/master/docs/development.md Unfortunately I m not quite able to follow to the "T". I am on Ubuntu 22.04.2 instead of 20. Also I am not sudo ing as I am installing tensorflow (and hopefully _io into a conda virtual environment). Other than that I have done everything else.

My goal is to learn the ins and outs on small problem domains before deciding to invest in more appropriate hardware. I also like the idea of not bringing every little thing I want to do up to collab_net. I prefer to see that as a last resort.

问题回答

暂无回答




相关问题
Add a changing icon to Ubuntu Panel

What would be the most simple way of adding and changing an icon in the Ubuntu (Gnome) Panel? I m looking for something as simple as shell scripting, but I m not restricted to that. Will write a ...

Configuring kernel

After create a new system call, how to update the kernel? I tried these lines, make-kpkg clean fakeroot make-kpkg -initrd -append-to-version=-custom kernel_image kernel_headers But Ubuntu asked me ...

save Exceptions to file in python

I want to save all following Exceptions in a file. The reason why I need this is because the IDLE for python 3.1.1 in Ubuntu raises an Exception at calltipps, but close to fast, that it isn t readble. ...

How can i monitor system statistics in kubuntu using Java?

i am doing a project related to configuration and memory analyzer for kubuntu. i want to display the system statistics information like CPU usage, RAM usage and proceses etc. graphically using an ...

How to pass "--external-locking" for mysqld in Ubuntu

I would like to start my mysql server with the --external-locking option. As mysqld is run by the /etc/init.d/mysql script ubuntu (karmic), I guess that s where I should set this "--external-locking" ...

"g++" and "c++" compiler

I just found on my Ubuntu, there are two different C++ compilers: /usr/bin/g++ and /usr/bin/c++. I am not familiar with the latter, but man c++ just jumps to the manpage of gcc. I wonder what is their ...

热门标签