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
--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto