This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Build Error please help
#1
gcc --version
gcc (Debian 8.2.0-21) 8.2.0
Copyright © 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



android-7.1.2_kernel$ make rk3288-miniarm.img -j4
Makefile:709: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      scripts/mod/empty.o
gcc: error: unrecognized command line option ‘-mlittle-endian’; did you mean ‘-fconvert=little-endian’?
make[2]: *** [scripts/Makefile.build:267: scripts/mod/empty.o] Error 1
make[1]: *** [scripts/Makefile.build:411: scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
  CHK     include/generated/timeconst.h
  CC      kernel/bounds.s
gcc: error: unrecognized command line option ‘-mlittle-endian’; did you mean ‘-fconvert=little-endian’?
make[1]: *** [Kbuild:20: kernel/bounds.s] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1054: prepare0] Error 2
make: *** Waiting for unfinished jobs....
make: *** [Makefile:574: scripts] Error 2
Reply
#2
the make command needs the Architecture. Specify ARCH=arm.

and don't forget to do your make config command for the kernel first.

make ARCH=arm rockchip_defconfig && make ARCH=arm rk3288-miniarm.img
Reply
#3
(03-04-2019, 08:17 PM)kbungo Wrote: the make command needs the Architecture. Specify ARCH=arm.

and don't forget to do your make config command for the kernel first.

make ARCH=arm rockchip_defconfig && make ARCH=arm rk3288-miniarm.img

make ARCH=arm rockchip_defconfig && make ARCH=arm rk3288-miniarm.img
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2576:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:771:19: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  sprintf(newname, "%s%s", dirname, basename);
                   ^~~~~~
scripts/kconfig/confdata.c:771:19: note: assuming directive output of 7 bytes
scripts/kconfig/confdata.c:771:2: note: ‘sprintf’ output 1 or more bytes (assuming 4104) into a destination of size 4097
  sprintf(newname, "%s%s", dirname, basename);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:774:20: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
                    ^~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:774:3: note: ‘sprintf’ output between 13 and 4119 bytes into a destination of size 4097
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
Makefile:709: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
scripts/kconfig/conf  --silentoldconfig Kconfig
Makefile:709: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
  HOSTCC  scripts/genksyms/genksyms.o
  HOSTCC  scripts/genksyms/parse.tab.o
  HOSTCC  scripts/genksyms/lex.lex.o
  HOSTLD  scripts/genksyms/genksyms
  CC      scripts/mod/empty.o
gcc: error: unrecognized argument in option ‘-mabi=aapcs-linux’
gcc: note: valid arguments to ‘-mabi=’ are: ms sysv
gcc: error: unrecognized command line option ‘-mlittle-endian’; did you mean ‘-fconvert=little-endian’?
gcc: error: unrecognized command line option ‘-mno-thumb-interwork’; did you mean ‘-fno-sched-interblock’?
gcc: error: unrecognized command line option ‘-mfpu=vfp’; did you mean ‘-mcpu=’?
make[2]: *** [scripts/Makefile.build:267: scripts/mod/empty.o] Error 1
make[1]: *** [scripts/Makefile.build:411: scripts/mod] Error 2
make: *** [Makefile:574: scripts] Error 2
[-] The following 1 user Likes xevilstar's post:
  • xevilstar
Reply
#4
please if anyone got clues on how to fix this I will be gateful
Reply
#5
If you are building on x86 you need to install gcc arm cross compiler. For example on my Ubuntu x86 I have installed gcc-linaro-arm-linux-gnueabihf.
Reply
#6
I wonder why it needs linaro version. I don't see obstacle if I use latest GCC.
Code:
$ gcc --version
gcc (GCC) 8.2.1 20181127
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply
#7
Are you building on an ARM machine or an x86. ?. If you are building on x86 the standard gcc will spit out x86 code which will not work for ARM architecture such as a Tinkerboard. That is why you need to install an ARM cross compiler i.e a gcc that runs on a x86 host and generates ARM op codes. Of course if you are building on a ARM machine than the standard gcc should work.
Reply
#8
Please ensure you've grabbed the entire Android source. the android build tree comes with it's own toolchain that can be helpful.

Officially from google, Ubuntu 16 and Mac are the only supported build systems so make sure you're on one of those platforms.
Officially from rockchip it seems only Ubuntu is supported so don't use Mac.

Additionally make sure you've grabbed all the tools that source.Android suggests you obtain from APT before beginning the process.

I find it likely you do not have all the tools that Google says you need to have.

Word of caution to everyone when building Android: Google is always right. I don't care how wrong they might be or what's possible. You don't mess with google and their recommendations.
Reply
#9
(03-08-2019, 04:10 AM)Vasant1234 Wrote: Are you building on an ARM machine or an x86. ?.
Definitely, if are using a different architecture, we must tell to gcc to use the cross-compiling options, like these.
Light blue words might be a link. Have you try to click on them? Big Grin
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)