Skip to contentSkip to conversation

python3-speechrecognition building using yocto recipe #yocto

DISCUSSION [email protected] 3 participants 3 messages Jun 21, 2023

lore
Share & tools
lore
#0 lore raw

Hi all,

I want to create .deb file of package python3-speechrecognition  , I  successfully builded natively on target board riscv platform and i copied binary from target board and with using  recipe i am copying binary in path: /usr/lib/python3.8/site-packages and trying  to create .deb file from using yocto environment.

speechrecognition recipe is-

*DESCRIPTION = "speechrecognition Packages with dependencies library's "*

*LICENSE = "CLOSED"*

*SRC_URI += "file://speechrecognition"*

*S = "${WORKDIR}/speechrecognition"*

*do_install() {*
*install -d  ${D}${libdir}/*
*cp -r ${S}/lib/* ${D}${libdir}/*
*}*

*FILES_${PN} += "${libdir}/*"

* I am facing one issue here:-

*ERROR: speechrecognition-3.9.0-r0 do_populate_sysroot: Fatal errors occurred in subprocesses:*
*Command '['riscv64-oe-linux-strip', '--remove-section=.comment', '--remove-section=.note', '/home/kush/khu/sources/khu-build/tmp-glibc/work/riscv64-oe-linux/speechrecognition/3.9.0-r0/sysroot-destdir/usr/lib/python3.8/site-packages/flac-linux-x86']' returned non-zero exit status 1.*

Quoted 11 lines

*Subprocess output:riscv64-oe-linux-strip: Unable to recognise the format
of the input file `/home/integration-team/kush/khu/sources/khu-build/tmp-glibc/work/riscv64-oe-linux/speechrecognition/3.9.0-r0/sysroot-destdir/usr/lib/python3.8/site-packages/flac-linux-x86'
* Can anyone help me in this, where i am wrong.

T&R
luvkhush
*
*

#1 lore raw

That's not how it works. You need to write a recipe that cross-builds the needed package from source. Taking prebuilt binaries from elsewhere is asking for trouble, and not recommended even for experienced developers.

Alex

Quoted 47 lines · On Wed, 21 Jun 2023 at 13:10, <[email protected]> wrote:

Hi all,

I want to create .deb file of package python3-speechrecognition , I successfully builded natively on target board riscv platform and i copied binary from target board and with using recipe i am copying binary in path: /usr/lib/python3.8/site-packages and trying to create .deb file from using yocto environment.

speechrecognition recipe is-

DESCRIPTION = "speechrecognition Packages with dependencies library's "

LICENSE = "CLOSED"

SRC_URI += "file://speechrecognition"

S = "${WORKDIR}/speechrecognition"

do_install() {
        install -d  ${D}${libdir}/
        cp -r ${S}/lib/* ${D}${libdir}/
}

FILES_${PN} += "${libdir}/*"

I am facing one issue here:-

ERROR: speechrecognition-3.9.0-r0 do_populate_sysroot: Fatal errors occurred in subprocesses:
Command '['riscv64-oe-linux-strip', '--remove-section=.comment', '--remove-section=.note', '/home/kush/khu/sources/khu-build/tmp-glibc/work/riscv64-oe-linux/speechrecognition/3.9.0-r0/sysroot-destdir/usr/lib/python3.8/site-packages/flac-linux-x86']' returned non-zero exit status 1.

Subprocess output:riscv64-oe-linux-strip: Unable to recognise the format of the input file `/home/integration-team/kush/khu/sources/khu-build/tmp-glibc/work/riscv64-oe-linux/speechrecognition/3.9.0-r0/sysroot-destdir/usr/lib/python3.8/site-packages/flac-linux-x86'

Can anyone help me in this, where i am wrong.

T&R
luvkhush

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#60372): https://lists.yoctoproject.org/g/yocto/message/60372
Mute This Topic: https://lists.yoctoproject.org/mt/99674007/1686489
Mute #yocto:https://lists.yoctoproject.org/g/yocto/mutehashtag/yocto Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#2 lore raw
In reply to [email protected]
Quoted 27 lines · On Wed, 2023-06-21 at 04:10 -0700, [email protected] wrote:

Hi all,

I want to create .deb file of package python3-speechrecognition  , I successfully builded natively on target board riscv platform and i copied binary from target board and with using  recipe i am copying binary in path: /usr/lib/python3.8/site-packages and trying  to create .deb file from using yocto environment.

speechrecognition recipe is-

DESCRIPTION = "speechrecognition Packages with dependencies library's "

LICENSE = "CLOSED"

SRC_URI += "file://speechrecognition"

S = "${WORKDIR}/speechrecognition"

do_install() {
        install -d  ${D}${libdir}/
        cp -r ${S}/lib/* ${D}${libdir}/
}

FILES_${PN} += "${libdir}/*"

Quoted 9 lines

I am facing one issue here:-

ERROR: speechrecognition-3.9.0-r0 do_populate_sysroot: Fatal errors occurred in subprocesses:
Command '['riscv64-oe-linux-strip', '--remove-section=.comment', '--remove-section=.note', '/home/kush/khu/sources/khu-build/tmp-glibc/work/riscv64-oe-linux/speechrecognition/3.9.0-r0/sysroot-destdir/usr/lib/python3.8/site-packages/flac-linux-x86']' returned non-zero exit status 1.

Quoted 5 lines

Subprocess output:riscv64-oe-linux-strip: Unable to recognise the format of the input file `/home/integration- team/kush/khu/sources/khu-build/tmp-glibc/work/riscv64-oe- linux/speechrecognition/3.9.0-r0/sysroot- destdir/usr/lib/python3.8/site-packages/flac-linux-x86'

I'll make a wild guess that the binary in "flac-linux-x86" is an x86 one and the riscv strip doesn't like x86 binaries.

I suspect your riscv target device doesn't like them much either.

Cheers,

Richard