Closed kelson42 closed 1 year ago
Thanks for reporting this. I found a workaround by using binary build as mentioned in ArchLinux PKGBUILD. So for Ubuntu 18.04 LTS it transforms to:
sudo add-apt-repository ppa:kiwixteam/release
sudo apt-get update
sudo apt-get install kiwix
# get kiwix-tools
cd ~/Downloads
wget -c https://mirrors.dotsrc.org/kiwix/release/kiwix-tools/kiwix-tools_linux-x86_64-3.1.2-5.tar.gz
tar -xf kiwix-tools_linux-x86_64-3.1.2-5.tar.gz
cd kiwix-tools_linux-x86_64-3.1.2-5
sudo cp kiwix-* /usr/local/bin/
Tried to compile master branch of kiwix-tools on fresh Ubuntu 18.04 LTS Docker container by
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:kiwixteam/release
sudo apt-get update
sudo apt-get install git build-essential debhelper-compat libkiwix-dev libmicrohttpd-dev meson pkg-config zlib1g-dev
cd
git clone https://github.com/kiwix/kiwix-tools
cd kiwix-tools
sed -i "s/0.0.0/3.2.0/" debian/changelog
dpkg-buildpackage -uc -us
sudo apt-get install ../kiwix-tools_3.2.0_amd64.deb
and got no errors.
So I went further and tried to compile 3.1.2 by
cd
git clone https://github.com/kiwix/kiwix-tools -b 3.1.2 kiwix-tools-3.1.2
cp -ar ~/kiwix-tools/debian ~/kiwix-tools-3.1.2
cd ~/kiwix-tools-3.1.2
sed -i "s/3.2.0/3.1.2/" debian/changelog
dpkg-buildpackage -uc -us
and got errors here, below is the full log
root@5bfd5f38e432:~/kiwix-tools-3.1.2# dpkg-buildpackage -uc -us
dpkg-buildpackage: info: source package kiwix-tools
dpkg-buildpackage: info: source version 3.1.2
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Kunal Mehta <legoktm@debian.org>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build kiwix-tools-3.1.2
debian/rules clean
dh clean
dh_auto_clean
dh_clean
dpkg-source -b kiwix-tools-3.1.2
dpkg-source: info: using source format '3.0 (native)'
dpkg-source: info: building kiwix-tools in kiwix-tools_3.1.2.tar.xz
dpkg-source: info: building kiwix-tools in kiwix-tools_3.1.2.dsc
debian/rules binary
dh binary
dh_update_autotools_config
dh_autoreconf
dh_auto_configure
cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 meson .. --wrap-mode=nodownload --buildtype=plain --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=lib/x86_64-linux-gnu
The Meson build system
Version: 0.45.1
Source dir: /root/kiwix-tools-3.1.2
Build dir: /root/kiwix-tools-3.1.2/obj-x86_64-linux-gnu
Build type: native build
Project name: kiwix-tools
Native C++ compiler: c++ (gcc 7.5.0 "c++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0")
Appending CXXFLAGS from environment: '-g -O2 -fdebug-prefix-map=/root/kiwix-tools-3.1.2=. -fstack-protector-strong -Wformat -Werror=format-security'
Appending LDFLAGS from environment: '-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now'
Appending CPPFLAGS from environment: '-Wdate-time -D_FORTIFY_SOURCE=2'
Build machine cpu family: x86_64
Build machine cpu: x86_64
Dependency threads found: YES
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Native dependency kiwix found: YES 10.0.1
Native dependency libmicrohttpd found: YES 0.9.59
Native dependency zlib found: YES 1.2.11
Build targets in project: 4
Found ninja-1.8.2 at /usr/bin/ninja
dh_auto_build
cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j4 -v
[1/8] c++ -Isrc/manager/kiwix-manage@exe -Isrc/manager -I../src/manager -I/usr/include/ -I/usr/include/pugixml-1.8 -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c++11 '-DKIWIX_TOOLS_VERSION="3.1.2"' -g -O2 -fdebug-prefix-map=/root/kiwix-tools-3.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -MD -MQ 'src/manager/kiwix-manage@exe/kiwix-manage.cpp.o' -MF 'src/manager/kiwix-manage@exe/kiwix-manage.cpp.o.d' -o 'src/manager/kiwix-manage@exe/kiwix-manage.cpp.o' -c ../src/manager/kiwix-manage.cpp
FAILED: src/manager/kiwix-manage@exe/kiwix-manage.cpp.o
c++ -Isrc/manager/kiwix-manage@exe -Isrc/manager -I../src/manager -I/usr/include/ -I/usr/include/pugixml-1.8 -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c++11 '-DKIWIX_TOOLS_VERSION="3.1.2"' -g -O2 -fdebug-prefix-map=/root/kiwix-tools-3.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -MD -MQ 'src/manager/kiwix-manage@exe/kiwix-manage.cpp.o' -MF 'src/manager/kiwix-manage@exe/kiwix-manage.cpp.o.d' -o 'src/manager/kiwix-manage@exe/kiwix-manage.cpp.o' -c ../src/manager/kiwix-manage.cpp
../src/manager/kiwix-manage.cpp:21:10: fatal error: kiwix/tools/stringTools.h: No such file or directory
#include <kiwix/tools/stringTools.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[2/8] c++ -Isrc/server/kiwix-serve@exe -Isrc/server -I../src/server -I/usr/include/ -I/usr/include/pugixml-1.8 -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c++11 '-DKIWIX_TOOLS_VERSION="3.1.2"' -g -O2 -fdebug-prefix-map=/root/kiwix-tools-3.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -MD -MQ 'src/server/kiwix-serve@exe/kiwix-serve.cpp.o' -MF 'src/server/kiwix-serve@exe/kiwix-serve.cpp.o.d' -o 'src/server/kiwix-serve@exe/kiwix-serve.cpp.o' -c ../src/server/kiwix-serve.cpp
FAILED: src/server/kiwix-serve@exe/kiwix-serve.cpp.o
c++ -Isrc/server/kiwix-serve@exe -Isrc/server -I../src/server -I/usr/include/ -I/usr/include/pugixml-1.8 -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c++11 '-DKIWIX_TOOLS_VERSION="3.1.2"' -g -O2 -fdebug-prefix-map=/root/kiwix-tools-3.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -MD -MQ 'src/server/kiwix-serve@exe/kiwix-serve.cpp.o' -MF 'src/server/kiwix-serve@exe/kiwix-serve.cpp.o.d' -o 'src/server/kiwix-serve@exe/kiwix-serve.cpp.o' -c ../src/server/kiwix-serve.cpp
../src/server/kiwix-serve.cpp:24:10: fatal error: kiwix/tools/otherTools.h: No such file or directory
#include <kiwix/tools/otherTools.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[3/8] c++ -Isrc/reader/kiwix-read@exe -Isrc/reader -I../src/reader -I/usr/include/ -I/usr/include/pugixml-1.8 -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c++11 '-DKIWIX_TOOLS_VERSION="3.1.2"' -g -O2 -fdebug-prefix-map=/root/kiwix-tools-3.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -MD -MQ 'src/reader/kiwix-read@exe/kiwix-read.cpp.o' -MF 'src/reader/kiwix-read@exe/kiwix-read.cpp.o.d' -o 'src/reader/kiwix-read@exe/kiwix-read.cpp.o' -c ../src/reader/kiwix-read.cpp
FAILED: src/reader/kiwix-read@exe/kiwix-read.cpp.o
c++ -Isrc/reader/kiwix-read@exe -Isrc/reader -I../src/reader -I/usr/include/ -I/usr/include/pugixml-1.8 -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c++11 '-DKIWIX_TOOLS_VERSION="3.1.2"' -g -O2 -fdebug-prefix-map=/root/kiwix-tools-3.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -MD -MQ 'src/reader/kiwix-read@exe/kiwix-read.cpp.o' -MF 'src/reader/kiwix-read@exe/kiwix-read.cpp.o.d' -o 'src/reader/kiwix-read@exe/kiwix-read.cpp.o' -c ../src/reader/kiwix-read.cpp
../src/reader/kiwix-read.cpp: In function ‘int main(int, char**)’:
../src/reader/kiwix-read.cpp:83:38: error: ‘kiwix::Reader::Reader(std::__cxx11::string)’ is deprecated [-Werror=deprecated-declarations]
reader = new kiwix::Reader(filePath);
^
In file included from ../src/reader/kiwix-read.cpp:21:0:
/usr/include/kiwix/reader.h:90:23: note: declared here
explicit DEPRECATED Reader(const string zimFilePath);
^~~~~~
../src/reader/kiwix-read.cpp:96:32: error: no match for ‘operator[]’ (operand types are ‘kiwix::SuggestionItem’ and ‘int’)
std::cout << suggestion[0] << std::endl;
^
cc1plus: all warnings being treated as errors
[4/8] c++ -Isrc/searcher/kiwix-search@exe -Isrc/searcher -I../src/searcher -I/usr/include/ -I/usr/include/pugixml-1.8 -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c++11 '-DKIWIX_TOOLS_VERSION="3.1.2"' -g -O2 -fdebug-prefix-map=/root/kiwix-tools-3.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -MD -MQ 'src/searcher/kiwix-search@exe/kiwix-search.cpp.o' -MF 'src/searcher/kiwix-search@exe/kiwix-search.cpp.o.d' -o 'src/searcher/kiwix-search@exe/kiwix-search.cpp.o' -c ../src/searcher/kiwix-search.cpp
FAILED: src/searcher/kiwix-search@exe/kiwix-search.cpp.o
c++ -Isrc/searcher/kiwix-search@exe -Isrc/searcher -I../src/searcher -I/usr/include/ -I/usr/include/pugixml-1.8 -I/usr/include/x86_64-linux-gnu -I/usr/include/p11-kit-1 -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Werror -std=c++11 '-DKIWIX_TOOLS_VERSION="3.1.2"' -g -O2 -fdebug-prefix-map=/root/kiwix-tools-3.1.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -MD -MQ 'src/searcher/kiwix-search@exe/kiwix-search.cpp.o' -MF 'src/searcher/kiwix-search@exe/kiwix-search.cpp.o.d' -o 'src/searcher/kiwix-search@exe/kiwix-search.cpp.o' -c ../src/searcher/kiwix-search.cpp
../src/searcher/kiwix-search.cpp: In function ‘int main(int, char**)’:
../src/searcher/kiwix-search.cpp:99:39: error: ‘kiwix::Reader::Reader(std::__cxx11::string)’ is deprecated [-Werror=deprecated-declarations]
reader = new kiwix::Reader(zimPath);
^
In file included from ../src/searcher/kiwix-search.cpp:21:0:
/usr/include/kiwix/reader.h:90:23: note: declared here
explicit DEPRECATED Reader(const string zimFilePath);
^~~~~~
../src/searcher/kiwix-search.cpp:106:36: error: ‘kiwix::Searcher::Searcher()’ is deprecated [-Werror=deprecated-declarations]
searcher = new kiwix::Searcher();
^
In file included from ../src/searcher/kiwix-search.cpp:22:0:
/usr/include/kiwix/searcher.h:68:14: note: declared here
DEPRECATED Searcher();
^~~~~~~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
dh_auto_build: error: cd obj-x86_64-linux-gnu && LC_ALL=C.UTF-8 ninja -j4 -v returned exit code 1
debian/rules:5: recipe for target 'binary' failed
make: *** [binary] Error 1
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
root@5bfd5f38e432:~/kiwix-tools-3.1.2#
So you can package 3.2.0 for 18.04 LTS in PPA.
... or use the appropriate binary we published, you probably want https://download.kiwix.org/release/kiwix-tools/kiwix-tools_linux-x86_64-3.2.0-1.tar.gz
@legoktm Do you remember this?
@legoktm Any idea?
Unfortunately no answer :( But this distribution is getting older now... even if still maintained. Probably not qorth the effort.
Following a discussion at https://askubuntu.com/q/1390705/66509