Help required to create recipe for FANN library
Hi,
Would someone be able to help us create an oe bitbake recipe for the
Fast Artificial Neural Network Library ?
We have created an initial recipe, but the problem is don't know how to get this recipe to configure and install the library for the gumstix overo board.
If I look at the logs, nothing got configure or compiled when I look at the logs in the overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/libfann-2.0.0-r01/tmp folder.
I've looked at a couple of recipes and it all looks the same, so can't figure out why this particular library is unable to get configured or built.
Any help would be much appreciated!
Best regards,
Elvis
# libfann-2.0.0 recipie SECTION = "libs" DEFAULT_PREFERENCE = "1"
# Package information
DESCRIPTION = "libfann, Fast Artificial Neural Network Library is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks." LICENSE = "BSD"
PN = "libfann"
PV = "2.0.0"
PR = "r01"
SRC_URI = "http://prdownloads.sourceforge.net/fann/fann-${PV}.tar.bz2"
inherit autotools_stage pkgconfig
do_stage () {
oe_libinstall -a -so -C lib libfann ${STAGING_LIBDIR}
install -d ${STAGING_INCDIR}/fann
install -m 0644 src/include/vorbis/vorbisenc.h \
src/include/vorbis/vorbisfile.h \
src/include/vorbis/codec.h
src/include/compat_time.h \
src/include/config.h \
src/include/doublefann.h \
src/include/fann.h \
src/include/fann_activation.h \
src/include/fann_cascade.h \
src/include/fann_data.h \
src/include/fann_error.h \
src/include/fann_internal.h \
src/include/fann_io.h \
src/include/fann_train.h \
src/include/fixedfann.h \
src/include/floatfann.h ${STAGING_INCDIR}/fann/
install -d ${STAGING_DATADIR}/aclocal
install -m 0644 aclocal.m4 ${STAGING_DATADIR}/aclocal/
}Quoted 16 lines · Elvis Dowson
inherit
autotools_stagepkgconfig
do_stage() {oe_libinstall-a -so -C lib libfann ${STAGING_LIBDIR} install -d ${STAGING_INCDIR}/fann
install -m 0644src/include/vorbis/vorbisenc.h\src/include/vorbis/vorbisfile.h\src/include/vorbis/codec.hsrc/include/compat_time.h\src/include/config.h\src/include/doublefann.h\src/include/fann.h\src/include/fann_activation.h\src/include/fann_cascade.h\src/include/fann_data.h\src/include/fann_error.h\
Quoted 8 lines
src/include/fann_internal.h\src/include/fann_io.h\src/include/fann_train.h\src/include/fixedfann.h\src/include/floatfann.h${STAGING_INCDIR}/fann/ install -d ${STAGING_DATADIR}/aclocal
install -m 0644 aclocal.m4 ${STAGING_DATADIR}/aclocal/ }
Why are you using autotools_stage if you're not going to use its staging method?
Hi Koen,
Quoted 27 lines · Koen Kooi
Quoted 16 lines · Elvis Dowson
inherit
autotools_stagepkgconfig
do_stage() {oe_libinstall-a -so -C lib libfann ${STAGING_LIBDIR} install -d ${STAGING_INCDIR}/fann
install -m 0644src/include/vorbis/vorbisenc.h\src/include/vorbis/vorbisfile.h\src/include/vorbis/codec.hsrc/include/compat_time.h\src/include/config.h\src/include/doublefann.h\src/include/fann.h\src/include/fann_activation.h\src/include/fann_cascade.h\src/include/fann_data.h\src/include/fann_error.h\Quoted 8 lines
src/include/fann_internal.h\src/include/fann_io.h\src/include/fann_train.h\src/include/fixedfann.h\src/include/floatfann.h${STAGING_INCDIR}/fann/ install -d ${STAGING_DATADIR}/aclocal
install -m 0644 aclocal.m4 ${STAGING_DATADIR}/aclocal/ }
Quoted 2 lines
Why are you using
autotools_stageif you're not going to use its staging method?
I don't know these command. Could you help me correct this recipe?
Best regards,
Elvis
Quoted 31 lines · Elvis Dowson
Hi Koen,
Quoted 27 lines · Koen Kooi
Quoted 24 lines · Elvis Dowson
inherit
autotools_stagepkgconfig
do_stage() {oe_libinstall-a -so -C lib libfann ${STAGING_LIBDIR} install -d ${STAGING_INCDIR}/fann
install -m 0644src/include/vorbis/vorbisenc.h\src/include/vorbis/vorbisfile.h\src/include/vorbis/codec.hsrc/include/compat_time.h\src/include/config.h\src/include/doublefann.h\src/include/fann.h\src/include/fann_activation.h\src/include/fann_cascade.h\src/include/fann_data.h\src/include/fann_error.h\src/include/fann_internal.h\src/include/fann_io.h\src/include/fann_train.h\src/include/fixedfann.h\src/include/floatfann.h${STAGING_INCDIR}/fann/ install -d ${STAGING_DATADIR}/aclocal
install -m 0644 aclocal.m4 ${STAGING_DATADIR}/aclocal/ }
Quoted 4 lines
Quoted 2 lines
Why are you using
autotools_stageif you're not going to use its staging method?I don't know these command. Could you help me correct this recipe?
The "inherit autotools_stage" provides the do_stage method. Remove the do_stage method and see what happens.
Philip
Hi Philip,
I think I tried that earlier and got the same results.
ERROR: function do_install failed
Could you try the recipe at your end?
# libfann-2.0.0 recipie SECTION = "libs" DEFAULT_PREFERENCE = "1"
# Package information
DESCRIPTION = "libfann, Fast Artificial Neural Network Library is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks." LICENSE = "BSD"
PN = "libfann"
PV = "2.0.0"
PR = "r01"
SRC_URI = "http://prdownloads.sourceforge.net/fann/fann-${PV}.tar.bz2"
inherit autotools_stage pkgconfig
If you look at the log files, nothing gets configured or compiled. And the image folder is empty.
Best regards,
Elvis
[elvis@zeus overo-oe]$ bitbake libfann-2.0.0
NOTE: Handling BitBake files: \ (6912/6912) [100 %]
NOTE: Parsing finished. 6632 cached, 8 parsed, 272 skipped, 2 masked.
NOTE: Resolving any missing task queue dependencies
NOTE: Preparing runqueue
NOTE: Executing runqueue
NOTE: Running task 271 of 435 (ID: 1, /tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb, do_setscene)
NOTE: Running task 420 of 435 (ID: 2, /tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb, do_fetch)
NOTE: Running task 421 of 435 (ID: 3, /tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb, do_unpack)
NOTE: Running task 422 of 435 (ID: 13, /tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb, do_distribute_sources)
NOTE: Unpacking /usr/share/sources/fann-2.0.0.tar.bz2 to tmp/work/armv7a-angstrom-linux-gnueabi/libfann-2.0.0-r01/
NOTE: Running task 423 of 435 (ID: 4, /tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb, do_patch)
NOTE: Running task 424 of 435 (ID: 5, /tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb, do_configure)
NOTE: Running task 425 of 435 (ID: 6, /tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb, do_qa_configure)
NOTE: Running task 426 of 435 (ID: 7, /tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb, do_compile)
NOTE: Running task 427 of 435 (ID: 8, /tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb, do_install)
ERROR: function do_install failed
ERROR: log data follows (/tool/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/libfann-2.0.0-r01/temp/log.do_install.16832)
| NOTE: make DESTDIR=/tool/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/libfann-2.0.0-r01/image install | make: *** No rule to make target `install'. Stop. | FATAL: oe_runmake failed
NOTE: Task failed: /tool/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/libfann-2.0.0-r01/temp/log.do_install.16832
ERROR: TaskFailed event exception, aborting
ERROR: Build of /tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb do_install failed
ERROR: Task 8 (/tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb, do_install) failed
NOTE: Tasks Summary: Attempted 426 tasks of which 418 didn't need to be rerun and 1 failed.
ERROR: '/tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb' failed
[elvis@zeus overo-oe]$
Hello,
Quoted 4 lines · Elvis Dowson
If you look at the log files, nothing gets configured or compiled. And the image folder is empty.
Try setting the S variable in the recipe.
See other recipes for an example.
Regards,
Signature · 1 line
Leon
Hi Leon,
Quoted 2 lines · Leon Woestenberg
Quoted 1 line
Try setting the S variable in the recipe.
I tried this, it didn't work, still gave the same error because the image folder is empty so there is nothing to install. When I look at the log files, nothing got configured and nothing got compiled. This is a strange one!! :-)
ERROR: function do_install failed
ERROR: log data follows (/tool/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/libfann-2.0.0-r01/temp/log.do_install.7946)
| NOTE: make DESTDIR=/tool/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/libfann-2.0.0-r01/image install | make: *** No rule to make target `install'. Stop. | FATAL: oe_runmake failed
NOTE: Task failed: /tool/overo-oe/tmp/work/armv7a-angstrom-linux-gnueabi/libfann-2.0.0-r01/temp/log.do_install.7946
ERROR: TaskFailed event exception, aborting
ERROR: Build of /tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb do_install failed
ERROR: Task 8 (/tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb, do_install) failed
NOTE: Tasks Summary: Attempted 426 tasks of which 418 didn't need to be rerun and 1 failed.
ERROR: '/tool/overo-oe/user.collection/recipes/libfann/libfann_2.0.0.bb' failed
Best regards,
Elvis
# libfann-2.0.0 recipie SECTION = "libs" DEFAULT_PREFERENCE = "1"
# Package information
DESCRIPTION = "libfann, Fast Artificial Neural Network Library is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks." LICENSE = "BSD"
PN = "libfann"
PV = "2.0.0"
PR = "r01"
SRC_URI = "http://prdownloads.sourceforge.net/fann/fann-${PV}.tar.bz2"
S = "${WORKDIR}/libfann-${PV}"
inherit autotools_stage pkgconfig
Hi Leon,
Quoted 3 lines · Leon Woestenberg
Quoted 1 line
Try setting the S variable in the recipe.
It worked. I set the S variable wrong. The correct one is
S = "${WORKDIR}/fann-${PV}"
I'm attaching the working recipe below.
Best regards,
Elvis
# libfann-2.0.0 recipie SECTION = "libs" DEFAULT_PREFERENCE = "1"
# Package information
DESCRIPTION = "libfann, Fast Artificial Neural Network Library is a free open source neural network library, which implements multilayer artificial neural networks in C with support for both fully connected and sparsely connected networks." LICENSE = "BSD"
PN = "libfann"
PV = "2.0.0"
PR = "r01"
SRC_URI = "http://prdownloads.sourceforge.net/fann/fann-${PV}.tar.bz2"
S = "${WORKDIR}/fann-${PV}"
inherit autotools_stage pkgconfig
Hi,
When building the FANN library, I get the following message:
NOTE: Multiple libraries (libfann.so.2, libdoublefann.so.2, libfixedfann.so.2, libfloatfann.so.2) found and LEAD_SONAME not defined
What is the use of the LEAD_SONAME?
What should I do to make this recipe better and fix the following messages:
NOTE: Not creating empty archive for libfann-doc-2.0.0-r01.2
NOTE: Not creating empty archive for libfann-locale-2.0.0-r01.2
Best regards,
Elvis
Quoted 7 lines · Elvis Dowson
Hi,
When building the FANN library, I get the following message:NOTE: Multiple libraries (libfann.so.2, libdoublefann.so.2, libfixedfann.so.2, libfloatfann.so.2) found and
LEAD_SONAMEnot definedWhat is the use of the
LEAD_SONAME?
You should probably ignore LEAD_SONAME; this mechanism seemed like a good idea at the time but with hindsight it was not such a clever plan. The right way to fix this warning is to put each of the libraries in its own output package.
p.
Quoted 4 lines · Phil Blundell
Quoted 3 lines · Elvis Dowson
Hi,
When building the FANN library, I get the following message:
Quoted 8 lines
Quoted 3 lines
NOTE: Multiple libraries (libfann.so.2, libdoublefann.so.2, libfixedfann.so.2, libfloatfann.so.2) found and
LEAD_SONAMEnot definedWhat is the use of the
LEAD_SONAME?You should probably ignore
LEAD_SONAME; this mechanism seemed like a good idea at the time but with hindsight it was not such a clever plan. The right way to fix this warning is to put each of the libraries in its own output package.
Do you have a hint on how to do that? I've had the same question.
Philip
Quoted 8 lines · Philip Balister
Quoted 7 lines · Phil Blundell
Quoted 6 lines · Elvis Dowson
Hi,
When building the FANN library, I get the following message:NOTE: Multiple libraries (libfann.so.2, libdoublefann.so.2, libfixedfann.so.2, libfloatfann.so.2) found and
LEAD_SONAMEnot defined
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
What is the use of the
LEAD_SONAME?You should probably ignore
LEAD_SONAME; this mechanism seemed like a good idea at the time but with hindsight it was not such a clever plan. The right way to fix this warning is to put each of the libraries in its own output package.Do you have a hint on how to do that? I've had the same question.
Right now, I think the only way is to do it by steam, something like:
PACKAGES =+ "libfann libdoublefann libfixedfann libfloatfann" FILES_libfann = "${libdir}/libfann${SOLIBS}" FILES_libdoublefan = "${libdir}/libdoublefan${SOLIBS}"
...
You can leave the -dev bits alone, it doesn't really hurt for them to go into one big package.
Obviously there's some scope for automating this a bit: it'd be nice to be able to just say
PACKAGE_SHLIBS = "libfann libdoublefann libfixedfann libfloatfann"
and have the other stuff be generated automatically. That'd probably be a fairly straightforward patch to package.bbclass if someone wanted to have a go.
p.
Hi Phil,
Quoted 7 lines · Phil Blundell
Right now, I think the only way is to do it by steam, something like:
PACKAGES =+ "libfann libdoublefann libfixedfann libfloatfann"
FILES_libfann= "${libdir}/libfann${SOLIBS}"FILES_libdoublefan= "${libdir}/libdoublefan${SOLIBS}"
...
I did as you suggested but get the following errors:
-------------------
ERROR: libfann is listed in PACKAGES multiple times, this leads to packaging errors.
ERROR: Please fix the metadata/report this as bug to OE bugtracker.
ERROR: -------------------
Best regards,
Elvis
Quoted 12 lines · Elvis Dowson
Hi Phil,
Quoted 7 lines · Phil Blundell
Right now, I think the only way is to do it by steam, something like:
PACKAGES =+ "libfann libdoublefann libfixedfann libfloatfann"
FILES_libfann= "${libdir}/libfann${SOLIBS}"FILES_libdoublefan= "${libdir}/libdoublefan${SOLIBS}"
...
Quoted 8 lines
I did as you suggested but get the following errors:
-------------------
ERROR: libfann is listed in PACKAGES multiple times, this leads to packaging errors.
ERROR: Please fix the metadata/report this as bug to OE bugtracker.
ERROR: -------------------
If your recipe itself is named "libfann" then it will appear in PACKAGES automatically (as ${PN}); you don't need to add it explicitly.
p.
Hello,
Quoted 10 lines · Phil Blundell
Quoted 6 lines · Elvis Dowson
When building the FANN library, I get the following message:
NOTE: Multiple libraries (libfann.so.2, libdoublefann.so.2, libfixedfann.so.2, libfloatfann.so.2) found and
LEAD_SONAMEnot definedWhat is the use of the
LEAD_SONAME?You should probably ignore
LEAD_SONAME; this mechanism seemed like a good idea at the time but with hindsight it was not such a clever plan.
In an OpenEmbedded world with new variables appearing at a weekly rate, let's try to clean out those who were a bad idea in hindsight :-)
If there is consensus on this (and this is reviewed by a few core people) how about we do some refactoring to clean things up and have LEAD_SONAME removed?
Regards,
Signature · 1 line
Leon
Quoted 3 lines · Leon Woestenberg
If there is consensus on this (and this is reviewed by a few core people) how about we do some refactoring to clean things up and have
LEAD_SONAMEremoved?
That would be nice: it'd be a bonus for the micro distribution in particular. Unfortunately, there are quite a few packages using it, and it's moderately hard to eliminate without breaking backwards packaging compatibility so this would be a fair amount of work. Most notably, both uclibc and glibc are currently blighted by its presence so almost every distribution would be affected by that kind of change.
p.
Hi,
How can I get all the headers for the fann library to appear in $
{STAGING_INCDIR}/libfann
right now all the headers are located in ${STAGING_INCDIR} which corresponds to overo-oe/tmp/staging/armv7a-angstrom-linux-gnueabi/usr/include on my machine.
Elvis