* Having trouble getting recipe to run in proper directory
@ 2017-10-05 0:16 Greg Wilson-Lindberg
2017-10-05 2:01 ` Paul Eggleton
0 siblings, 1 reply; 5+ messages in thread
From: Greg Wilson-Lindberg @ 2017-10-05 0:16 UTC (permalink / raw)
To: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1935 bytes --]
I'm trying to create a new recipe for a package that has a version and non-numeric rev in its name (canfestival-3-asc). I've gotten bitbake to unpack the package into a tree that looks ok, but it keeps trying to run the compile at least in the wrong directory. Here is the recipe:
SUMMARY = "Independent CANOpen® stack"
DESCRIPTION = "CanFestival focuses on providing an ANSI-C platform independent \
CANOpen® stack that can be built as master or slave nodes on PCs, \
Real-time IPCs, and Microcontrollers."
HOMEPAGE = "http://www.canfestival.org/"
SRCREV = "895:8973dd8be7e8"
SRC_URI = "hg://bitbucket.org/Mongo;protocol=https;module=canfestival-3-asc"
SRC_URI[md5sum] = ""
SRC_URI[sha256sum] = ""
PN = "canfestival"
PV = '3'
PR = 'asc'
LICENSE = "LGPL-2"
LIC_FILES_CHKSUM = "file://COPYING;md5= \
file://LICENCE;md5="
inherit autotools
# Specify any options you want to pass to the configure script using EXTRA_OECONF:
EXTRA_OECONF = "-can=socket -timers=unix -SDO_MAX_SIMULTANEOUS_TRANSFERS=25 \
-SDO_MAX_LENGTH_TRANSFER=4096 -MAX_NB_TIMER=128 -SDO_TIMEOUT_MS=1000"
PROVIDES = "canfestival"
The directory structure that bitbake builds is:
canfestival
3-asc
build
canfestival-3 # directory that bitbake is trying to compile in
canfestival-3-asc # directory that code was extracted to
temp
I'm not getting any errors from the configure task, but the log file looks like it is trying to run from the canfestival-3 directory, not the canfestival-3-asc. What can I do to the recipe to get the build to run in the canfestival-3-asc directory? Or, i guess, get bitbake to unpack the source into the canfestival-3, or a different directory that it will actually run the tasks in.
Regards,
Greg
[-- Attachment #2: Type: text/html, Size: 6134 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: Having trouble getting recipe to run in proper directory 2017-10-05 0:16 Having trouble getting recipe to run in proper directory Greg Wilson-Lindberg @ 2017-10-05 2:01 ` Paul Eggleton 2017-10-05 17:51 ` Greg Wilson-Lindberg 0 siblings, 1 reply; 5+ messages in thread From: Paul Eggleton @ 2017-10-05 2:01 UTC (permalink / raw) To: Greg Wilson-Lindberg; +Cc: yocto Hi Greg, On Thursday, 5 October 2017 1:16:15 PM NZDT Greg Wilson-Lindberg wrote: > I'm trying to create a new recipe for a package that has a version and non-numeric rev > in its name (canfestival-3-asc). I've gotten bitbake to unpack the package into a tree > that looks ok, but it keeps trying to run the compile at least in the wrong directory. > Here is the recipe: > > > SUMMARY = "Independent CANOpen® stack" > DESCRIPTION = "CanFestival focuses on providing an ANSI-C platform independent \ > CANOpen® stack that can be built as master or slave nodes on PCs, \ > Real-time IPCs, and Microcontrollers." > > HOMEPAGE = "http://www.canfestival.org/" > > SRCREV = "895:8973dd8be7e8" > > SRC_URI = "hg://bitbucket.org/Mongo;protocol=https;module=canfestival-3-asc" > SRC_URI[md5sum] = "" > SRC_URI[sha256sum] = "" > > PN = "canfestival" > PV = '3' > PR = 'asc' > > LICENSE = "LGPL-2" > LIC_FILES_CHKSUM = "file://COPYING;md5= \ > file://LICENCE;md5=" > > inherit autotools > > # Specify any options you want to pass to the configure script using EXTRA_OECONF: > EXTRA_OECONF = "-can=socket -timers=unix -SDO_MAX_SIMULTANEOUS_TRANSFERS=25 \ > -SDO_MAX_LENGTH_TRANSFER=4096 -MAX_NB_TIMER=128 -SDO_TIMEOUT_MS=1000" > > PROVIDES = "canfestival" > > The directory structure that bitbake builds is: > > > canfestival > > 3-asc > > build > > canfestival-3 # directory that bitbake is trying to compile in > > canfestival-3-asc # directory that code was extracted to > > temp > > > I'm not getting any errors from the configure task, but the log file looks like > it is trying to run from the canfestival-3 directory, not the canfestival-3-asc. What > can I do to the recipe to get the build to run in the canfestival-3-asc directory? > Or, i guess, get bitbake to unpack the source into the canfestival-3, or a > different directory that it will actually run the tasks in. So firstly the directory where the build system should expect to find the source after do_unpack is specified by the S variable, whose default is "${WORKDIR}/${BP}" where BP defaults to "${BPN}-${PV}" and BPN will be the same as PN in this case. However, you're setting the "asc" part in PR - typically PR is left under the control of the build system and thus your PV would typically be set to "3-asc" in which case S would default to the right value i.e. "canfestival-3-asc" (but if it didn't, you would just set S to fix it). To summarise, set PV = "3-asc" (or alternatively have it picked up from the file name, i.e. name it canfestival_3-asc.bb) and it should work as you expect. A couple of other notes: * For LICENSE, LGPL-2 isn't a standard value - LGPLv2, LGPLv2.0, LGPLv2.1, LGPL-2.0, or LGPL-2.1 (with or without + at the end) would be understood by the build system * You don't need SRC_URI md5sum/sha256sum for an hg:// URL. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Having trouble getting recipe to run in proper directory 2017-10-05 2:01 ` Paul Eggleton @ 2017-10-05 17:51 ` Greg Wilson-Lindberg 2017-10-05 19:18 ` Burton, Ross 0 siblings, 1 reply; 5+ messages in thread From: Greg Wilson-Lindberg @ 2017-10-05 17:51 UTC (permalink / raw) To: Paul Eggleton; +Cc: yocto@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 4682 bytes --] Hi Paul, I changed the name of the recipe to 'canfestival_3-asc.bb' and removed the PN, PV, & PR defines and that seems to have gotten bitbake to extract and execute into the same directory. I'm now getting an error from the 'configure' scripe: NOTE: Running ../canfestival-3-asc/configure --build=x86_64-linux --host=arm-poky-linux-gnueabi --target=arm-poky-linux-gnueabi --prefix=/usr --exec_prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --datadir=/usr/share --sysconfdir=/etc --sharedstatedir=/com --localstatedir=/var --libdir=/usr/lib --includedir=/usr/include --oldincludedir=/usr/include --infodir=/usr/share/info --mandir=/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/gwilson/Qt-5.9/Yocto-build-RPi3/build-raspberrypi3/tmp/sysroots/raspberrypi3 –can=socket –timers=unix –SDO_MAX_SIMULTANEOUS_TRANSFERS=25 –SDO_MAX_LENGTH_TRANSFER=4096 –MAX_NB_TIMER=128 –SDO_TIMEOUT_MS=1000 --disable-static ERROR: configure failed Unknown argument --build=x86_64-linux so bitbake is including an option that the configure script doesn't understand. Is there a way to delete that option? Thanks so much for you help, Greg ________________________________ From: Paul Eggleton <paul.eggleton@linux.intel.com> Sent: Wednesday, October 4, 2017 7:01:10 PM To: Greg Wilson-Lindberg Cc: yocto@yoctoproject.org Subject: Re: [yocto] Having trouble getting recipe to run in proper directory Hi Greg, On Thursday, 5 October 2017 1:16:15 PM NZDT Greg Wilson-Lindberg wrote: > I'm trying to create a new recipe for a package that has a version and non-numeric rev > in its name (canfestival-3-asc). I've gotten bitbake to unpack the package into a tree > that looks ok, but it keeps trying to run the compile at least in the wrong directory. > Here is the recipe: > > > SUMMARY = "Independent CANOpen® stack" > DESCRIPTION = "CanFestival focuses on providing an ANSI-C platform independent \ > CANOpen® stack that can be built as master or slave nodes on PCs, \ > Real-time IPCs, and Microcontrollers." > > HOMEPAGE = "http://www.canfestival.org/" > > SRCREV = "895:8973dd8be7e8" > > SRC_URI = "hg://bitbucket.org/Mongo;protocol=https;module=canfestival-3-asc" > SRC_URI[md5sum] = "" > SRC_URI[sha256sum] = "" > > PN = "canfestival" > PV = '3' > PR = 'asc' > > LICENSE = "LGPL-2" > LIC_FILES_CHKSUM = "file://COPYING;md5= \ > file://LICENCE;md5=" > > inherit autotools > > # Specify any options you want to pass to the configure script using EXTRA_OECONF: > EXTRA_OECONF = "-can=socket -timers=unix -SDO_MAX_SIMULTANEOUS_TRANSFERS=25 \ > -SDO_MAX_LENGTH_TRANSFER=4096 -MAX_NB_TIMER=128 -SDO_TIMEOUT_MS=1000" > > PROVIDES = "canfestival" > > The directory structure that bitbake builds is: > > > canfestival > > 3-asc > > build > > canfestival-3 # directory that bitbake is trying to compile in > > canfestival-3-asc # directory that code was extracted to > > temp > > > I'm not getting any errors from the configure task, but the log file looks like > it is trying to run from the canfestival-3 directory, not the canfestival-3-asc. What > can I do to the recipe to get the build to run in the canfestival-3-asc directory? > Or, i guess, get bitbake to unpack the source into the canfestival-3, or a > different directory that it will actually run the tasks in. So firstly the directory where the build system should expect to find the source after do_unpack is specified by the S variable, whose default is "${WORKDIR}/${BP}" where BP defaults to "${BPN}-${PV}" and BPN will be the same as PN in this case. However, you're setting the "asc" part in PR - typically PR is left under the control of the build system and thus your PV would typically be set to "3-asc" in which case S would default to the right value i.e. "canfestival-3-asc" (but if it didn't, you would just set S to fix it). To summarise, set PV = "3-asc" (or alternatively have it picked up from the file name, i.e. name it canfestival_3-asc.bb) and it should work as you expect. A couple of other notes: * For LICENSE, LGPL-2 isn't a standard value - LGPLv2, LGPLv2.0, LGPLv2.1, LGPL-2.0, or LGPL-2.1 (with or without + at the end) would be understood by the build system * You don't need SRC_URI md5sum/sha256sum for an hg:// URL. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre [-- Attachment #2: Type: text/html, Size: 10690 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Having trouble getting recipe to run in proper directory 2017-10-05 17:51 ` Greg Wilson-Lindberg @ 2017-10-05 19:18 ` Burton, Ross 2017-10-05 20:13 ` Greg Wilson-Lindberg 0 siblings, 1 reply; 5+ messages in thread From: Burton, Ross @ 2017-10-05 19:18 UTC (permalink / raw) To: Greg Wilson-Lindberg; +Cc: Paul Eggleton, yocto@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 818 bytes --] On 5 October 2017 at 18:51, Greg Wilson-Lindberg <GWilson@sakuraus.com> wrote: > ERROR: configure failed > Unknown argument --build=x86_64-linux > > so bitbake is including an option that the configure script doesn't > understand. Is there a way to delete that option > If configure doesn't recognise that option then it's not really autotools and you shouldn't be using the autotools class. Looking at it I'm right, https://bitbucket.org/Mongo/canfestival-3-asc/src/8973dd8be7e8d65a25f608fc57557c80edf20bb4/configure?at=default&fileviewer=file-view-default is just a hand-crafted script using bash that is called "configure". Don't inherit autotools, and instead look at the --help output and pass all the values you'll need to (such as --cc). Hopefully it cross-compiles correctly... Ross [-- Attachment #2: Type: text/html, Size: 1809 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Having trouble getting recipe to run in proper directory 2017-10-05 19:18 ` Burton, Ross @ 2017-10-05 20:13 ` Greg Wilson-Lindberg 0 siblings, 0 replies; 5+ messages in thread From: Greg Wilson-Lindberg @ 2017-10-05 20:13 UTC (permalink / raw) To: Burton, Ross; +Cc: Paul Eggleton, yocto@yoctoproject.org [-- Attachment #1: Type: text/plain, Size: 1279 bytes --] Hi Ross, Thanks for the insight, I guess I'll have to go back and do a bit more fiddling than I was thinking I might get by with, oh well. Greg From: Burton, Ross [mailto:ross.burton@intel.com] Sent: Thursday, October 05, 2017 12:18 PM To: Greg Wilson-Lindberg <GWilson@sakuraus.com> Cc: Paul Eggleton <paul.eggleton@linux.intel.com>; yocto@yoctoproject.org Subject: Re: [yocto] Having trouble getting recipe to run in proper directory On 5 October 2017 at 18:51, Greg Wilson-Lindberg <GWilson@sakuraus.com<mailto:GWilson@sakuraus.com>> wrote: ERROR: configure failed Unknown argument --build=x86_64-linux so bitbake is including an option that the configure script doesn't understand. Is there a way to delete that option If configure doesn't recognise that option then it's not really autotools and you shouldn't be using the autotools class. Looking at it I'm right, https://bitbucket.org/Mongo/canfestival-3-asc/src/8973dd8be7e8d65a25f608fc57557c80edf20bb4/configure?at=default&fileviewer=file-view-default is just a hand-crafted script using bash that is called "configure". Don't inherit autotools, and instead look at the --help output and pass all the values you'll need to (such as --cc). Hopefully it cross-compiles correctly... Ross [-- Attachment #2: Type: text/html, Size: 5845 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-10-05 20:13 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-10-05 0:16 Having trouble getting recipe to run in proper directory Greg Wilson-Lindberg 2017-10-05 2:01 ` Paul Eggleton 2017-10-05 17:51 ` Greg Wilson-Lindberg 2017-10-05 19:18 ` Burton, Ross 2017-10-05 20:13 ` Greg Wilson-Lindberg
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.