Giter VIP home page Giter VIP logo

Comments (5)

legoktm avatar legoktm commented on September 28, 2024

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.

zeux avatar zeux commented on September 28, 2024

@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.

legoktm avatar legoktm commented on September 28, 2024

@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.

mgautierfr avatar mgautierfr commented on September 28, 2024

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.

kelson42 avatar kelson42 commented on September 28, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.