From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 0/3] qt5webkit: fix build issue using system leveldb
Date: Fri, 31 Aug 2018 23:19:30 +0200 [thread overview]
Message-ID: <20180831231930.58f7ca3e@windsurf> (raw)
In-Reply-To: <20180831202204.28093-1-gael.portay@savoirfairelinux.com>
Hello,
First of all: there are a *lot* of explanations in the cover letter,
but your commit logs are almost empty. The cover letter is lost in the
mailing list archives, while the commit logs are nicely preserved in
the Git history. Therefore, we want more explanations in the commit
logs!
On Fri, 31 Aug 2018 16:22:01 -0400, Ga?l PORTAY wrote:
> QtWebKit builds its own copy of leveldb [1] if it is not provided by the system
> (i.e. buildroot).
And indeed, using the leveldb library built by the leveldb Buildroot
package is better.
> It builds it differently and this is the origin of that
> issue. Instead of using the Makefile provided by leveldb [2], QtWebKit uses
> qmake to build that library [3].
>
> /home/naourr/work/instance-2/output/build/qt5webkit-5.9.1/Source/WebCore//.obj/platform/leveldb/LevelDBDatabase.o: In function `WebCore::LevelDBDatabase::openInMemory(WebCore::LevelDBComparator const*)':
> LevelDBDatabase.cpp.text._ZN7WebCore15LevelDBDatabase12openInMemoryEPKNS_17LevelDBComparatorE+0x34): undefined reference to `leveldb::NewMemEnv(leveldb::Env*)'
> collect2: error: ld returned 1 exit status
> make[3]: *** [Makefile.api:97: ../lib/libQt5WebKit.so.5.9.1] Error 1
>
> The missing symbol issue happens because the symbol leveldb::NewMemEnv is
> shipped in a static library named libmemenv.a (aside libleveldb.so) and that
> static library is *NOT* installed in the staging directory. Unfortunatly, that
> symbol is required latter by WebCore [4].
latter -> later.
Is it libleveldb.so itself that uses this symbol, or a separate part of
WebCore that directly uses some leveldb internals ?
> Note that the copy built by QtWebKit is an all-in-one library including both
> libleveldb and libmemenv *AND* thus QtWebKit links against libleveldb only.
> Also, note that the linker finds the buildroot's copy first; not its internal
> copy. That explains why it is complaining about a missing symbol.
>
> Fortunatly, QtWebKit provides a facility to link against the system leveldb
> package. The qmake flag WEBKIT_CONFIG+=use_system_leveldb tells Qt5WebKit to
> link against libleveldb *AND* libmemenv [5].
>
> To fix that issue, this patchset builds the leveldb package and tells QtWebKit
> to use it instead of building its own copy.
>
> The first two patches concern the leveldb package.
>
> The first one adds installation of headers and the missing static library in
> the staging directory.
I am a bit uneasy about this one, it seems to install "internal" stuff
of leveldb that are normally not meant to be installed. Do you/we
understand what this internal stuff, beyond just "it fixes qt5webkit" ?
> The second one patches leveldb to generate position independant code for the
> static library libmemenv.a; in order let it linkable by the Qt5WebKit module.
OK, I guess this is reasonable. We don't really build twice the object
files so that the .a object files are non-PIC and the .so object files
are PIC.
All in all, I'm just worried by the installation of what looks like
some internal library/headers of leveldb. Could you comment on this ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-08-31 21:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-31 20:22 [Buildroot] [PATCH 0/3] qt5webkit: fix build issue using system leveldb Gaël PORTAY
2018-08-31 20:22 ` [Buildroot] [PATCH 1/3] leveldb: install memenv static library and headers Gaël PORTAY
2018-08-31 20:22 ` [Buildroot] [PATCH 2/3] leveldb: generate pic for static libraries Gaël PORTAY
2018-08-31 20:22 ` [Buildroot] [PATCH 3/3] qt5webkit: select leveldb package Gaël PORTAY
2018-09-04 21:10 ` Arnout Vandecappelle
2018-09-05 6:53 ` Thomas Petazzoni
2018-08-31 21:19 ` Thomas Petazzoni [this message]
2018-09-02 20:21 ` [Buildroot] [PATCH 0/3] qt5webkit: fix build issue using system leveldb Gaël PORTAY
2018-09-03 22:53 ` Arnout Vandecappelle
2018-09-04 15:11 ` Gaël PORTAY
2018-09-04 21:09 ` Arnout Vandecappelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180831231930.58f7ca3e@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox