It seems there were quite a few breaking changes, here is a working PKGBUILD patch
diff --git a/PKGBUILD b/PKGBUILD
index 462777b..8a0c383 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -24,7 +24,7 @@ depends=(
makedepends=(
'git'
'cmake'
- 'qt5-base'
+ 'qt6-base'
)
optdepends=()
provides=('waifu2x-caffe')
@@ -55,15 +55,20 @@ prepare() {
cd "${srcdir}/waifu2x-caffe"
git submodule update --init --recursive
- # Change Source.cpp to update the model file location
- sed -i 's+models/cunet+/usr/share/waifu2x-caffe/models/cunet+g' waifu2x-caffe/Source.cpp
-
# create symlink to caffe
ln -sf ../caffe ./caffe
ln -sf ../caffe ./libcaffe
+ # compile targets under C++17
+ sed -i 's~-std=c++14~-std=c++17~g' CMakeLists.txt
+ sed -i 's~-std=c++14~-std=c++17~g' caffe/Makefile.config
+ sed -i 's~-std=c++14~-std=c++17~g' caffe/Makefile.config.example
+
+ # Change Source.cpp to update the model file location
+ sed -i 's+models/cunet+/usr/share/waifu2x-caffe/models/cunet+g' waifu2x-caffe/Source.cpp
+
cd ${srcdir}/build
- cmake "${srcdir}/waifu2x-caffe" -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES -gencode arch=compute_86,code=sm_86 "
+ cmake "${srcdir}/waifu2x-caffe" -DCMAKE_EXE_LINKER_FLAGS="-Wl,--copy-dt-needed-entries" -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--copy-dt-needed-entries" -DCUDA_NVCC_FLAGS="-D_FORCE_INLINES -gencode arch=compute_86,code=sm_86 "
# Fix issue with the compile failing. These flags need to be removed from the CUDA_FLAGS, but I can't find which CMakeFile is generating this line. So just remove it with sed.
sed -i 's/-Xcudafe --diag_suppress=set_but_not_used -DBOOST_ALL_NO_LIB;-DUSE_LMDB;-DUSE_LEVELDB;-DUSE_CUDNN;-DUSE_OPENCV;-DWITH_PYTHON_LAYER//g' libcaffe/src/caffe/CMakeFiles/caffe.dir/flags.make
}
Bumped everything to C++17 (forced by other dependencies), libopencv_highgui requires qt6-base libraries now and applied (temporary) workaround for linker failure around this protobuf issue until it's fixed upstream.
Note that missing headers for cblas is still an issue, when blas-openblas
is installed.
Pinned Comments
ginnokami commented on 2021-04-18 23:47 (UTC)
This package provides the cli version of waifu2x-caffe. A readme for all of the flags is located in /usr/share/docs/waifu2x-caffe/README. The models are located at /usr/share/waifu2x-caffe/models.