[meta-freescale] How do I add the QSQLITE driver to the yocto build for wandboard

Stephen Munnings Stephen.Munnings at nuvation.com
Fri Apr 11 06:59:33 PDT 2014


Hi Erik,

Thanks for the help.

I will be trying this out to see what happens.

I had found the PACKAGECONFIG lines in recipes-qt/qt5/qtbase.inc (and something in qtbase-native.inc as well) but it was unclear how to "invoke" those packages (or if they were already being "invoked").
Your post has shed some light on that.

It is also unclear whether "invoking" this package is sufficient to get the plugin driver built.
There were some hints that it only allowed for some library to be built that was a pre-req for the driver (still unclear on that)

I will try this all out, and get back with my results - good, bad, or incomplete.

Thanks again,

Stephen

-----Original Message-----
From: Erik Botö [mailto:erik.boto at pelagicore.com] 
Sent: Friday, April 11, 2014 3:00 AM
To: Stephen Munnings
Cc: meta-freescale at yoctoproject.org
Subject: Re: [meta-freescale] How do I add the QSQLITE driver to the yocto build for wandboard

Hi Stephen,

Qt5 can be configured with a number of features disabled or enabled, the standard way of doing this in Yocto is using the PACKAGECONFIG feature [1]. In meta-qt5 there's a qtbase.inc which set up a pretty small set of enabled features as default, so what I would suggest is that you create a qtbase_%.bbappend where you extend those features.

If you look at https://github.com/meta-qt5/meta-qt5/blob/master/recipes-qt/qt5/qtbase.inc
you see that there are a number of different PACKAGECONFIG options relating to SQL:

PACKAGECONFIG[sql-ibase] = "-sql-ibase,-no-sql-ibase"
PACKAGECONFIG[sql-mysql] = "-sql-mysql,-no-sql-mysql,mysql"
PACKAGECONFIG[sql-psql] = "-sql-psql,-no-sql-psql,postgresql"
PACKAGECONFIG[sql-odbc] = "-sql-odbc,-no-sql-odbc"
PACKAGECONFIG[sql-oci] = "-sql-oci,-no-sql-oci"
PACKAGECONFIG[sql-tds] = "-sql-tds,-no-sql-tds"
PACKAGECONFIG[sql-db2] = "-sql-db2,-no-sql-db2"
PACKAGECONFIG[sql-sqlite2] = "-sql-sqlite2,-no-sql-sqlite2,sqlite"
PACKAGECONFIG[sql-sqlite] = "-sql-sqlite,-no-sql-sqlite,sqlite3"

In order to enable one of those you need to make sure that the PACKAGECONFIG variable contains e.g. "sql-sqlite". This can be done by adding PACKAGECONFIG_append = " sql-sqlite" to qtbase_%.bbappend.

[1] - http://www.yoctoproject.org/docs/current/ref-manual/ref-manual.html
, search for PACKAGECONFIG

Cheers,
Erik


On Thu, Apr 10, 2014 at 4:40 PM, Stephen Munnings <Stephen.Munnings at nuvation.com> wrote:
> Hi All,
>
>
>
> I am new to this list, so please be gentle in correcting flaws in my 
> post (all sorts).
>
> I am trying to get a Qt5 application to run on a Wandboard (remotely 
> debugged from a development host).
>
>
>
> I can get the Qt5 application running on the host machine (Ubuntu 13.10 VM).
>
> This application uses sqlite to access a database.
>
>
>
> When I attempt to remotely debug it on the target (wandboard), I get 
> the
> messages:
>
> QSqlDatabase: QSQLITE driver not loaded
>
> QSqlDatabase: available drivers:
>
>
>
> (nothing appears in the list).
>
>
>
> As I understand it, this means that I do not have the QSQLITE driver
> (plugin) built and installed on my target system.
>
> (A search shows it to be non-existent on the target system - as 
> opposed to simply not found)
>
>
>
> One of my co-workers has been successful in generating this driver 
> (and much other important stuff) by doing a "separate install" of 
> Qt5.1.1 onto the target machine.
>
> Separate meaning that it was built external to the yocto build 
> infrastructure (but using the cross-toolchain generated by yocto).
>
>
>
> We have added Qt5 to the yocto build, using the meta-qt5 layer and 
> following the wiki article:
> http://wiki.wandboard.org/index.php/Building_Qt5_using_yocto_on_Wandbo
> ard
>
>
>
> My understanding (which may or may not be correct) is that I should be 
> able to get the appropriate libraries (and in this case plugins) 
> cross-compiled and built for the target by using appropriate directives in the yocto build.
>
> (Either as a new layer, or as modifications to the local.conf and/or 
> the
> bblayers.conf)
>
>
>
> However, as I dig down through layers (pun intended) and layers of 
> code, control files, documentation, etc.,  I am becoming horribly 
> confused about how best to go about this.
>
>
>
> Could some kind person give me some quick guidance on how to get the 
> yocto build to create the QSQLITE driver plugin for the target file 
> system (wandboard)?
>
>
>
> Thanks in advance.
>
>
>
>
> --
> _______________________________________________
> meta-freescale mailing list
> meta-freescale at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale
>



--
=============================================
Erik Botö
Senior Software Engineer
Pelagicore AB
Ekelundsgatan 4, 6tr, SE-411 18 Gothenburg, Sweden
Mobile: +46 (0)76 881 72 03
E-Mail: erik.boto at pelagicore.com
=============================================


More information about the meta-freescale mailing list