psa/libtensorflow1-freebsd-port

Bazel asks for interactive questions

Closed this issue · 2 comments

dml33 commented

Hi.

I have just tried to compile your FreeBSD port for Tensorflow 1.15 in a FreeBSD 12.2-RELEASE-p11 jail with NOAVX support.

I noticed that, at the beginning of the making process, bazel asks for interactive questions as it was happening in the original photoprism-freebsd-port long time ago:

root@Emby2:/usr/ports/science/libtensorflow1 # make
===>  License APACHE20 THIRD_PARTY_TF_C_LICENSES accepted by the user
===>   libtensorflow1-1.15.5 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by libtensorflow1-1.15.5 for building
===>  Extracting for libtensorflow1-1.15.5
=> SHA256 Checksum OK for tensorflow-tensorflow-v1.15.5_GH0.tar.gz.
===>  Patching for libtensorflow1-1.15.5
===>  Applying FreeBSD patches for libtensorflow1-1.15.5 from /usr/ports/science/libtensorflow1/files
===>   libtensorflow1-1.15.5 depends on executable: bash - found
===>   libtensorflow1-1.15.5 depends on executable: bazel - found
===>   libtensorflow1-1.15.5 depends on executable: git - found
===>   libtensorflow1-1.15.5 depends on package: gmake>=4.3 - found
===>   libtensorflow1-1.15.5 depends on file: /usr/local/bin/python3.8 - found
===>  Configuring for libtensorflow1-1.15.5
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
You have bazel 0.29.0 installed.
Do you wish to build TensorFlow with OpenCL SYCL support? [y/N]:
No OpenCL SYCL support will be enabled for TensorFlow.

Do you wish to build TensorFlow with MPI support? [y/N]:
No MPI support will be enabled for TensorFlow.

Preconfigured Bazel build configs. You can use any of the below by adding "--config=<>" to your build command. See .bazelrc for more details.

huo-ju fixed it huo-ju/photoprism-freebsd-port@5a6019d

I think that a couple of things are missing in the Makefile, such as:

  • TF_NEED_MPI=0
  • For the OpenCL SYCL, huo-ju made it as an option at the make configure stage:
TF_NEED_OPENCL_SYCL_DESC=       OpenCL SYCL
TF_NEED_OPENCL_SYCL_VARS=       TF_ENV+="TF_NEED_OPENCL_SYCL=1"
TF_NEED_OPENCL_SYCL_VARS_OFF=   TF_ENV+="TF_NEED_OPENCL_SYCL=0"
  • And maybe these last options could help with all the warnings at compile stage and use all the instruction set supported by the given processor:
TF_DOWNLOAD_CLANG=0 CC_OPT_FLAGS="-march=native -Wno-sign-compare" 

Thanks!

+1. As long as there is no solution to this, you could use the program "expect" to supply user input into the pipe.

psa commented

Fixed in 8c2b777