Comments (6)
How have you compile/install kiwix-lib ? static or dynamic ?
from libkiwix.
I'd totally forget but I added the right link flags in the kiwix-build.py script.
That was a mistake :/
Now, meson add the right flags itself if we use the -Dstatic-linkage=true
option.
If all depedency libraries are correctly installed, you should be able to compile a static binaries with :
meson -Dstatic-linkage=true . build
You don't need --default-library=static
anymore as this is usefull only when compiling libraries and
kiwix-tools doesn't have library.
from libkiwix.
@mgautierfr starmad I have try again (with the new meson command line arguments) and now I get an other error
$ ninja
[1/14] 'Generating resources with a custom command.'
jquery-ui/jquery-ui.structure.min.css ['jquery_ui', 'jquery_ui_structure_min_css']
jquery-ui/jquery-ui.min.js ['jquery_ui', 'jquery_ui_min_js']
jquery-ui/external/jquery/jquery.js ['jquery_ui', 'external', 'jquery', 'jquery_js']
jquery-ui/images/ui-bg_flat_0_aaaaaa_40x100.png ['jquery_ui', 'images', 'ui_bg_flat_0_aaaaaa_40x100_png']
jquery-ui/images/ui-bg_flat_75_ffffff_40x100.png ['jquery_ui', 'images', 'ui_bg_flat_75_ffffff_40x100_png']
jquery-ui/images/ui-icons_222222_256x240.png ['jquery_ui', 'images', 'ui_icons_222222_256x240_png']
jquery-ui/images/ui-bg_glass_55_fbf9ee_1x400.png ['jquery_ui', 'images', 'ui_bg_glass_55_fbf9ee_1x400_png']
jquery-ui/images/ui-bg_highlight-soft_75_cccccc_1x100.png ['jquery_ui', 'images', 'ui_bg_highlight_soft_75_cccccc_1x100_png']
jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png ['jquery_ui', 'images', 'ui_bg_glass_65_ffffff_1x400_png']
jquery-ui/images/ui-icons_2e83ff_256x240.png ['jquery_ui', 'images', 'ui_icons_2e83ff_256x240_png']
jquery-ui/images/ui-icons_cd0a0a_256x240.png ['jquery_ui', 'images', 'ui_icons_cd0a0a_256x240_png']
jquery-ui/images/ui-icons_888888_256x240.png ['jquery_ui', 'images', 'ui_icons_888888_256x240_png']
jquery-ui/images/ui-bg_glass_75_e6e6e6_1x400.png ['jquery_ui', 'images', 'ui_bg_glass_75_e6e6e6_1x400_png']
jquery-ui/images/animated-overlay.gif ['jquery_ui', 'images', 'animated_overlay_gif']
jquery-ui/images/ui-bg_glass_75_dadada_1x400.png ['jquery_ui', 'images', 'ui_bg_glass_75_dadada_1x400_png']
jquery-ui/images/ui-icons_454545_256x240.png ['jquery_ui', 'images', 'ui_icons_454545_256x240_png']
jquery-ui/images/ui-bg_glass_95_fef1ec_1x400.png ['jquery_ui', 'images', 'ui_bg_glass_95_fef1ec_1x400_png']
jquery-ui/jquery-ui.theme.min.css ['jquery_ui', 'jquery_ui_theme_min_css']
jquery-ui/jquery-ui.min.css ['jquery_ui', 'jquery_ui_min_css']
home.html.tmpl ['home_html_tmpl']
include.html.part ['include_html_part']
taskbar.css ['taskbar_css']
taskbar.html.part ['taskbar_html_part']
[3/14] Compiling cpp object 'src/searcher/kiwix-search@exe/kiwix-search.cpp.o'
../src/searcher/kiwix-search.cpp: In function ‘int main(int, char**)’:
../src/searcher/kiwix-search.cpp:109:12: warning: deleting object of abstract class type ‘kiwix::Searcher’ which has non-virtual destructor will cause undefined behaviour [-Wdelete-non-virtual-dtor]
delete searcher;
^
../src/searcher/kiwix-search.cpp:38:8: warning: variable ‘verboseFlag’ set but not used [-Wunused-but-set-variable]
bool verboseFlag = false;
^
../src/searcher/kiwix-search.cpp:41:20: warning: variable ‘backend’ set but not used [-Wunused-but-set-variable]
supportedBackend backend = XAPIAN;
^
[5/14] Compiling cpp object 'src/reader/kiwix-read@exe/kiwix-read.cpp.o'
../src/reader/kiwix-read.cpp: In function ‘int main(int, char**)’:
../src/reader/kiwix-read.cpp:91:18: warning: unused variable ‘contentLength’ [-Wunused-variable]
unsigned int contentLength = 0;
^
[7/14] Linking target src/searcher/kiwix-search
FAILED: src/searcher/kiwix-search
c++ -o src/searcher/kiwix-search 'src/searcher/kiwix-search@exe/kiwix-search.cpp.o' '-L/usr/local/lib/x86_64-linux-gnu' '-L/usr/local/lib/pugixml-1.8' '-L/usr/local/lib' '-Wl,--no-undefined' '-Wl,--as-needed' '-static-libstdc++' '--static' '-pthread' '-lkiwix' '-lzim' '-llzma' '-licui18n' '-licuuc' '-licudata' '-ldl' '-lm' '-lpugixml' '-lxapian' '-lmicrohttpd' '-lgcrypt' '-lgnutls' '/usr/lib/x86_64-linux-gnu/libz.so' '-Wl,-rpath' '-Wl,/usr/lib/x86_64-linux-gnu' '-lp11-kit' '-lgmp' '-lhogweed' '-lgmp' '-lnettle' '-ltasn1' '-lidn' '-lp11-kit' '-lz' '-lctpp2' '-lz'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libicuuc.a(putil.ao): In function `uprv_dl_open_55':
(.text+0x18c2): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: cannot find -lxapian
/usr/bin/ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libz.so'
collect2: error: ld returned 1 exit status
[8/14] Linking target src/indexer/kiwix-index
FAILED: src/indexer/kiwix-index
c++ -o src/indexer/kiwix-index 'src/indexer/kiwix-index@exe/kiwix-index.cpp.o' '-L/usr/local/lib/x86_64-linux-gnu' '-L/usr/local/lib/pugixml-1.8' '-L/usr/local/lib' '-Wl,--no-undefined' '-Wl,--as-needed' '-static-libstdc++' '--static' '-pthread' '-lkiwix' '-lzim' '-llzma' '-licui18n' '-licuuc' '-licudata' '-ldl' '-lm' '-lpugixml' '-lxapian' '-lmicrohttpd' '-lgcrypt' '-lgnutls' '/usr/lib/x86_64-linux-gnu/libz.so' '-Wl,-rpath' '-Wl,/usr/lib/x86_64-linux-gnu' '-lp11-kit' '-lgmp' '-lhogweed' '-lgmp' '-lnettle' '-ltasn1' '-lidn' '-lp11-kit' '-lz' '-lctpp2' '-lz'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libicuuc.a(putil.ao): In function `uprv_dl_open_55':
(.text+0x18c2): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: cannot find -lxapian
/usr/bin/ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libz.so'
collect2: error: ld returned 1 exit status
[9/14] Linking target src/reader/kiwix-read
FAILED: src/reader/kiwix-read
c++ -o src/reader/kiwix-read 'src/reader/kiwix-read@exe/kiwix-read.cpp.o' '-L/usr/local/lib/x86_64-linux-gnu' '-L/usr/local/lib/pugixml-1.8' '-L/usr/local/lib' '-Wl,--no-undefined' '-Wl,--as-needed' '-static-libstdc++' '--static' '-pthread' '-lkiwix' '-lzim' '-llzma' '-licui18n' '-licuuc' '-licudata' '-ldl' '-lm' '-lpugixml' '-lxapian' '-lmicrohttpd' '-lgcrypt' '-lgnutls' '/usr/lib/x86_64-linux-gnu/libz.so' '-Wl,-rpath' '-Wl,/usr/lib/x86_64-linux-gnu' '-lp11-kit' '-lgmp' '-lhogweed' '-lgmp' '-lnettle' '-ltasn1' '-lidn' '-lp11-kit' '-lz' '-lctpp2' '-lz'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libicuuc.a(putil.ao): In function `uprv_dl_open_55':
(.text+0x18c2): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: cannot find -lxapian
/usr/bin/ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libz.so'
collect2: error: ld returned 1 exit status
[10/14] Linking target src/installer/kiwix-install
FAILED: src/installer/kiwix-install
c++ -o src/installer/kiwix-install 'src/installer/kiwix-install@exe/kiwix-install.cpp.o' '-L/usr/local/lib/x86_64-linux-gnu' '-L/usr/local/lib/pugixml-1.8' '-L/usr/local/lib' '-Wl,--no-undefined' '-Wl,--as-needed' '-static-libstdc++' '--static' '-pthread' '-lkiwix' '-lzim' '-llzma' '-licui18n' '-licuuc' '-licudata' '-ldl' '-lm' '-lpugixml' '-lxapian' '-lmicrohttpd' '-lgcrypt' '-lgnutls' '/usr/lib/x86_64-linux-gnu/libz.so' '-Wl,-rpath' '-Wl,/usr/lib/x86_64-linux-gnu' '-lp11-kit' '-lgmp' '-lhogweed' '-lgmp' '-lnettle' '-ltasn1' '-lidn' '-lp11-kit' '-lz' '-lctpp2' '-lz'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libicuuc.a(putil.ao): In function `uprv_dl_open_55':
(.text+0x18c2): warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: cannot find -lxapian
/usr/bin/ld: attempted static link of dynamic object `/usr/lib/x86_64-linux-gnu/libz.so'
collect2: error: ld returned 1 exit status
[11/14] Compiling cpp object 'src/server/kiwix-serve@exe/kiwix-serve.cpp.o'
../src/server/kiwix-serve.cpp: In function ‘MHD_Response* build_response(const void*, unsigned int, const string&, const string&, bool, bool)’:
../src/server/kiwix-serve.cpp:200:36: warning: ‘MHD_Response* MHD_create_response_from_data(size_t, void*, int, int)’ is deprecated [-Wdeprecated-declarations]
struct MHD_Response * response = MHD_create_response_from_data(length,
^
In file included from ../src/server/kiwix-serve.cpp:74:0:
/usr/include/microhttpd.h:2022:1: note: declared here
MHD_create_response_from_data (size_t size,
^
../src/server/kiwix-serve.cpp:200:36: warning: ‘MHD_Response* MHD_create_response_from_data(size_t, void*, int, int)’ is deprecated [-Wdeprecated-declarations]
struct MHD_Response * response = MHD_create_response_from_data(length,
^
In file included from ../src/server/kiwix-serve.cpp:74:0:
/usr/include/microhttpd.h:2022:1: note: declared here
MHD_create_response_from_data (size_t size,
^
../src/server/kiwix-serve.cpp:203:73: warning: ‘MHD_Response* MHD_create_response_from_data(size_t, void*, int, int)’ is deprecated [-Wdeprecated-declarations]
MHD_YES);
^
In file included from ../src/server/kiwix-serve.cpp:74:0:
/usr/include/microhttpd.h:2022:1: note: declared here
MHD_create_response_from_data (size_t size,
^
../src/server/kiwix-serve.cpp: In function ‘MHD_Response* handle_random(MHD_Connection*, int&, kiwix::Reader*, kiwix::Searcher*, const string&, const string&, bool)’:
../src/server/kiwix-serve.cpp:429:8: warning: unused variable ‘cacheEnabled’ [-Wunused-variable]
bool cacheEnabled = false;
^
../src/server/kiwix-serve.cpp: In function ‘MHD_Response* handle_content(MHD_Connection*, int&, kiwix::Reader*, kiwix::Searcher*, const string&, const string&, bool)’:
../src/server/kiwix-serve.cpp:452:16: warning: unused variable ‘contentLength’ [-Wunused-variable]
unsigned int contentLength;
^
../src/server/kiwix-serve.cpp: In function ‘int accessHandlerCallback(void*, MHD_Connection*, const char*, const char*, const char*, const char*, size_t*, void**)’:
../src/server/kiwix-serve.cpp:596:14: warning: unused variable ‘acceptRange’ [-Wunused-variable]
const bool acceptRange = acceptRangeHeaderValue != NULL;
^
../src/server/kiwix-serve.cpp: In function ‘int main(int, char**)’:
../src/server/kiwix-serve.cpp:959:10: warning: unused variable ‘host’ [-Wunused-variable]
char host[NI_MAXHOST];
^
[12/14] Compiling cpp object 'src/server/kiwix-serve@exe/static_server_server-resources.cpp.o'
ninja: build stopped: subcommand failed.
from libkiwix.
I see two errors :
- It cannot find xapian
- It try to link with
/usr/lib/x86_64-linux-gnu/libz.so
For the first one : How have you installed xapian ?
For the second one, this is a bug in the pgkconfig file gnutls.pc provided by ubuntu package. It include a direct path to the .so file and so break the static compilation. gnutls is a dependency of libmicrohttpd.
I've opened a bug for this (https://bugs.launchpad.net/ubuntu/+source/gnutls28/+bug/1660915) but for now, you must compile you're own version of libmicrohttpd without gnutls.
from libkiwix.
I have installed Xapian 1.4.2 manually
$ xapian-config --version
xapian-config - xapian-core 1.4.2
For libz, I think this should be added directly as a dependency of kiwix-tools/kiwix-serve, as kiwix-serve uses the zlib directly to compress content with deflate.
from libkiwix.
@mgautierfr Everything seems to work fine now. Thanks for your help.
from libkiwix.
Related Issues (20)
- 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
- magnet link is not visible on kiwix-serve HOT 1
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.