Skip to contentSkip to conversation

Adding new library to yocto project

DISCUSSION Kfrell 3 participants 6 messages Mar 9, 2015

lore
Share & tools
lore

Kfrell

author
#0 lore raw

I am using Yocto and I just would like to integrate a new library in my project.

I create a new recipe named "libxerces" which contains a file "libxerces-3.1.1.bb". The bb file is quite simple and it is based on autotools :

DESCRIPTION = "Xerces-c is a validating xml parser written in C++" HOMEPAGE = "http://xerces.apache.org/xerces-c/"
PRIORITY = "optional"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"

PR = "r1"

SRC_URI = "http://mirror.serversupportforum.de/apache/xerces/c/3/sources/xerces-c-${PV}.tar.gz"

SRC_URI[md5sum] = "6a8ec45d83c8cfb1584c5a5345cb51ae" SRC_URI[sha256sum] = "a42785f71e0b91d5fd273831c87410ce60a73ccfdd207de1b805d26d44968736"

s="${WORKDIR}/xerces-c-${PV}"

inherit autotools pkgconfig

BBCLASSEXTEND += "native"

I added "libxerces" to my bb image by using IMAGE_INSTALL += " libxerces". Then, I try to build my image thru bitbake my-image-test and eveything is done correctly but libxerces returns some errors :

I just would like to create the .ipk package named libxerces in which .so files should be available.

#1 lore raw
Quoted 26 lines · Kfrell

I am using Yocto and I just would like to integrate a new library in my project.

I create a new recipe named "libxerces" which contains a file "libxerces-3.1.1.bb". The bb file is quite simple and it is based on autotools :

DESCRIPTION = "Xerces-c is a validating xml parser written in C++" HOMEPAGE = "http://xerces.apache.org/xerces-c/"
PRIORITY = "optional"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"

PR = "r1"

SRC_URI = "http://mirror.serversupportforum.de/apache/xerces/c/3/sources/xerces-c-${PV}.tar.gz"

SRC_URI[md5sum] = "6a8ec45d83c8cfb1584c5a5345cb51ae" SRC_URI[sha256sum] = "a42785f71e0b91d5fd273831c87410ce60a73ccfdd207de1b805d26d44968736"

s="${WORKDIR}/xerces-c-${PV}"

inherit autotools pkgconfig

Quoted 9 lines

BBCLASSEXTEND += "native"

I added "libxerces" to my bb image by using IMAGE_INSTALL += " libxerces". Then, I try to build my image thru bitbake my-image-test and eveything is done correctly but libxerces returns some errors :

I just would like to create the .ipk package named libxerces in which .so files should be available.

This might possibly help. The example I created shows how to build a package including an autotools generated library

https://wiki.yoctoproject.org/wiki/Building_your_own_recipes_from_first_principles

Regards, Alex

#2 lore raw
In reply to Kfrell
Quoted 4 lines · Kfrell

I added "libxerces" to my bb image by using IMAGE_INSTALL += " libxerces". Then, I try to build my image thru bitbake my-image-test and eveything is done correctly but libxerces returns some errors :

Packages containing libraries get renamed (by default) depending on the library name, so just because you called the recipe "libxerces" doesn't mean the resulting package is called that.

Have a look in tmp/work/[machine]/libxerces/deploy-* for the packages that were actually generated, it's probably something like libxerces-c.

Ross

author
#3 lore raw
Quoted 4 lines · Ross

On 9 March 2015 at 16:50, Kfrell

<[email protected]> wrote:I added
"libxerces" to my bb image by using IMAGE_INSTALL += " libxerces".

Quoted 4 lines

Then, I try to build my image thru bitbake my-image-test and eveything is done correctly but libxerces returns some errors :

Packages containing libraries get renamed (by default) depending on the

library name, so just because you called the recipe "libxerces" doesn't mean the resulting package is called that.

Quoted 2 lines

Have a look in tmp/work/[machine]/libxerces/deploy-* for the packages that

were actually generated, it's probably something like libxerces-c.

Quoted 4 lines

Ross

I had a look in this directory but under tmp/work/[machine]/libxerces/3.1.1-r1 there is only three folders named xerces-c-3.1.1, licence-destdir and temp. I checked under tmp/work/deploy/ipk and nothing is actually created.

I have the following errors :

ERROR: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
Rerun configure task after fixing this. build/tmp/work/oe-linux-gnueabi/libxerces/3.1.1-r1/xerces-c-3.1.1'
ERROR: Function failed: do_qa_configure
ERROR: Logfile of failure stored in:build/tmp/work/oe-linux-gnueabi/libxerces/3.1.1-r1/temp/log.do_configure.21943
ERROR: Task 541

#4 lore raw
Quoted 10 lines · Kfrell

ERROR: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
Rerun configure task after fixing this. build/tmp/work/oe-linux-gnueabi/libxerces/3.1.1-r1/xerces-c-3.1.1'
ERROR: Function failed: do_qa_configure
ERROR: Logfile of failure stored

in:build/tmp/work/oe-linux-gnueabi/libxerces/3.1.1-r1/temp/log.do_configure.21943
ERROR: Task 541

Oh right, you never included this in your first mail. As it says, configure is failing. There are no packages because nothing was compiled.

You'll need to have a look at the configure log output and configure script and determine what paths it is using from the host when it shouldn't be, and fix it. Obviously xerces has a pretty bad build system as I seem to recall this coming up once a year. Someone should fix it *and send the patch to Apache*.

Ross

author
#5 lore raw
In reply to Kfrell
Quoted 14 lines · Kfrell

I am using Yocto and I just would like to integrate a new library in my project.

I create a new recipe named "libxerces" which contains a file "libxerces-3.1.1.bb". The bb file is quite simple and it is based on autotools :

DESCRIPTION = "Xerces-c is a validating xml parser written in C++" HOMEPAGE = "http://xerces.apache.org/xerces-c/"
PRIORITY = "optional"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"

Quoted 4 lines

PR = "r1"

SRC_URI =

"http://mirror.serversupportforum.de/apache/xerces/c/3/sources/xerces-c-${PV}.tar.gz"

Quoted 9 lines

SRC_URI[md5sum] = "6a8ec45d83c8cfb1584c5a5345cb51ae" SRC_URI[sha256sum] = "a42785f71e0b91d5fd273831c87410ce60a73ccfdd207de1b805d26d44968736"

s="${WORKDIR}/xerces-c-${PV}"

inherit autotools pkgconfig

Quoted 9 lines

BBCLASSEXTEND += "native"

I added "libxerces" to my bb image by using IMAGE_INSTALL += " libxerces". Then, I try to build my image thru bitbake my-image-test and eveything is done correctly but libxerces returns some errors :

I just would like to create the .ipk package named libxerces in which .so files should be available.

I read almost all your example but nothing help me about my issues.

The actuel returned errors are :

ERROR: This autoconf log indicates errors it looked at host include and/or library paths while determining system capabilities. Rerun configure task after fixing this.The path was /build/tmp/work/oe-linux-gnueabi/libxerces/3.1.1-r1/xerces-c-3.1.1
ERROR: Function failed: do_qa_configure
ERROR: Logfile of failure stored in:
build/tmp/work/oe-linux-gnueabi/libxerces/3.1.1-r1/templog.do_configure.21943
ERROR: Task 541