[yocto] Adding nInvaders game package recipe

Mohamed Youseif MohamedYouseif at outlook.com
Thu Sep 20 04:59:37 PDT 2018


Thanks, Ross I had modified the makefile like what you said and now it works fine.

Yusuf
________________________________
From: Burton, Ross <ross.burton at intel.com>
Sent: Thursday, September 20, 2018 12:43 PM
To: MohamedYouseif at outlook.com
Cc: Yocto-mailing-list
Subject: Re: [yocto] Adding nInvaders game package recipe

So your makefile is explictly saying "ignore the value from the
environment, always use gcc on the host".

Delete that line from the makefile, the default is good and then the
environment value to set CC to the cross compiler will work.

This is why people shouldn't hand-code Makefiles: it is harder than it
looks.  This makefile probably isn't respecting CFLAGS/LD/LDFLAGS
either.

Ross
On Thu, 20 Sep 2018 at 11:00, Mohamed Youseif
<MohamedYouseif at outlook.com> wrote:
>
> I had run the command and it prints out that:
>
> nInvaders: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=73d88937de4f28a243ba40001af8dbd5c1ca3ac8, not stripped
>
> the ${CC} in makefile is defined as
> CC=gcc
> ________________________________
> From: Burton, Ross <ross.burton at intel.com>
> Sent: Thursday, September 20, 2018 11:28 AM
> To: MohamedYouseif at outlook.com
> Cc: Yocto-mailing-list
> Subject: Re: [yocto] Adding nInvaders game package recipe
>
> On Thu, 20 Sep 2018 at 10:01, Mohamed Youseif
> <MohamedYouseif at outlook.com> wrote:
> > I had changed the source of my package, and create a new recipe for my package so it fetches from SourceForge, the new recipe does not inherit Autotools and modify the do_compile, do_install as following:
> > do_compile () {
> >       oe_runmake
> > }
> >
> > do_install () {
> >       :
> > }
> >
> > but i had modified the do_install task to add it to my image and now it is like this
> > do_install () {
> >
> >       install -d ${D}${bindir}
> >       install -m 0755 nInvaders ${D}${bindir}
> > }
> >
> > then i run "bitbake ninvaders" to check that all tasks will be passed but i got that error for do_package task
> >
> > arm-poky-linux-gnueabi-objcopy:/home/yusuf/rpi/build/tmp_sumo_RPI/work/cortexa7hf-neon-vfpv4-poky-linux-gnueabi/ninvaders/0.1.1-r0/package/usr/bin/nInvaders: File format not recognized
>
> Run 'file' on that binary.  It's possible that your hand-coded
> makefile isn't respecting $CC and it built using the host native
> compiler.
>
> Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20180920/032cc31b/attachment.html>


More information about the yocto mailing list