UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor kaito87
Visitor
597 Views
Registered: ‎05-11-2018

Failed to build custom application in petalinux 2017.4

I have created petalinux image based on UG1144 and next I want to run HEVC HM Test Model application on the ZC702 board. I followed the instruction s from the link above and the UG981 documentation, I use command petalinux-create -t apps --name myapp --enable to create myapp folder for HM Test Model application (the application can be downloaded in here) and the folder automatically created on /project-spec/meta-user/recipes-apps/myapp/. And then from README file in the myapp folder that I read on the folder You can easily import any exiting application code by copying it into this directory, and editing the automatically generated Makefile. Then I copied the folder HEVC HM Test Model application to the myapp folder. In the myapp folder there is a bitbake file. Then I edit the bitbake file become like this.

 

#
# This file is the myapp recipe.
#

SUMMARY = "hevc application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file:///trunk/*.cpp \
           file:///trunk/*.h \
           file:///trunk/build/linux/makefile \
          "

S = "${WORKDIR}"

do_compile() {
	     oe_runmake
}

do_install() {
	     install -d ${D}${bindir}
	     install -m 0755 myapp ${D}${bindir}
}

After that I run petalinux-config -c rootfs and petalinux-build

I got this error
 
b304@b304-pc:~/Documents/tes1/project-spec/meta-user/recipes-apps/myapp$ petalinux-build
[INFO] building project
[INFO] sourcing bitbake
INFO: bitbake petalinux-user-image
Loading cache: 100% |#####################################################################################################################################| Time: 0:00:00
Loaded 3256 entries from dependency cache.
Parsing recipes: 100% |###################################################################################################################################| Time: 0:00:01
Parsing of 2465 .bb files complete (2432 cached, 33 parsed). 3258 targets, 226 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |################################################################################################################################| Time: 0:00:03
Checking sstate mirror object availability: 100% |########################################################################################################| Time: 0:00:06
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: myapp-1.0-r0 do_fetch: Failed to fetch URL file:///trunk/build/linux/makefile, attempting MIRRORS if available
ERROR: myapp-1.0-r0 do_fetch: Fetcher failure: Unable to find file file:///trunk/build/linux/makefile anywhere. The paths that were searched were:
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/petalinux
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/petalinux
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/petalinux
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/plnx_arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/plnx_arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/plnx_arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/armv7a
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/armv7a
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/armv7a
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/zynq
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/zynq
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/zynq
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/
    /home/b304/Documents/tes1/build/downloads
ERROR: myapp-1.0-r0 do_fetch: Fetcher failure for URL: 'file:///trunk/build/linux/makefile'. Unable to fetch URL from any source.
ERROR: myapp-1.0-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/b304/Documents/tes1/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/myapp/1.0-r0/temp/log.do_fetch.4295
ERROR: Task (/home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2431 tasks of which 2430 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp.bb:do_fetch
Summary: There was 1 WARNING message shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build project

The HEVC HM Test Model application folder has many sub folders as shown below

Screenshot from 2018-07-19 20-08-58.png

 

I need help to solve this error, Thanks in advance

0 Kudos
2 Replies
Moderator
Moderator
563 Views
Registered: ‎04-24-2017

Re: Failed to build custom application in petalinux 2017.4

Hi @kaito87,

 

You need to fix the SRC_URI  in your recipe 

 

#
# This file is the myapp recipe.
#

SUMMARY = "hevc application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://trunk/*.cpp \
           file://trunk/*.h \
           file://trunk/build/linux/makefile \
          "

S = "${WORKDIR}"

do_compile() {
	     oe_runmake
}

do_install() {
	     install -d ${D}${bindir}
	     install -m 0755 myapp ${D}${bindir}
}

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
Highlighted
Visitor kaito87
Visitor
557 Views
Registered: ‎05-11-2018

Re: Failed to build custom application in petalinux 2017.4

Hi @sandeepg thanks for reply, I tried what you suggested but, I still got error like this even I change the SRC_URI

 

[INFO] building myapp
[INFO] sourcing bitbake
INFO: bitbake myapp
Loading cache: 100% |#####################################################################################################################################| Time: 0:00:00
Loaded 3258 entries from dependency cache.
WARNING: /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp.bb: Unable to get checksum for myapp SRC_URI entry makefile: file could not be found--
Parsing recipes: 100% |###################################################################################################################################| Time: 0:00:01
Parsing of 2467 .bb files complete (2434 cached, 33 parsed). 3260 targets, 226 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |################################################################################################################################| Time: 0:00:00
Checking sstate mirror object availability: 100% |########################################################################################################| Time: 0:00:01
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: myapp-1.0-r0 do_fetch: Failed to fetch URL file://trunk/build/linux/makefile, attempting MIRRORS if available
ERROR: myapp-1.0-r0 do_fetch: Fetcher failure: Unable to find file file://trunk/build/linux/makefile anywhere. The paths that were searched were:
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/petalinux
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/petalinux
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/petalinux
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/plnx_arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/plnx_arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/plnx_arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/armv7a
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/armv7a
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/armv7a
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/zynq
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/zynq
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/zynq
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/
    /home/b304/Documents/tes1/build/downloads
ERROR: myapp-1.0-r0 do_fetch: Fetcher failure for URL: 'file://trunk/build/linux/makefile'. Unable to fetch URL from any source.
ERROR: myapp-1.0-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/b304/Documents/tes1/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/myapp/1.0-r0/temp/log.do_fetch.11184
ERROR: Task (/home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 554 tasks of which 553 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp.bb:do_fetch
Summary: There were 2 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build myapp
webtalk failed:PetaLinux statistics:extra lines detected:notsent_nofile!
webtalk failed:Failed to get PetaLinux usage statistics!

And then I change the SRC_URI and run petalinux-build again

 

#
# This file is the myapp recipe.
#

SUMMARY = "hevc application"
SECTION = "PETALINUX/apps"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "file://home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/trunk/*.cpp \
           file://home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/trunk/*.h \
           file://home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/trunk/build/linux/makefile \
          "

S = "${WORKDIR}"

do_compile() {
	     oe_runmake
}

do_install() {
	     install -d ${D}${bindir}
	     install -m 0755 myapp ${D}${bindir}
}

Got another error

 

[INFO] building myapp
[INFO] sourcing bitbake
INFO: bitbake myapp
Loading cache: 100% |#####################################################################################################################################| Time: 0:00:00
Loaded 3258 entries from dependency cache.
WARNING: /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp.bb: Unable to get checksum for myapp SRC_URI entry makefile: file could not be found--
Parsing recipes: 100% |###################################################################################################################################| Time: 0:00:01
Parsing of 2467 .bb files complete (2434 cached, 33 parsed). 3260 targets, 226 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
Initialising tasks: 100% |################################################################################################################################| Time: 0:00:00
Checking sstate mirror object availability: 100% |########################################################################################################| Time: 0:00:01
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: myapp-1.0-r0 do_fetch: Failed to fetch URL file://home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/trunk/build/linux/makefile, attempting MIRRORS if available
ERROR: myapp-1.0-r0 do_fetch: Fetcher failure: Unable to find file file://home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/trunk/build/linux/makefile anywhere. The paths that were searched were:
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/petalinux
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/petalinux
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/petalinux
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/plnx_arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/plnx_arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/plnx_arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/armv7a
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/armv7a
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/armv7a
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/zynq
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/zynq
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/zynq
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/arm
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp-1.0/
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp/
    /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/files/
    /home/b304/Documents/tes1/build/downloads
ERROR: myapp-1.0-r0 do_fetch: Fetcher failure for URL: 'file://home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/trunk/build/linux/makefile'. Unable to fetch URL from any source.
ERROR: myapp-1.0-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/b304/Documents/tes1/build/tmp/work/cortexa9hf-neon-xilinx-linux-gnueabi/myapp/1.0-r0/temp/log.do_fetch.12669
ERROR: Task (/home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp.bb:do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 554 tasks of which 553 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /home/b304/Documents/tes1/project-spec/meta-user/recipes-apps/myapp/myapp.bb:do_fetch
Summary: There were 2 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
ERROR: Failed to build myapp
webtalk failed:PetaLinux statistics:extra lines detected:notsent_nofile!
webtalk failed:Failed to get PetaLinux usage statistics!

Should I do cross compile for all of "cpp","h",and "makefile"?

 

0 Kudos