kiwix / kiwix-xulrunner

[ARCHIVED] Legacy Kiwix desktop solution for Windows/macOS/Linux
https://download.kiwix.org/release/kiwix-xulrunner/
GNU General Public License v3.0
111 stars 28 forks source link

Allow building kiwix-serve without xulrunner #406

Closed legoktm closed 7 years ago

legoktm commented 7 years ago

Context: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763321#23

I'm investigating the possibility of packaging kiwix-serve for Debian per the above bug report, but I can't seem to do it without downloading the xulrunner sdk, even though AIUI kiwix-serve shouldn't require xulrunner.

I tried a pretty simple:

./autogen.sh
./configure --disable-components --enable-server

And ended up with

Build details:
ARCH                x86_64
IS_64B              yes
IS_ARM              no
IS_POSIX            yes
IS_LINUX            yes
IS_OSX              no
IS_WIN              no
IS_OLD_GECKO            no
IS_OLD_GCC          no
COMPIL_DEPS         no
WITH_COMPONENTS         no
STATIC_BINS         no
WITH_MANAGER            yes
WITH_SERVER         yes
WITH_LAUNCHER           yes
WITH_INDEXER            yes
WITH_INSTALLER          yes
WITH_SEARCHER           no
WITH_READER         no
JAR_CONTENT         no
DEBIAN_RULES            no
SIGN_BUILD          no
CERTIFICATE         Developer ID Application: Renaud Gaudin (S3QKTMRU8F)

GECKO_VERSION           0
MAJOR_GECKO_VERSION     
EXACT_GECKO_VERSION     

DEP_MIRROR          http://download.kiwix.org/dev
DOWNLOADER          wget --wait=10 --timeout=600 --retry-connrefused --no-check-certificate -c --no-use-server-timestamps -O
DEP_LIST            xulrunner-sdk xulrunner

EMBED_LIBS          /usr/lib/x86_64-linux-gnu/liblzma.so /usr/lib/x86_64-linux-gnu/libzim.so /usr/lib/x86_64-linux-gnu/libpugixml.so /usr/lib/x86_64-linux-gnu/libctpp2.so /usr/lib/x86_64-linux-gnu/libz.so /usr/lib/x86_64-linux-gnu/libxapian.so /usr/lib/x86_64-linux-gnu/libicuuc.so /usr/lib/x86_64-linux-gnu/libicudata.so /usr/lib/x86_64-linux-gnu/libicui18n.so /usr/lib/x86_64-linux-gnu/libmicrohttpd.so

CC              gcc
CXX             g++
CPP             gcc -E
CXXCPP              g++ -E
CFLAGS              -g -O2
CXXFLAGS            -g -O2 -std=gnu++0x -fexceptions -DMOZ_CPP_EXCEPTIONS -DMOZ_NO_MOZALLOC
XPCOM_CFLAGS            -fno-rtti -fPIC
CHECK_LDFLAGS           -Wl,-z,defs

GECKO_SDK_PATH          /home/km/projects/kiwix/src/dependencies/xulrunner-sdk
XULRUNNER_RUNTIME_PATH      /home/km/projects/kiwix/src/dependencies/xulrunner
ZLIB_LDFLAGS            -lz
XAPIAN_LDFLAGS          -L/usr/lib/x86_64-linux-gnu -lxapian
MICROHTTPD_LDFLAGS      -lmicrohttpd
LZMA_LDFLAGS            -llzma
LIBZIM_LDFLAGS          -lzim
LIBPUGIXML_LDFLAGS      -lpugixml
LIBCTPP2_LDFLAGS        -lctpp2
ARIA2_FILES         /usr/bin/aria2c
ICU_LDFLAGS         -L/usr/lib/x86_64-linux-gnu -licui18n -licuuc -licudata
XAPIAN_COMPACT          /usr/bin/xapian-compact
UUID_LDFLAGS            

(I can paste the full log if you want)

Notably, it still wants me to use the makefile in src/dependencies to download xulrunner, and then ./configure will exit successfully.

From my reading of configure.ac, it seems that the xulrunner dependency is required, regardless of whether I'm trying to build something that depends upon it. Is that correct? Or am I trying to build it wrong?

mgautierfr commented 7 years ago

I'm currently working on this. The plan is to split the whole kiwix repository in several smaller repositories.(kiwix-lib, kiwix-tools, kiwix-android, ...) (and use meson as build system)

Have a look on kiwix-lib and kiwix-tools (who contains kiwix-serve) kiwix-tools contains a python script to build all projects and dependencies but, in your case, you can (and should) ignore it. Just consider this repository as a meson project.

This repository is pretty young (few weeks) and still not perfect (it missing, at least, other tools compilation and manpage installation) but it is possible to compile kiwix-serve without xulrunner.

I'm closing this bug as we are moving await from the current build system to separated projects using meson. Do not hesitate to open bug report on kiwix-(tools|lib) repositories.

legoktm commented 7 years ago

OK, thanks for the info. I tried building kiwix-tools, then realized I needed kiwix-lib, and got stuck with issues relating to pugixml. Maybe you could take a look at https://github.com/kiwix/kiwix-lib/issues/6?