imx8: building gputop failed in do_compile

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8: building gputop failed in do_compile

1,510 Views
vsuneja63
Contributor III

Building gputop 1.4.0 for imx8mq evk target failed in do compile. Here are the logs:

ERROR: gputop-1.4.0-r0 do_compile: Function failed: do_compile (log file is located at /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/temp/log.do_compile.6023)
ERROR: Logfile of failure stored in: /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/temp/log.do_compile.6023
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: VERBOSE=1 cmake --build /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/build --target all -- -j 8
| [1/3] /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native/usr/bin/aarch64-agl-linux/aarch64-agl-linux-gcc -DGIT_SHA=149973a467e4 -DHAVE_DDR_PERF=1 -D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE=200809L -I/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot/usr/include -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0=/usr/src/debug/gputop/1.4.0-r0 -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native= -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -fPIC -Wall -Wextra -Werror -Wstrict-prototypes -Wmissing-prototypes -std=c99 -O2 -MD -MT CMakeFiles/gputop.dir/gputop/debugfs.c.o -MF CMakeFiles/gputop.dir/gputop/debugfs.c.o.d -o CMakeFiles/gputop.dir/gputop/debugfs.c.o -c /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/debugfs.c
| FAILED: CMakeFiles/gputop.dir/gputop/debugfs.c.o
| /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native/usr/bin/aarch64-agl-linux/aarch64-agl-linux-gcc -DGIT_SHA=149973a467e4 -DHAVE_DDR_PERF=1 -D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE=200809L -I/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot/usr/include -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0=/usr/src/debug/gputop/1.4.0-r0 -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native= -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -fPIC -Wall -Wextra -Werror -Wstrict-prototypes -Wmissing-prototypes -std=c99 -O2 -MD -MT CMakeFiles/gputop.dir/gputop/debugfs.c.o -MF CMakeFiles/gputop.dir/gputop/debugfs.c.o.d -o CMakeFiles/gputop.dir/gputop/debugfs.c.o -c /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/debugfs.c
| <command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
| <command-line>: note: this is the location of the previous definition
| cc1: all warnings being treated as errors
| [2/3] /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native/usr/bin/aarch64-agl-linux/aarch64-agl-linux-gcc -DGIT_SHA=149973a467e4 -DHAVE_DDR_PERF=1 -D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE=200809L -I/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot/usr/include -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0=/usr/src/debug/gputop/1.4.0-r0 -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native= -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -fPIC -Wall -Wextra -Werror -Wstrict-prototypes -Wmissing-prototypes -std=c99 -O2 -MD -MT CMakeFiles/gputop.dir/gputop/top.c.o -MF CMakeFiles/gputop.dir/gputop/top.c.o.d -o CMakeFiles/gputop.dir/gputop/top.c.o -c /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/top.c
| FAILED: CMakeFiles/gputop.dir/gputop/top.c.o
| /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native/usr/bin/aarch64-agl-linux/aarch64-agl-linux-gcc -DGIT_SHA=149973a467e4 -DHAVE_DDR_PERF=1 -D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE=200809L -I/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot/usr/include -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0=/usr/src/debug/gputop/1.4.0-r0 -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot= -fdebug-prefix-map=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot-native= -fstack-protector-strong -D_FORTIFY_SOURCE=0 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/recipe-sysroot -fPIC -Wall -Wextra -Werror -Wstrict-prototypes -Wmissing-prototypes -std=c99 -O2 -MD -MT CMakeFiles/gputop.dir/gputop/top.c.o -MF CMakeFiles/gputop.dir/gputop/top.c.o.d -o CMakeFiles/gputop.dir/gputop/top.c.o -c /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/top.c
| <command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
| <command-line>: note: this is the location of the previous definition
| /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/top.c: In function 'gtop_retrieve_perf_counters':
| /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/top.c:1894:18: error: format not a string literal and no format arguments [-Werror=format-security]
| fprintf(stdout, clear_screen);
| ^~~~~~~~~~~~
| cc1: all warnings being treated as errors
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/temp/log.do_compile.6023)
ERROR: Task (/home/vipulkumar/platform/AGL_Master/bsp/meta-fsl-bsp-release/imx/meta-sdk/recipes-graphics/libgpuperfcnt/gputop_1.4.0.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2011 tasks of which 2003 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
/home/vipulkumar/platform/AGL_Master/bsp/meta-fsl-bsp-release/imx/meta-sdk/recipes-graphics/libgpuperfcnt/gputop_1.4.0.bb:do_compile

0 Kudos
Reply
4 Replies

1,407 Views
radhikasomaiya
Senior Contributor II

Hi vsuneja63@gmail.com ,

I can able to successfully compile gputop_1.4.0 for 4.19.35 linux bsp. Can you provide your steps how you  are cloning and compiling gputop?

In general we can clone and compile the particular version source code by renaming <source>.bb with our version. Example - 

./meta-fsl-bsp-release/imx/meta-sdk/recipes-graphics/libgpuperfcnt/gputop_6.2.4.p4.0.bb  -> ./meta-fsl-bsp-release/imx/meta-sdk/recipes-graphics/libgpuperfcnt/gputop_1.4.0.p4.0.bb

From the logs you have provided, I can see one error - 

| /home/vipulkumar/platform/AGL_Master/build/tmp/work/aarch64-agl-linux/gputop/1.4.0-r0/git/gputop/top.c:1894:18: error: format not a string literal and no format arguments [-Werror=format-security]
| fprintf(stdout, clear_screen);
| ^~~~~~~~~~~~
| cc1: all warnings being treated as errors

This is an syntax error regarding fprintf where you need to specify the format specifier for clean_screen. You can change the line as fprintf(stdout, "%s", clear_screen);

Have you done any change in source code or .bb file for gputop?

Regards,

Radhika Somaiya

0 Kudos
Reply

1,407 Views
joanxie
NXP TechSupport
NXP TechSupport

what bsp version do you use? how about "bitbake -c cleansstae gputop-1.4.0" , then "bitbake gputop-1.4.0" again?

0 Kudos
Reply

1,407 Views
vsuneja63
Contributor III

Hi,

Thanks!

Any suggestion on the issue? Is their any dependency which I missed?

0 Kudos
Reply

1,407 Views
vsuneja63
Contributor III

Hi Joan,

Thanks!

I am using bsp 4.19.35(Linux-imx). Tried cleaning & building also but same issue. Using imx8mq evk target which has GPU GC7000(with vivante support).

0 Kudos
Reply