天天看點

20200222在ubuntu20.04下編譯全志R16的tinav3.0.4成功

20200222在ubuntu20.04下編譯全志R16的tinav3.0.4成功(燒錄/運作的任何問題,概不負責!^_)

2020/2/22 22 17:48

全志R系列的Tina系統官方推薦使用Ubuntu12.04編譯,不過Ubuntu12.04的LTS生命支援周期結束了。

Ubuntu14.04(我自己的電腦)和Ubuntu16.04(伺服器)下編譯Tina都測試通過了!

不過在Ubuntu18.04下想了很多辦法都沒有編譯通過!

現在Ubuntu20.04的測試版本已經放出來了,經過艱難的工作。(花了3天時間)

才編譯通過,現在給一下步驟!

PS:(限制于時間的關系)

編譯低版本的Tina比如:tinav2.5/v2.0/v1.0甚至還有古老的Tina V0.1版本都不再研究了!

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ source build/envsetup.sh 

including target/allwinner/astar-dm2/vendorsetup.sh

including target/allwinner/astar-dm/vendorsetup.sh

including target/allwinner/astar-evb/vendorsetup.sh

including target/allwinner/astar-noma/vendorsetup.sh

including target/allwinner/astar-parrot/vendorsetup.sh

including target/allwinner/astar-spk/vendorsetup.sh

including target/allwinner/azalea-evb/vendorsetup.sh

including target/allwinner/azalea-m2ultraservers/vendorsetup.sh

including target/allwinner/azalea-m2ultra/vendorsetup.sh

including target/allwinner/azalea-perf1/vendorsetup.sh

including target/allwinner/azalea-perf2/vendorsetup.sh

including target/allwinner/azalea-perf3/vendorsetup.sh

including target/allwinner/banjo-dh/vendorsetup.sh

including target/allwinner/banjo-GW/vendorsetup.sh

including target/allwinner/banjo-kudrone/vendorsetup.sh

including target/allwinner/banjo-mic/vendorsetup.sh

including target/allwinner/banjo-perf1/vendorsetup.sh

including target/allwinner/banjo-R11_pref1/vendorsetup.sh

including target/allwinner/banjo-R7_pref1/vendorsetup.sh

including target/allwinner/banjo-v3s/vendorsetup.sh

including target/allwinner/cello-perf1/vendorsetup.sh

including target/allwinner/cello-pro/vendorsetup.sh

including target/allwinner/generic/vendorsetup.sh

including target/allwinner/koto-carp/vendorsetup.sh

including target/allwinner/koto-perf1/vendorsetup.sh

including target/allwinner/koto-perf2/vendorsetup.sh

including target/allwinner/mandolin-perf1/vendorsetup.sh

including target/allwinner/nuclear-dev/vendorsetup.sh

including target/allwinner/octopus-dev/vendorsetup.sh

including target/allwinner/octopus-sch/vendorsetup.sh

including target/allwinner/sitar-cuckoo/vendorsetup.sh

including target/allwinner/sitar-db/vendorsetup.sh

including target/allwinner/sitar-evb/vendorsetup.sh

including target/allwinner/sitar-mic2/vendorsetup.sh

including target/allwinner/sitar-mic/vendorsetup.sh

including target/allwinner/sitar-pd4/vendorsetup.sh

including target/allwinner/sitar-perf1/vendorsetup.sh

including target/allwinner/sitar-perf2/vendorsetup.sh

including target/allwinner/sitar-perf3/vendorsetup.sh

including target/allwinner/tulip-d1nor/vendorsetup.sh

including target/allwinner/tulip-d1/vendorsetup.sh

including target/allwinner/tulip-hena/vendorsetup.sh

including target/allwinner/tulip-m64/vendorsetup.sh

including target/allwinner/tulip-mozart/vendorsetup.sh

including target/allwinner/tulip-noma/vendorsetup.sh

including target/allwinner/tulip-perf1/vendorsetup.sh

including target/allwinner/tulip-pine64/vendorsetup.sh

including target/allwinner/violin-F1C200s/vendorsetup.sh

[email protected]:~/wyb/r16/tinav3.0$ lunch

You're building on Linux

Lunch menu... pick a combo:

     1. astar_dm2-tina

     2. astar_dm-tina

     3. astar_evb-tina

     4. astar_noma-tina

     5. astar_parrot-tina

     6. astar_spk-tina

     7. azalea_evb-tina

     8. azalea_m2ultraservers-tina

     9. azalea_m2ultra-tina

     10. azalea_perf1-tina

     11. azalea_perf2-tina

     12. azalea_perf3-tina

     13. banjo_dh-tina

     14. banjo_GW-tina

     15. banjo_kudrone-tina

     16. banjo_mic-tina

     17. banjo_perf1-tina

     18. banjo_R11_pref1-tina

     19. banjo_R7_pref1-tina

     20. banjo_v3s-tina

     21. cello_perf1-tina

     22. cello_pro-tina

     23. koto_carp-tina

     24. koto_perf1-tina

     25. koto_perf2-tina

     26. mandolin_perf1-tina

     27. nuclear_dev-tina

     28. octopus_dev-tina

     29. octopus_sch-tina

     30. sitar_cuckoo-tina

     31. sitar_db-tina

     32. sitar_evb-tina

     33. sitar_mic2-tina

     34. sitar_mic-tina

     35. sitar_pd4-tina

     36. sitar_perf1-tina

     37. sitar_perf2-tina

     38. sitar_perf3-tina

     39. tulip_d1nor-tina

     40. tulip_d1-tina

     41. tulip_hena-tina

     42. tulip_m64-tina

     43. tulip_mozart-tina

     44. tulip_noma-tina

     45. tulip_perf1-tina

     46. tulip_pine64-tina

     47. violin_F1C200s-tina

Which would you like?5

/bin/sh: python: 未找到指令

============================================

PLATFORM_VERSION_CODENAME=Neptune

PLATFORM_VERSION=3.0.0

PRODUCT_VERSION=v2.2

TARGET_PRODUCT=astar_parrot

TARGET_BUILD_VARIANT=tina

TARGET_BUILD_TYPE=release

TARGET_BUILD_APPS=

TARGET_ARCH=arm

TARGET_ARCH_VARIANT=armv7-a-neon

TARGET_CPU_VARIANT=cortex-a7

TARGET_2ND_ARCH=

TARGET_2ND_ARCH_VARIANT=

TARGET_2ND_CPU_VARIANT=

HOST_ARCH=x86_64

HOST_OS=linux

HOST_OS_EXTRA=

HOST_BUILD_TYPE=release

BUILD_ID=5A0C0971

TARGET_OUT_DIR=out/astar-parrot

============================================

[email protected]:~/wyb/r16/tinav3.0$ make -j8

問題1:

mv -f $depbase.Tpo $depbase.Po

depbase=`echo fclose.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc  -I.   -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include   -O2 -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include  -MT fclose.o -MD -MP -MF $depbase.Tpo -c -o fclose.o fclose.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo fcntl.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc  -I.   -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include   -O2 -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include  -MT fcntl.o -MD -MP -MF $depbase.Tpo -c -o fcntl.o fcntl.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo fflush.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc  -I.   -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include   -O2 -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include  -MT fflush.o -MD -MP -MF $depbase.Tpo -c -o fflush.o fflush.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo fpurge.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc  -I.   -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include   -O2 -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include  -MT fpurge.o -MD -MP -MF $depbase.Tpo -c -o fpurge.o fpurge.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo freadahead.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc  -I.   -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include   -O2 -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include  -MT freadahead.o -MD -MP -MF $depbase.Tpo -c -o freadahead.o freadahead.c &&\

mv -f $depbase.Tpo $depbase.Po

freadahead.c: In function 'freadahead':

freadahead.c:91:3: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."

   91 |  #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."

      |   ^~~~~

make[7]: *** [Makefile:1837: freadahead.o] Error 1

make[7]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17/lib'

make[6]: *** [Makefile:1602: all] Error 2

make[6]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17/lib'

make[5]: *** [Makefile:1506: all-recursive] Error 1

make[5]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17'

make[4]: *** [Makefile:1461: all] Error 2

make[4]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17'

make[3]: *** [Makefile:29: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17/.built] Error 2

make[3]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/tools/m4'

make[2]: *** [tools/Makefile:130: tools/m4/compile] Error 2

make[2]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make[1]: *** [tools/Makefile:128: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2

make[1]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make: *** [/home/rootroot/wyb/r16/tinav3.0/build/toplevel.mk:274:world] 錯誤 2

#### make failed to build some targets (02:45 (mm:ss)) ####

real    2m45.164s

user    1m57.265s

sys    0m41.347s

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ cd dl/

[email protected]:~/wyb/r16/tinav3.0/dl$ ll m4*

-rw-rw-r-- 1 rootroot rootroot 1149088 6?   1  2018 m4-1.4.17.tar.xz

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ xz -dk m4-1.4.17.tar.xz 

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ ll m4*

-rw-rw-r-- 1 rootroot rootroot 9441280 6?   1  2018 m4-1.4.17.tar

-rw-rw-r-- 1 rootroot rootroot 1149088 6?   1  2018 m4-1.4.17.tar.xz

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ tar xvf m4-1.4.17.tar

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ cd m4-1.4.17

[email protected]:~/wyb/r16/tinav3.0/dl/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/dl/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/dl/m4-1.4.17$ ll

總用量 1836

drwxrwxr-x 10 rootroot rootroot    4096 9月  22  2013 ./

drwxrwxr-x  5 rootroot rootroot   36864 2月  22 14:15 ../

-rw-rw-r--  1 rootroot rootroot     863 9月  22  2013 acinclude.m4

-rw-rw-r--  1 rootroot rootroot   47617 9月  22  2013 aclocal.m4

-rw-rw-r--  1 rootroot rootroot    2448 9月  22  2013 AUTHORS

-rw-rw-r--  1 rootroot rootroot    2584 9月  22  2013 BACKLOG

-rwxrwxr-x  1 rootroot rootroot  142895 9月  22  2013 bootstrap*

drwxr-xr-x  3 rootroot rootroot    4096 2月  22 14:15 build-aux/

-rw-rw-r--  1 rootroot rootroot   15283 9月  22  2013 c-boxes.el

-rw-rw-r--  1 rootroot rootroot    1889 9月  22  2013 cfg.mk

-rw-rw-r--  1 rootroot rootroot  194892 9月  22  2013 ChangeLog

drwxr-xr-x  2 rootroot rootroot   12288 2月  22 14:15 checks/

-rwxrwxr-x  1 rootroot rootroot 1089430 9月  22  2013 configure*

-rw-rw-r--  1 rootroot rootroot    7979 9月  22  2013 configure.ac

-rw-rw-r--  1 rootroot rootroot   35147 9月  22  2013 COPYING

drwxr-xr-x  2 rootroot rootroot    4096 2月  22 14:15 doc/

drwxr-xr-x  2 rootroot rootroot    4096 2月  22 14:15 examples/

-rw-rw-r--  1 rootroot rootroot    4573 9月  22  2013 GNUmakefile

-rw-rw-r--  1 rootroot rootroot   15752 9月  22  2013 INSTALL

drwxr-xr-x  3 rootroot rootroot   12288 2月  22 14:15 lib/

drwxr-xr-x  2 rootroot rootroot    4096 2月  22 14:15 m4/

-rw-rw-r--  1 rootroot rootroot   62890 9月  22  2013 maint.mk

-rw-rw-r--  1 rootroot rootroot    1936 9月  22  2013 Makefile.am

-rw-rw-r--  1 rootroot rootroot   69291 9月  22  2013 Makefile.in

-rw-rw-r--  1 rootroot rootroot   30087 9月  22  2013 NEWS

-rw-rw-r--  1 rootroot rootroot       7 9月  22  2013 .prev-version

-rw-rw-r--  1 rootroot rootroot    3983 9月  22  2013 README

drwxr-xr-x  2 rootroot rootroot    4096 2月  22 14:15 src/

-rw-rw-r--  1 rootroot rootroot       7 9月  22  2013 .tarball-version

drwxr-xr-x  2 rootroot rootroot   12288 2月  22 14:15 tests/

-rw-rw-r--  1 rootroot rootroot    6438 9月  22  2013 THANKS

-rw-rw-r--  1 rootroot rootroot    2062 9月  22  2013 TODO

-rw-rw-r--  1 rootroot rootroot       7 9月  22  2013 .version

[email protected]:~/wyb/r16/tinav3.0/dl/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/dl/m4-1.4.17$ grep IO_ftrylockfile . -R

./lib/fseeko.c:#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1

./lib/fseeko.c:#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1

./lib/fpurge.c:# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1

./lib/freading.c:# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1

./lib/freadahead.c:#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1

./lib/fflush.c:#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1

./lib/fflush.c:#if ! (defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 )

./lib/fflush.c:#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1

[email protected]:~/wyb/r16/tinav3.0/dl/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/dl/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/dl/m4-1.4.17$ find . -name stdio-impl.h

./lib/stdio-impl.h

[email protected]:~/wyb/r16/tinav3.0/dl/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/dl/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/dl/m4-1.4.17$ sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib

[email protected]:~/wyb/r16/tinav3.0/dl/bison-3.0.4$ 

[email protected]:~/wyb/r16/tinav3.0/dl/bison-3.0.4$ 

[email protected]:~/wyb/r16/tinav3.0/dl/bison-3.0.4$ find . -name stdio-impl.h

find: warning: ‘-name’ matches against basenames only, but the given pattern contains a directory separator (‘/’), thus the expression will evaluate to false all the time.  Did you mean ‘-wholename’?

[email protected]:~/wyb/r16/tinav3.0/dl/bison-3.0.4$ 

[email protected]:~/wyb/r16/tinav3.0/dl/bison-3.0.4$ 

[email protected]:~/wyb/r16/tinav3.0/dl/bison-3.0.4$ 

[email protected]:~/wyb/r16/tinav3.0/dl/bison-3.0.4$ find . -name stdio-impl.h

./lib/stdio-impl.h

[email protected]:~/wyb/r16/tinav3.0/dl/bison-3.0.4$ 

[email protected]:~/wyb/r16/tinav3.0/dl/bison-3.0.4$ 

[email protected]:~/wyb/r16/tinav3.0/dl/bison-3.0.4$ sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib

#include <config.h>

#define _IO_ferror_unlocked

#include "freadahead.h"

size_t

freadahead (FILE *fp)

{

#if defined _IO_ferror_unlocked    

  if (fp->_IO_write_ptr > fp->_IO_write_base)

    return 0;

  return fp->_IO_read_end - fp->_IO_read_ptr;

#elif defined __sferror            

  if ((fp->_flags & __SWR) != 0 || fp->_r < 0)

    return 0;

  return fp->_r;

#elif defined _IOERR                

# if defined __sun && defined _LP64

#  define fp_ ((struct { unsigned char *_ptr; \

             unsigned char *_base; \

             unsigned char *_end; \

             long _cnt; \

             int _file; \

             unsigned int _flag; \

               } *) fp)

  if ((fp_->_flag & _IOWRT) != 0)

    return 0;

  return fp_->_cnt;

# else

  if ((fp->_flag & _IOWRT) != 0)

    return 0;

  return fp->_cnt;

# endif

#elif defined __UCLIBC__            

# ifdef __STDIO_BUFFERS

  if (fp->__modeflags & __FLAG_WRITING)

    return 0;

  return fp->__bufread - fp->__bufpos;

# else

  return 0;

# endif

#elif defined __QNX__              

  if ((fp->_Mode & 0x2000 ) != 0)

    return 0;

  return fp->_Rend - fp->_Next;

#else

 #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread on your system, then report this to bug-gnulib."

#endif

}

[email protected]:~/wyb/r16/tinav3.0/dl$ tar zcvf findutils-4.4.2.tar.gz findutils-4.4.2

問題8:

checking for sys/stat.h... -- Performing Test curl_cv_send

make[4]: *** [<builtin>: mksquashfs.o] Error 1

make[4]: Leaving directory '/home/rootroot/wyb/r16/u3tinav3.0/out/astar-parrot/compile_dir/host/squashfs4.2/squashfs-tools'

make[3]: *** [Makefile:43: /home/rootroot/wyb/r16/u3tinav3.0/out/astar-parrot/compile_dir/host/squashfs4.2/.built] Error 2

make[3]: Leaving directory '/home/rootroot/wyb/r16/u3tinav3.0/tools/squashfs4'

make[2]: *** [tools/Makefile:130: tools/squashfs4/compile] Error 2

make[2]: *** Waiting for unfinished jobs....

patching file squashfs-tools/pseudo.c

touch /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/squashfs4.2/.prepareda109b81b26c1be595aabd2688df0d6f0

(cd /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/squashfs4.2/; if [ -x configure ]; then cp -fpR /home/rootroot/wyb/r16/tinav3.0/scripts/config.{guess,sub} /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/squashfs4.2// &&  bash ./configure CC="gcc" CFLAGS="-O2 -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include " CPPFLAGS="-I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include " LDFLAGS="-L/home/rootroot/wyb/r16/tinav3.0/out/host/lib -L/home/rootroot/wyb/r16/tinav3.0/out/host/usr/lib " SHELL="/usr/bin/env bash" --target=x86_64-linux-gnu --host=x86_64-linux-gnu --build=x86_64-linux-gnu --program-prefix="" --program-suffix="" --prefix=/home/rootroot/wyb/r16/tinav3.0/out/host --exec-prefix=/home/rootroot/wyb/r16/tinav3.0/out/host --sysconfdir=/home/rootroot/wyb/r16/tinav3.0/out/host/etc --localstatedir=/home/rootroot/wyb/r16/tinav3.0/out/host/var --sbindir=/home/rootroot/wyb/r16/tinav3.0/out/host/bin ; fi )

touch /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/squashfs4.2/.configured

make -C /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/squashfs4.2/squashfs-tools CC="gcc" XZ_SUPPORT=1 LZMA_XZ_SUPPORT=1 XATTR_SUPPORT= LZMA_LIB="/home/rootroot/wyb/r16/tinav3.0/out/host/lib/liblzma.a" EXTRA_CFLAGS="-I/home/rootroot/wyb/r16/tinav3.0/out/host/include" mksquashfs unsquashfs

make[4]: Entering directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/squashfs4.2/squashfs-tools'

gcc  -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I. -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -DCOMP_DEFAULT=\"gzip\" -Wall -DGZIP_SUPPORT -DLZMA_SUPPORT -DXZ_SUPPORT   -c -o mksquashfs.o mksquashfs.c

mksquashfs.c: In function 'create_inode':

mksquashfs.c:1375: error: called object 'major' is not a function

mksquashfs.c:1376: error: called object 'minor' is not a function

mksquashfs.c:1399: error: called object 'major' is not a function

mksquashfs.c:1400: error: called object 'minor' is not a function

mksquashfs.c: In function 'dir_scan2':

mksquashfs.c:3805: warning: implicit declaration of function 'makedev'

make[4]: *** [<builtin>: mksquashfs.o] Error 1

make[4]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/squashfs4.2/squashfs-tools'

make[3]: *** [Makefile:43: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/squashfs4.2/.built] Error 2

make[3]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/tools/squashfs4'

make[2]: *** [tools/Makefile:130: tools/squashfs4/compile] Error 2

make[2]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make[1]: *** [tools/Makefile:128: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2

make[1]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make: *** [/home/rootroot/wyb/r16/tinav3.0/build/toplevel.mk:274:world] 錯誤 2

#### make failed to build some targets (06:12 (mm:ss)) ####

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ ll squash*

-rw-rw-r-- 1 rootroot rootroot 133173 6月   1  2018 squashfs4.2.tar.gz

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ 

[email protected]:~/wyb/r16/tinav3.0/dl$ tar zxvf squashfs4.2.tar.gz 

Z:\wyb\r16\tinav3.0\dl\squashfs4.2\squashfs-tools\mksquashfs.c

Z:\wyb\r16\tinav3.0\dl\squashfs4.2\squashfs-tools\unsquashfs.c

[email protected]:~/wyb/r16/tinav3.0/dl$ tar zcvf squashfs4.2.tar.gz squashfs4.2

問題9:ubuntu20.04的gcc是gcc 9版本,會出現頭檔案的異常:

In file included from /usr/include/stdio.h:869,

                 from scripts/kconfig/zconf.tab.c:84:

/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: '__builtin___sprintf_chk' output between 13 and 4119 bytes into a destination of size 4097

   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,

      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   37 |       __bos (__s), __fmt, __va_arg_pack ());

      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  HOSTLD  scripts/kconfig/conf

#

# configuration written to .config

#

*** Default configuration is based on 'sandbox_defconfig'

make[4]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10'

make -C /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10 tools-only  HOSTCFLAGS="-I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include  -O2 -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include " HOSTLDFLAGS="-L/home/rootroot/wyb/r16/tinav3.0/out/host/lib -L/home/rootroot/wyb/r16/tinav3.0/out/host/usr/lib "

make[4]: Entering directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10'

scripts/kconfig/conf --silentoldconfig Kconfig

  CHK     include/config.h

  UPD     include/config.h

  GEN     include/autoconf.mk

In file included from include/linux/compiler.h:54,

                 from /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/arch/sandbox/include/asm/bitops.h:20,

                 from include/linux/bitops.h:110,

                 from /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include/common.h:20:

include/linux/compiler-gcc.h:114:1: fatal error: linux/compiler-gcc9.h: No such file or directory

  114 | #include gcc_header(__GNUC__)

      | ^~~~

compilation terminated.

make[6]: *** [/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/scripts/Makefile.autoconf:64: include/autoconf.mk] Error 1

make[5]: *** [/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/Makefile:464: silentoldconfig] Error 1

make[4]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.

make[4]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10'

make[3]: *** [Makefile:48: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/.built] Error 2

make[3]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/tools/mkimage'

make[2]: *** [tools/Makefile:130: tools/mkimage/compile] Error 2

make[2]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make[1]: *** [tools/Makefile:128: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2

make[1]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make: *** [/home/rootroot/wyb/r16/tinav3.0/build/toplevel.mk:274:world] 錯誤 2

#### make failed to build some targets (13 seconds) ####

[email protected]:~/wyb/r16/tinav3.0$ 

方法一:使用gcc4.4

[email protected]:~$ 

[email protected]:~$ which gcc

/usr/bin/gcc

[email protected]:~$ 

[email protected]:~$ cd /usr/bin/

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ ls -al gcc*

lrwxrwxrwx 1 root root      5 2月  21 18:41 gcc -> gcc-9

-rwxr-xr-x 1 root root 255080 3月  20  2014 gcc-4.4

lrwxrwxrwx 1 root root     22 2月   4 01:15 gcc-9 -> x86_64-linux-gnu-gcc-9

lrwxrwxrwx 1 root root      8 2月  21 18:41 gcc-ar -> gcc-ar-9

lrwxrwxrwx 1 root root     25 2月   4 01:15 gcc-ar-9 -> x86_64-linux-gnu-gcc-ar-9

lrwxrwxrwx 1 root root      8 2月  21 18:41 gcc-nm -> gcc-nm-9

lrwxrwxrwx 1 root root     25 2月   4 01:15 gcc-nm-9 -> x86_64-linux-gnu-gcc-nm-9

lrwxrwxrwx 1 root root     12 2月  21 18:41 gcc-ranlib -> gcc-ranlib-9

lrwxrwxrwx 1 root root     29 2月   4 01:15 gcc-ranlib-9 -> x86_64-linux-gnu-gcc-ranlib-9

[email protected]:/usr/bin$ ll gcc*

lrwxrwxrwx 1 root root      5 2月  21 18:41 gcc -> gcc-9*

-rwxr-xr-x 1 root root 255080 3月  20  2014 gcc-4.4*

lrwxrwxrwx 1 root root     22 2月   4 01:15 gcc-9 -> x86_64-linux-gnu-gcc-9*

lrwxrwxrwx 1 root root      8 2月  21 18:41 gcc-ar -> gcc-ar-9*

lrwxrwxrwx 1 root root     25 2月   4 01:15 gcc-ar-9 -> x86_64-linux-gnu-gcc-ar-9*

lrwxrwxrwx 1 root root      8 2月  21 18:41 gcc-nm -> gcc-nm-9*

lrwxrwxrwx 1 root root     25 2月   4 01:15 gcc-nm-9 -> x86_64-linux-gnu-gcc-nm-9*

lrwxrwxrwx 1 root root     12 2月  21 18:41 gcc-ranlib -> gcc-ranlib-9*

lrwxrwxrwx 1 root root     29 2月   4 01:15 gcc-ranlib-9 -> x86_64-linux-gnu-gcc-ranlib-9*

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ gcc -v

Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper

OFFLOAD_TARGET_NAMES=nvptx-none:hsa

OFFLOAD_TARGET_DEFAULT=1

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.2.1-28ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

Thread model: posix

gcc version 9.2.1 20200203 (Ubuntu 9.2.1-28ubuntu1) 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ g++ -v

Using built-in specs.

COLLECT_GCC=g++

COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper

OFFLOAD_TARGET_NAMES=nvptx-none:hsa

OFFLOAD_TARGET_DEFAULT=1

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.2.1-28ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

Thread model: posix

gcc version 9.2.1 20200203 (Ubuntu 9.2.1-28ubuntu1) 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ ll gcc*

lrwxrwxrwx 1 root root      5 2月  21 18:41 gcc -> gcc-9*

-rwxr-xr-x 1 root root 255080 3月  20  2014 gcc-4.4*

lrwxrwxrwx 1 root root     22 2月   4 01:15 gcc-9 -> x86_64-linux-gnu-gcc-9*

lrwxrwxrwx 1 root root      8 2月  21 18:41 gcc-ar -> gcc-ar-9*

lrwxrwxrwx 1 root root     25 2月   4 01:15 gcc-ar-9 -> x86_64-linux-gnu-gcc-ar-9*

lrwxrwxrwx 1 root root      8 2月  21 18:41 gcc-nm -> gcc-nm-9*

lrwxrwxrwx 1 root root     25 2月   4 01:15 gcc-nm-9 -> x86_64-linux-gnu-gcc-nm-9*

lrwxrwxrwx 1 root root     12 2月  21 18:41 gcc-ranlib -> gcc-ranlib-9*

lrwxrwxrwx 1 root root     29 2月   4 01:15 gcc-ranlib-9 -> x86_64-linux-gnu-gcc-ranlib-9*

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ ll g++*

lrwxrwxrwx 1 root root      5 2月  21 18:41 g++ -> g++-9*

-rwxr-xr-x 1 root root 259176 3月  20  2014 g++-4.4*

lrwxrwxrwx 1 root root     22 2月   4 01:15 g++-9 -> x86_64-linux-gnu-g++-9*

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ sudo ln -s gcc-4.4 gcc

[sudo] rootroot 的密碼: 

ln: 無法建立符号連結'gcc': 檔案已存在

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ sudo rm gcc

[email protected]:/usr/bin$ sudo rm g++

[email protected]:/usr/bin$ sudo ln -s gcc-4.4 gcc

[email protected]:/usr/bin$ sudo ln -s g++-4.4 g++

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ gcc -version

gcc: unrecognized option '-version'

gcc: no input files

[email protected]:/usr/bin$ gcc --version

gcc (Ubuntu/Linaro 4.4.7-8ubuntu1) 4.4.7

Copyright (C) 2010 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.

[email protected]:/usr/bin$ 

ro[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ g++ --version

g++ (Ubuntu/Linaro 4.4.7-8ubuntu1) 4.4.7

Copyright (C) 2010 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.

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ gcc -v

Using built-in specs.

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.7-8ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --disable-libmudflap --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

Thread model: posix

gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-8ubuntu1) 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ 

[email protected]:/usr/bin$ g++ -v

Using built-in specs.

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.7-8ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --disable-libmudflap --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu

Thread model: posix

gcc version 4.4.7 (Ubuntu/Linaro 4.4.7-8ubuntu1) 

[email protected]:/usr/bin$ 

方法二:(可選)

In file included from include/linux/compiler.h:54,

                 from /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/arch/sandbox/include/asm/bitops.h:20,

                 from include/linux/bitops.h:110,

                 from /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include/common.h:20:

include/linux/compiler-gcc.h:114:1: fatal error: linux/compiler-gcc9.h: No such file or directory

  114 | #include gcc_header(__GNUC__)

      | ^~~~

compilation terminated.

make[6]: *** [/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/scripts/Makefile.autoconf:64: include/autoconf.mk] Error 1

make[5]: *** [/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/Makefile:464: silentoldconfig] Error 1

make[4]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.

make[4]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10'

make[3]: *** [Makefile:48: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/.built] Error 2

make[3]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/tools/mkimage'

make[2]: *** [tools/Makefile:130: tools/mkimage/compile] Error 2

make[2]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make[1]: *** [tools/Makefile:128: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2

make[1]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make: *** [/home/rootroot/wyb/r16/tinav3.0/build/toplevel.mk:274:world] 錯誤 2

#### make failed to build some targets (13 seconds) ####

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ cd /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include$ 

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include$ ll compi*.h

-rw-r--r-- 1 rootroot rootroot 3489 2月  21 22:27 compiler.h

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include$ ll *.h

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include$ 

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include$ 

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include$ cd -

/home/rootroot/wyb/r16/tinav3.0

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ find . -name compiler-gcc.h

./out/astar-parrot/compile_dir/host/u-boot-2014.10/include/linux/compiler-gcc.h

./lichee/linux-3.4/include/linux/compiler-gcc.h

./lichee/linux-4.9/include/linux/compiler-gcc.h

./lichee/brandy/u-boot-2014.07/include/linux/compiler-gcc.h

./lichee/brandy/u-boot-2011.09/include/linux/compiler-gcc.h

./lichee/linux-3.10/include/linux/compiler-gcc.h

./lichee/linux-4.4/include/linux/compiler-gcc.h

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ out/astar-parrot/compile_dir/host/u-boot-2014.10/include/linux/

-bash: out/astar-parrot/compile_dir/host/u-boot-2014.10/include/linux/: 是一個目錄

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ cd out/astar-parrot/compile_dir/host/u-boot-2014.10/include/linux/

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include/linux$ ll com*.h

-rw-r--r-- 1 rootroot rootroot 10975 10月 14  2014 compat.h

-rw-r--r-- 1 rootroot rootroot   320 10月 14  2014 compiler-clang.h

-rw-r--r-- 1 rootroot rootroot   635 10月 14  2014 compiler-gcc3.h

-rw-r--r-- 1 rootroot rootroot  2885 2月  21 22:27 compiler-gcc4.h

-rw-r--r-- 1 rootroot rootroot  2455 2月  21 22:27 compiler-gcc5.h

-rw-r--r-- 1 rootroot rootroot  4347 10月 14  2014 compiler-gcc.h

-rw-r--r-- 1 rootroot rootroot 11347 10月 14  2014 compiler.h

-rw-r--r-- 1 rootroot rootroot  1047 10月 14  2014 compiler-intel.h

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include/linux$ cp compiler-gcc5.h compiler-gcc9.h

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include/linux$ cd -

/home/rootroot/wyb/r16/tinav3.0

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ make -j1

問題10:rsa-sign.c

  WRAP    tools/lib/libfdt/fdt_strerror.c

  HOSTCC  tools/lib/libfdt/fdt_strerror.o

  WRAP    tools/lib/libfdt/fdt_wip.c

  HOSTCC  tools/lib/libfdt/fdt_wip.o

  WRAP    tools/lib/md5.c

  HOSTCC  tools/lib/md5.o

In file included from /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include/compiler.h:46,

                 from /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include/libfdt_env.h:12,

                 from <command-line>:0:

/home/rootroot/wyb/r16/tinav3.0/out/host/include/byteswap.h:2: warning: #include_next is a GCC extension

In file included from /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/md5.c:34,

                 from tools/lib/md5.c:1:

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include/u-boot/md5.h:17: warning: ISO C doesn't support unnamed structs/unions

  WRAP    tools/lib/rsa/rsa-checksum.c

  HOSTCC  tools/lib/rsa/rsa-checksum.o

  WRAP    tools/lib/rsa/rsa-sign.c

  HOSTCC  tools/lib/rsa/rsa-sign.o

In file included from tools/lib/rsa/rsa-sign.c:1:

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_remove':

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:156: warning: 'ERR_remove_thread_state' is deprecated (declared at /usr/include/openssl/err.h:260)

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_get_exponent':

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:279: error: dereferencing pointer to incomplete type

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:282: error: dereferencing pointer to incomplete type

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:284: error: dereferencing pointer to incomplete type

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:289: error: dereferencing pointer to incomplete type

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_get_params':

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:340: error: dereferencing pointer to incomplete type

make[5]: *** [scripts/Makefile.host:134: tools/lib/rsa/rsa-sign.o] Error 1

make[4]: *** [Makefile:1195: tools-only] Error 2

make[4]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10'

make[3]: *** [Makefile:48: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/.built] Error 2

make[3]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/tools/mkimage'

make[2]: *** [tools/Makefile:130: tools/mkimage/compile] Error 2

make[2]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make[1]: *** [tools/Makefile:128: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2

make[1]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make: *** [/home/rootroot/wyb/r16/tinav3.0/build/toplevel.mk:274:world] 錯誤 2

#### make failed to build some targets (04:53 (mm:ss)) ####

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

https://blog.csdn.net/zmlovelx/article/details/80904109

編譯國芯GX8010 SDK筆記

針對openwrt編譯對上openssl-1.1.x版本出錯問題,

(由于ubuntu20.04是搶鮮版本/測試版本,就不降級了!)

一種方法就是降openssl版本到1.0,

另外一種方法下面講

1)解決:

https://git.openwrt.org/?p=openwrt/openwrt.git;a=tree;f=tools/mkimage/patches;h=ee5e92e913e487f63a5d8a82ebd43ccdd7b0a3f7;hb=70b104f98c0657323b28fce140b73a94bf3eb756

下載下傳210那個patch并放到

tools/mkimage/patchs/210-openssl-1.1.x-compat.patch

講全部的檔案修正之後還有有點問題:

(雖然惠普 星14所使用的AMD RYZEN5 3500U是4核心支援8線程的,但是使用make -j8編譯之後會卡死,不知道是Makefile的配置異常。還是其他問題)

make -j4

(出錯之後使用單線程查錯)

make -j1

問題一:

base.Tpo -c -o fclose.o fclose.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo fcntl.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc -std=gnu99  -I.   -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include   -O2 -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include  -MT fcntl.o -MD -MP -MF $depbase.Tpo -c -o fcntl.o fcntl.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo fflush.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc -std=gnu99  -I.   -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include   -O2 -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include  -MT fflush.o -MD -MP -MF $depbase.Tpo -c -o fflush.o fflush.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo fpurge.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc -std=gnu99  -I.   -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include   -O2 -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include  -MT fpurge.o -MD -MP -MF $depbase.Tpo -c -o fpurge.o fpurge.c &&\

mv -f $depbase.Tpo $depbase.Po

depbase=`echo freadahead.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\

gcc -std=gnu99  -I.   -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include   -O2 -I/home/rootroot/wyb/r16/tinav3.0/out/host/include -I/home/rootroot/wyb/r16/tinav3.0/out/host/usr/include  -MT freadahead.o -MD -MP -MF $depbase.Tpo -c -o freadahead.o freadahead.c &&\

mv -f $depbase.Tpo $depbase.Po

freadahead.c: In function 'freadahead':

freadahead.c:91: error: #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."

make[7]: *** [Makefile:1837: freadahead.o] Error 1

make[7]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17/lib'

make[6]: *** [Makefile:1602: all] Error 2

make[6]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17/lib'

make[5]: *** [Makefile:1506: all-recursive] Error 1

make[5]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17'

make[4]: *** [Makefile:1461: all] Error 2

make[4]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17'

make[3]: *** [Makefile:29: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17/.built] Error 2

make[3]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/tools/m4'

make[2]: *** [tools/Makefile:130: tools/m4/compile] Error 2

make[2]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make[1]: *** [tools/Makefile:128: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2

make[1]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make: *** [/home/rootroot/wyb/r16/tinav3.0/build/toplevel.mk:274:world] 錯誤 2

#### make failed to build some targets (8 seconds) ####

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c

echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ cd out/astar-parrot/compile_dir/host/m4-1.4.17

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17$ ll

總用量 2448

drwxr-xr-x 10 rootroot rootroot    4096 2月  22 16:54 ./

drwxr-xr-x 20 rootroot rootroot    4096 2月  22 16:50 ../

-rw-r--r--  1 rootroot rootroot     863 9月  22  2013 acinclude.m4

-rw-r--r--  1 rootroot rootroot   47617 9月  22  2013 aclocal.m4

-rw-r--r--  1 rootroot rootroot    2448 9月  22  2013 AUTHORS

-rw-r--r--  1 rootroot rootroot    2584 9月  22  2013 BACKLOG

-rwxr-xr-x  1 rootroot rootroot  142895 9月  22  2013 bootstrap*

drwxr-xr-x  3 rootroot rootroot    4096 2月  22 14:18 build-aux/

-rw-r--r--  1 rootroot rootroot   15283 9月  22  2013 c-boxes.el

-rw-r--r--  1 rootroot rootroot    1889 9月  22  2013 cfg.mk

-rw-r--r--  1 rootroot rootroot  194892 9月  22  2013 ChangeLog

drwxr-xr-x  2 rootroot rootroot   12288 2月  22 16:50 checks/

-rwxrwxr-x  1 rootroot rootroot   43434 6月   1  2018 config.guess*

-rw-r--r--  1 rootroot rootroot  426287 2月  22 16:50 config.log

-rwxr-xr-x  1 rootroot rootroot   75377 2月  22 16:50 config.status*

-rwxrwxr-x  1 rootroot rootroot   36132 6月   1  2018 config.sub*

-rwxr-xr-x  1 rootroot rootroot 1089430 9月  22  2013 configure*

-rw-r--r--  1 rootroot rootroot    7979 9月  22  2013 configure.ac

-rw-r--r--  1 rootroot rootroot       0 2月  22 16:50 .configured

-rw-r--r--  1 rootroot rootroot   35147 9月  22  2013 COPYING

drwxr-xr-x  2 rootroot rootroot    4096 2月  22 16:50 doc/

drwxr-xr-x  2 rootroot rootroot    4096 2月  22 16:50 examples/

-rw-r--r--  1 rootroot rootroot    4573 9月  22  2013 GNUmakefile

-rw-r--r--  1 rootroot rootroot   15752 9月  22  2013 INSTALL

drwxr-xr-x  5 rootroot rootroot   16384 2月  22 16:54 lib/

drwxr-xr-x  2 rootroot rootroot    4096 2月  22 14:18 m4/

-rw-r--r--  1 rootroot rootroot   62890 9月  22  2013 maint.mk

-rw-r--r--  1 rootroot rootroot   55064 2月  22 16:50 Makefile

-rw-r--r--  1 rootroot rootroot    1936 9月  22  2013 Makefile.am

-rw-r--r--  1 rootroot rootroot   69291 9月  22  2013 Makefile.in

-rw-r--r--  1 rootroot rootroot   30087 9月  22  2013 NEWS

-rw-r--r--  1 rootroot rootroot       0 2月  22 16:50 .preparedd2c71c83f94494e834bc09b8c699a30d

-rw-r--r--  1 rootroot rootroot       0 2月  22 16:50 .preparedd2c71c83f94494e834bc09b8c699a30d_check

-rw-r--r--  1 rootroot rootroot       7 9月  22  2013 .prev-version

-rw-r--r--  1 rootroot rootroot    3983 9月  22  2013 README

drwxr-xr-x  3 rootroot rootroot    4096 2月  22 16:50 src/

-rw-r--r--  1 rootroot rootroot      29 2月  22 16:50 stamp-h

-rw-r--r--  1 rootroot rootroot       7 9月  22  2013 .tarball-version

drwxr-xr-x  3 rootroot rootroot   16384 2月  22 16:50 tests/

-rw-r--r--  1 rootroot rootroot    6438 9月  22  2013 THANKS

-rw-r--r--  1 rootroot rootroot    2062 9月  22  2013 TODO

-rw-r--r--  1 rootroot rootroot       7 9月  22  2013 .version

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17$ sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17$ echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17$ 

[email protected]:~/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/m4-1.4.17$ cd -

/home/rootroot/wyb/r16/tinav3.0

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

問題2:

make -j4

make -j1

  HOSTCC  tools/lib/libfdt/fdt_strerror.o

  HOSTCC  tools/lib/libfdt/fdt_wip.o

  HOSTCC  tools/lib/md5.o

In file included from /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include/compiler.h:46,

                 from /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include/libfdt_env.h:12,

                 from <command-line>:0:

/home/rootroot/wyb/r16/tinav3.0/out/host/include/byteswap.h:2: warning: #include_next is a GCC extension

In file included from /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/md5.c:34,

                 from tools/lib/md5.c:1:

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/include/u-boot/md5.h:17: warning: ISO C doesn't support unnamed structs/unions

  HOSTCC  tools/lib/rsa/rsa-checksum.o

  HOSTCC  tools/lib/rsa/rsa-sign.o

In file included from tools/lib/rsa/rsa-sign.c:1:

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_remove':

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:156: warning: 'ERR_remove_thread_state' is deprecated (declared at /usr/include/openssl/err.h:260)

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_get_exponent':

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:279: error: dereferencing pointer to incomplete type

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:282: error: dereferencing pointer to incomplete type

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:284: error: dereferencing pointer to incomplete type

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:289: error: dereferencing pointer to incomplete type

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c: In function 'rsa_get_params':

/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/lib/rsa/rsa-sign.c:340: error: dereferencing pointer to incomplete type

make[5]: *** [scripts/Makefile.host:134: tools/lib/rsa/rsa-sign.o] Error 1

make[4]: *** [Makefile:1195: tools-only] Error 2

make[4]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10'

make[3]: *** [Makefile:48: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/compile_dir/host/u-boot-2014.10/.built] Error 2

make[3]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0/tools/mkimage'

make[2]: *** [tools/Makefile:130: tools/mkimage/compile] Error 2

make[2]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make[1]: *** [tools/Makefile:128: /home/rootroot/wyb/r16/tinav3.0/out/astar-parrot/staging_dir/target/stamp/.tools_install_yyyynyyynyyyyyynnnyyyyyyyyyynnyyyyyyynynyyynnyyyy] Error 2

make[1]: Leaving directory '/home/rootroot/wyb/r16/tinav3.0'

make: *** [/home/rootroot/wyb/r16/tinav3.0/build/toplevel.mk:274:world] 錯誤 2

#### make failed to build some targets (03:34 (mm:ss)) ####

real    3m33.501s

user    2m46.356s

sys    0m35.835s

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ 

[email protected]:~/wyb/r16/tinav3.0$ time(make -j4)