Closed abelbabel closed 2 years ago
Thanks for the information. I have merged the patch into the port e7e2199d290fab15023c0ccce47894d20586518e and it's only applied to FreeBSD 11.
Does not work. Got
2021-01-30 12:40:14 (1.00 MB/s) - 'v1.15.2.tar.gz' saved [46196945]
tar -xzf v1.15.2.tar.gz
cp .tf_configure.bazelrc Makefile *.sh tensorflow-1.15.2
gmake[2]: Leaving directory '/root/photoprism-freebsd-port/work/photoprism-6b0d94ff42fadccfe88c4d68744b9d3afea36e2f/docker/tensorflow'
===> Patching for photoprism-g20210111
===> Applying extra patch /root/photoprism-freebsd-port/files/patch-docker_tensorflow_tensorflow-1.15.2_tensorflow_core_protobuf_autotuning.proto
===> Applying FreeBSD patches for photoprism-g20210111 from /root/photoprism-freebsd-port/files
Ignoring previously applied (or reversed) patch.
1 out of 1 hunks ignored--saving rejects to docker/tensorflow/tensorflow-1.15.2/tensorflow/core/protobuf/autotuning.proto.rej
===> FAILED Applying FreeBSD patch-docker_tensorflow_tensorflow-1.15.2_tensorflow_core_protobuf_autotuning.proto
===> Cleanly applied FreeBSD patch(es) patch-docker_tensorflow_Makefile
===> FAILED to apply cleanly FreeBSD patch(es) patch-docker_tensorflow_tensorflow-1.15.2_tensorflow_core_protobuf_autotuning.proto
*** Error code 1
Stop.
make[1]: stopped in /root/photoprism-freebsd-port
*** Error code 1
Stop.
make: stopped in /root/photoprism-freebsd-port
it seems that the patch-file has to have prefix: extra-patch-
to prevent multiple patching
this means: extra-patch-docker_tensorflow_tensorflow-1.15.2_tensorflow_core_protobuf_autotuning.proto
instead of
patch-docker_tensorflow_tensorflow-1.15.2_tensorflow_core_protobuf_autotuning.proto
Thanks, I have updated the file and Makefile. It should work now. c22b75f8f726b08ddd4fec9f9a40864ea050218a
Thank you!
But there are still problems, other problems ...:
...
ERROR: /root/photoprism-freebsd-port/work/photoprism-6b0d94ff42fadccfe88c4d68744b9d3afea36e2f/docker/tensorflow/tensorflow-1.15.2/tensorflow/BUILD:563:1: Linking of rule '//tensorflow:libtensorflow_framework.so.1.15.2' failed (Exit 1)
bazel-out/host/bin/external/zlib_archive/libzlib.pic.a(adler32.pic.o): In function `adler32':
adler32.c:(.text.adler32+0x0): multiple definition of `adler32'
bazel-out/host/bin/external/zlib/libzlib.pic.a(adler32.pic.o):adler32.c:(.text.adler32+0x0): first defined here
bazel-out/host/bin/external/zlib_archive/libzlib.pic.a(adler32.pic.o): In function `adler32_combine':
adler32.c:(.text.adler32_combine+0x0): multiple definition of `adler32_combine' bazel-out/host/bin/external/zlib/libzlib.pic.a(adler32.pic.o):adler32.c:(.text.adler32_combine+0x0): first defined here
bazel-out/host/bin/external/zlib_archive/libzlib.pic.a(adler32.pic.o): In function `adler32_combine64': adler32.c:(.text.adler32_combine64+0x0): multiple definition of `adler32_combine64'
bazel-out/host/bin/external/zlib/libzlib.pic.a(adler32.pic.o):adler32.c:(.text.adler32_combine64+0x0): first defined here
bazel-out/host/bin/external/zlib_archive/libzlib.pic.a(adler32.pic.o): In function `adler32_z':
adler32.c:(.text.adler32_z+0x0): multiple definition of `adler32_z' bazel-out/host/bin/external/zlib/libzlib.pic.a(adler32.pic.o):adler32.c:(.text.adler32_z+0x0): first defined here bazel-out/host/bin/external/zlib_archive/libzlib.pic.a(compress.pic.o): In function `compress':
compress.c:(.text.compress+0x0): multiple definition of `compress'
bazel-out/host/bin/external/zlib/libzlib.pic.a(compress.pic.o):compress.c:(.text.compress+0x0): first defined here
bazel-out/host/bin/external/zlib_archive/libzlib.pic.a(compress.pic.o): In function `compress2': compress.c:(.text.compress2+0x0): multiple definition of `compress2'
...
bazel-out/host/bin/external/zlib_archive/libzlib.pic.a(zutil.pic.o): In function `zcalloc':
zutil.c:(.text.zcalloc+0x0): multiple definition of `zcalloc'
bazel-out/host/bin/external/zlib/libzlib.pic.a(zutil.pic.o):zutil.c:(.text.zcalloc+0x0): first defined here
bazel-out/host/bin/external/zlib_archive/libzlib.pic.a(zutil.pic.o): In function `zcfree':
zutil.c:(.text.zcfree+0x0): multiple definition of `zcfree'
bazel-out/host/bin/external/zlib/libzlib.pic.a(zutil.pic.o):zutil.c:(.text.zcfree+0x0): first defined here
bazel-out/host/bin/external/zlib_archive/libzlib.pic.a(zutil.pic.o): In function `zlibCompileFlags':
zutil.c:(.text.zlibCompileFlags+0x0): multiple definition of `zlibCompileFlags'
bazel-out/host/bin/external/zlib/libzlib.pic.a(zutil.pic.o):zutil.c:(.text.zlibCompileFlags+0x0): first defined here
bazel-out/host/bin/external/zlib_archive/libzlib.pic.a(zutil.pic.o): In function `zlibVersion':
zutil.c:(.text.zlibVersion+0x0): multiple definition of `zlibVersion'
bazel-out/host/bin/external/zlib/libzlib.pic.a(zutil.pic.o):zutil.c:(.text.zlibVersion+0x0): first defined here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Target //tensorflow:libtensorflow.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 12204.121s, Critical Path: 365.29s
INFO: 4320 processes: 4320 local.
FAILED: Build did NOT complete successfully
*** Error code 1
Stop.
make[1]: stopped in /root/photoprism-freebsd-port
*** Error code 1
Stop.
make: stopped in /root/photoprism-freebsd-port
Seems to be the problem that zlib is built multiple times. There was a similar problem ...
It's a little wired, and I can't reproduce it on my system (12-RELEASE).
Looks there are some bugs in the tensorflow bazel's build script? I still have no idea on it.
so please reopen this issue until it's not solved to keep in mind that there is a problem on 11.4-RELEASE
I can reopen this issue, but this error is belongs to tensorflow project.
When compiling photoprism-port in a FreeBSD 11.4-RELEASE-p5 jail (CPU without AV*-features), it fails in tensorflow-compiling-phase:
Seems similar to this PR at first glance ... and there is a patching approach