Comments (5)
OK, it turns out that the Debian version of libpugixml is a bit old, and doesn't provide a pkg-config file. I built the library manually (using -DBUILD_PKGCONFIG=1) and made it further before running into:
...
[19/19] Linking target src/libkiwix.so
FAILED: src/libkiwix.so
c++ -o src/libkiwix.so 'src/kiwix@sha/static_kiwixlib-resources.cpp.o' 'src/kiwix@sha/library.cpp.o' 'src/kiwix@sha/manager.cpp.o' 'src/kiwix@sha/reader.cpp.o' 'src/kiwix@sha/searcher.cpp.o' 'src/kiwix@sha/indexer.cpp.o' 'src/kiwix@sha/common_base64.cpp.o' 'src/kiwix@sha/common_pathTools.cpp.o' 'src/kiwix@sha/common_regexTools.cpp.o' 'src/kiwix@sha/common_stringTools.cpp.o' 'src/kiwix@sha/common_networkTools.cpp.o' 'src/kiwix@sha/common_otherTools.cpp.o' 'src/kiwix@sha/ctpp2_CTPP2VMStringLoader.cpp.o' 'src/kiwix@sha/xapian_htmlparse.cc.o' 'src/kiwix@sha/xapian_myhtmlparse.cc.o' 'src/kiwix@sha/xapianIndexer.cpp.o' 'src/kiwix@sha/xapianSearcher.cpp.o' '-Wl,--no-undefined' '-Wl,--as-needed' '-shared' '-fPIC' '-Wl,-soname,libkiwix.so' '-pthread' '-licui18n' '-licuuc' '-licudata' '-L/usr/local/lib' '-lzim' '-lctpp2' '-lxapian' '-L/usr/local/lib/pugixml-1.8' '-lpugixml' '-Wl,-rpath,/home/km/projects/kiwix-lib/build/src'
/usr/bin/ld: /usr/local/lib/pugixml-1.8/libpugixml.a(pugixml.cpp.o): relocation R_X86_64_PC32 against symbol `_ZnwmPv' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
Will investigate that later.
Leaving this open since we should document that most people will need a custom build of pugixml to build this.
from libkiwix.
@legoktm This is probably because you should build & install with -DBUILD_PKGCONFIG=1 -DBUILD_SHARED_LIBS=1. The linking is failing because pugixml is built as a static library but unfortunately to link with a static library you have to know in advance whether you're linking it into an executable or not (or to be more precise, into positionally-dependent executable or not), and the defaults in CMakeLists.txt don't match this use. I believe the binary that comes with Debian package is built as shared by default.
from libkiwix.
@zeux thanks! With both of those options set, I was able to fully build this :) I've documented the required settings in #8.
from libkiwix.
From the documentation : «The easiest way to build pugixml is to compile the source file, pugixml.cpp, along with the existing library/executable.» and previous makefile scripts compile itself pugixml.cpp without using any build script provided by pugixml. So I stop there :)
As I didn't want to compile myself pugixml (launch gcc with right arguments) I've created a Meson script for this (https://github.com/kiwix/kiwix-tools/blob/master/scripts/kiwix-builder/patches/pugixml_meson.patch). The kiwix-builder script handles all this automatically.
from libkiwix.
@legoktm Thank you for opening a ticket on Debian side, it's important that thing compile smoothly https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=849810
from libkiwix.
Related Issues (20)
- Release 14.0.0
- Edge case: kiwix-serve style & script injection fails if optional </head> tag is not present HOT 2
- Add download button in the preview of ZIMs in library.kiwix.org HOT 3
- Kiwix Server viewer „home“ button is most of he time not big enough HOT 1
- `kiwix::getDataDirectory()` should be moved to `kiwix/kiwix-desktop` repository HOT 1
- Relax the Content-Security-Policy to allow `mailto:` links in the Kiwix Serve iframe HOT 2
- ZIM size advertized in library is in MB while users see a MiB value in many other places HOT 2
- Remove Multiple Languages filter
- `OPDSParser.parse` is always returning true HOT 8
- Allocation of icu transliterator in removeAccents on apple fails HOT 2
- ZIM Illustration is resized in the catalog UI and hence a bit blurry HOT 2
- Expose support for i18n/translation in the public C++ API HOT 2
- kiwix-serve raises 500 error on `Or` search term HOT 10
- Libkiwix requires libzim 9.2.0 or higher, but Debian does not distribute it
- Improvement pkgconfig libkiwix HOT 3
- Compile shared library (dll) on Windows.
- kiwix-serve: issues with the viewer for ZIMs using fragment in the URLs HOT 1
- kiwix-serve: title is not updated dynamically inside the viewer
- Binary resources in libkiwix have been broken by dos2unix conversion
- On the nojs library page the download button click area is misleading
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libkiwix.