You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to compile photoprism on FreeBSD using photoprism-freebsd-port for a couple of days without success.
The commands I used follow:
cd /tmp
git clone 'https://github.com/huo-ju/photoprism-freebsd-port.git'
cd photoprism-freebsd-port
LD_LIBRARY_PATH=".:/lib:/usr/libexec:/usr/local/lib" make BATCH=yes OPTIONS_SET=AVX
I identified two issues:
The port depends on science/libtensorflow1, however there is no such port in the ports tree. I assume it is meant to build against science/py-tensorflow, so I applied the following patch to the Makefile and the compilation started: sed -i '' 's#science/libtensorflow1#science/py-tensorflow#g' Makefile
The compilation of science/py-tensorflow fails with the following build error:
ERROR: /usr/ports/science/py-tensorflow/work-py38/tensorflow-1.15.5/tensorflow/python/BUILD:329:1: C++ compilation of rule '//tensorflow/python:bfloat16_lib' failed (Exit 1)
tensorflow/python/lib/core/bfloat16.cc:633:8: error: no matching function for call to object of type '(lambda at tensorflow/python/lib/core/bfloat16.cc:607:25)'
if (!register_ufunc("equal", CompareUFunc<Bfloat16EqFunctor>,
^~~~~~~~~~~~~~
tensorflow/python/lib/core/bfloat16.cc:607:25: note: candidate function not viable: no overload of 'CompareUFunc' matching 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') for 2nd argument
auto register_ufunc = [&](const char* name, PyUFuncGenericFunction fn,
^
tensorflow/python/lib/core/bfloat16.cc:637:8: error: no matching function for call to object of type '(lambda at tensorflow/python/lib/core/bfloat16.cc:607:25)'
if (!register_ufunc("not_equal", CompareUFunc<Bfloat16NeFunctor>,
^~~~~~~~~~~~~~
tensorflow/python/lib/core/bfloat16.cc:607:25: note: candidate function not viable: no overload of 'CompareUFunc' matching 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') for 2nd argument
auto register_ufunc = [&](const char* name, PyUFuncGenericFunction fn,
^
tensorflow/python/lib/core/bfloat16.cc:641:8: error: no matching function for call to object of type '(lambda at tensorflow/python/lib/core/bfloat16.cc:607:25)'
if (!register_ufunc("less", CompareUFunc<Bfloat16LtFunctor>, compare_types)) {
^~~~~~~~~~~~~~
tensorflow/python/lib/core/bfloat16.cc:607:25: note: candidate function not viable: no overload of 'CompareUFunc' matching 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') for 2nd argument
auto register_ufunc = [&](const char* name, PyUFuncGenericFunction fn,
^
tensorflow/python/lib/core/bfloat16.cc:644:8: error: no matching function for call to object of type '(lambda at tensorflow/python/lib/core/bfloat16.cc:607:25)'
if (!register_ufunc("greater", CompareUFunc<Bfloat16GtFunctor>,
^~~~~~~~~~~~~~
tensorflow/python/lib/core/bfloat16.cc:607:25: note: candidate function not viable: no overload of 'CompareUFunc' matching 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') for 2nd argument
auto register_ufunc = [&](const char* name, PyUFuncGenericFunction fn,
^
tensorflow/python/lib/core/bfloat16.cc:648:8: error: no matching function for call to object of type '(lambda at tensorflow/python/lib/core/bfloat16.cc:607:25)'
if (!register_ufunc("less_equal", CompareUFunc<Bfloat16LeFunctor>,
^~~~~~~~~~~~~~
tensorflow/python/lib/core/bfloat16.cc:607:25: note: candidate function not viable: no overload of 'CompareUFunc' matching 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') for 2nd argument
auto register_ufunc = [&](const char* name, PyUFuncGenericFunction fn,
^
tensorflow/python/lib/core/bfloat16.cc:652:8: error: no matching function for call to object of type '(lambda at tensorflow/python/lib/core/bfloat16.cc:607:25)'
if (!register_ufunc("greater_equal", CompareUFunc<Bfloat16GeFunctor>,
^~~~~~~~~~~~~~
tensorflow/python/lib/core/bfloat16.cc:607:25: note: candidate function not viable: no overload of 'CompareUFunc' matching 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') for 2nd argument
auto register_ufunc = [&](const char* name, PyUFuncGenericFunction fn,
^
6 errors generated.
I tried checking out the ports tree to a version from December 2021 and Photoprism to a commit before the switch to external tensorflow but I got other linker issues (see below). The commits I tried were:
Photoprism: 7895eaa (Dec 3 2021), 66cf274 (Dec 26 2021), 8368d02 (Jan 19 2022, current at the time of writing)
The linker errors with the code before splitting out tensorflow:
ERROR: /tmp/lansnap-build/photoprism-freebsd-port/work/photoprism-93b26f197908dd825dfa302d17793185cc3eab8c/docker/tensorflow/tensorflow-1.15.2/tensorflow/BUILD:563:1: Linking of rule '//tensorflow:libtensorflow_framework.so.1.15.2' failed (Exit 1)
ld: error: duplicate symbol: adler32
>>> defined at adler32.c
>>> adler32.pic.o:(adler32) in archive bazel-out/host/bin/external/zlib/libzlib.pic.a
>>> defined at adler32.c
>>> adler32.pic.o:(.text.adler32+0x0) in archive bazel-out/host/bin/external/zlib_archive/libzlib.pic.a
ld: error: duplicate symbol: adler32_combine
>>> defined at adler32.c
>>> adler32.pic.o:(adler32_combine) in archive bazel-out/host/bin/external/zlib/libzlib.pic.a
>>> defined at adler32.c
>>> adler32.pic.o:(.text.adler32_combine+0x0) in archive bazel-out/host/bin/external/zlib_archive/libzlib.pic.a
... (repeated for multiple other functions)
My question is: Am I compiling Photoprism correctly, and if yes - why is tensorflow failing to compile?
I am using FreeBSD 13.0-RELEASE.
The text was updated successfully, but these errors were encountered:
I have been trying to compile photoprism on FreeBSD using photoprism-freebsd-port for a couple of days without success.
The commands I used follow:
I identified two issues:
The port depends on science/libtensorflow1, however there is no such port in the ports tree. I assume it is meant to build against science/py-tensorflow, so I applied the following patch to the Makefile and the compilation started:
sed -i '' 's#science/libtensorflow1#science/py-tensorflow#g' Makefile
The compilation of science/py-tensorflow fails with the following build error:
I tried checking out the ports tree to a version from December 2021 and Photoprism to a commit before the switch to external tensorflow but I got other linker issues (see below). The commits I tried were:
The linker errors with the code before splitting out tensorflow:
My question is: Am I compiling Photoprism correctly, and if yes - why is tensorflow failing to compile?
I am using FreeBSD 13.0-RELEASE.
The text was updated successfully, but these errors were encountered: