Compile tensorflow core absl::string_view not be defined

49 views
Skip to first unread message

t kevin

unread,
Sep 15, 2022, 1:46:01 PM9/15/22
to SIG Build
hi folks

I'm trying to build tensorflow build_pip_package on an aarch64 machine with ubuntu1804

I meet the same problem describle in this issue
https://github.com/tensorflow/serving/issues/1935

Below is the error message

ERROR: /root/tensorflow/tensorflow/python/BUILD:2531:29: Linking of rule '//tensorflow/python:gen_candidate_sampling_ops_py_wrappers_cc' failed (Exit 1): gcc failed: error executing command /usr/bin/gcc @bazel-out/host/bin/tensorflow/python/gen_candidate_sampling_ops_py_wrappers_cc-2.params bazel-out/host/bin/_solib_aarch64/_U_S_Stensorflow_Spython_Cgen_Ucandidate_Usampling_Uops_Upy_Uwrappers_Ucc___Utensorflow/libtensorflow_framework.so.2: error: undefined reference to 'std::allocator<absl::lts_2020_09_23::string_view>::allocator()' collect2: error: ld returned 1 exit status

my gcc version

# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-linux-gnu/7.3.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,lto --enable-plugin --enable-initfini-array --disable-libgcj --without-isl --without-cloog --enable-gnu-indirect-function --build=aarch64-linux-gnu --with-stage1-ldflags=' -Wl,-z,relro,-z,now' --with-boot-ldflags=' -Wl,-z,relro,-z,now' --with-multilib-list=lp64
Thread model: posix
gcc version 7.3.0 (GCC)

Is is a known issue?
Does tf2.5/2.6 got aarch64 build?

Thanks

Andrew Goodbody

unread,
Sep 15, 2022, 2:03:36 PM9/15/22
to t kevin, SIG Build
Yes you can build 2.6 for aarch64


I'm not sure what your problem is, maybe the wrong version of support packages or else too old gcc.

Andrew

Ps you can also just 'pip install tensorflow' if 2.10 would work for you.

--
To unsubscribe from this group and stop receiving emails from it, send an email to build+un...@tensorflow.org.

Nathan Sircombe

unread,
Sep 15, 2022, 4:11:14 PM9/15/22
to Andrew Goodbody, t kevin, SIG Build

Hi,

 

If the official 2.10 wheel, or the Linaro wheels, don’t meet your needs, and you need a full build from sources then there are scripts for building TF in a docker image here - https://github.com/ARM-software/Tool-Solutions/tree/main/docker/tensorflow-aarch64

You can recycle the bash scripts (https://github.com/ARM-software/Tool-Solutions/tree/main/docker/tensorflow-aarch64/scripts) to build TF and dependencies outside of Docker with a bit of tweaking.

 

The tip of the main branch there will build TF 2.10, but moving back to an earlier tag will get you a TF2.6 build – I think https://github.com/ARM-software/Tool-Solutions/tree/tensorflow-pytorch-aarch64--r21.10/docker/tensorflow-aarch64 will do it. Note these builds include additional patches which you might want to skip.

 

Cheers,

Nathan.

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Reply all
Reply to author
Forward
0 new messages