BPI-R2 Compile errror about flex-2.6.4


(roy1) #1

Hello,

my sourcecode is form: https://github.com/garywangcn/bpi-r2_lede/tree/bpi-r2-on-lede-v1

my host PC settings :

  • cat /proc/version
  • Linux version 4.15.0-42-generic (buildd@lgw01-amd64-023) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #45-Ubuntu SMP Thu Nov 15 19:32:57 UTC 2018

when I compile with: make V=s -j1, I hava a compiling error:

  • Makefile:1689: recipe for target ‘stage1scan.c’ failed
  • make[6]: *** [stage1scan.c] Segmentation fault (core dumped)
  • make[6]: Leaving directory '/home/****/bpi-r2_lede/build_dir/host/flex-2.6.4/src
  • Makefile:539: recipe for target ‘all’ failed
  • make[5]: *** [all] Error 2
  • make[5]: Leaving directory ‘/home/****/bpi-r2_lede/build_dir/host/flex-2.6.4/src’
  • Makefile:525: recipe for target ‘all-recursive’ failed
  • make[4]: *** [all-recursive] Error 1
  • make[4]: Leaving directory ‘/home/****/bpi-r2_lede/build_dir/host/flex-2.6.4’
  • Makefile:28: recipe for target ‘/home/****/bpi-r2_lede/build_dir/host/flex-2.6.4/.built’ failed
  • make[3]: *** [/home/****/bpi-r2_lede/build_dir/host/flex-2.6.4/.built] Error 2
  • make[3]: Leaving directory ‘/home/****/bpi-r2_lede/tools/flex’
  • tools/Makefile:148: recipe for target ‘tools/flex/compile’ failed
  • make[2]: *** [tools/flex/compile] Error 2
  • make[2]: Leaving directory ‘/home/****/bpi-r2_lede’
  • tools/Makefile:146: recipe for target ‘/home/****/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny’ failed
  • make[1]: *** [/home/****/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny] Error 2
  • make[1]: Leaving directory ‘/home/****/bpi-r2_lede’
  • /home/****/bpi-r2_lede/include/toplevel.mk:207: recipe for target ‘world’ failed
  • make: *** [world] Error 2

Is there someone has the same problem?


(ZB) #2

Hello,could you please show me the whole print log?

it is difficult to judge the error only by this part.


(roy1) #3

Hello Jack,the problem is closed now, I changed flex2.6.4 to flex2.6.3.


(Ludwig) #4

This still happens on a fresh setup

/usr/bin/env bash ../libtool  --tag=CC   --mode=link gcc  -O2 -I/datadisk/Projekte/R2/bpi-r2_lede/staging_dir/host/include -I/datadisk/Projekte/R2/bpi-r2_lede/staging_dir/host/usr/include   -L/datadisk/Projekte/R2/bpi-r2_lede/staging_dir/host/lib -L/datadisk/Projekte/R2/bpi-r2_lede/staging_dir/host/usr/lib  -o stage1flex stage1flex-scan.o stage1flex-buf.o stage1flex-ccl.o stage1flex-dfa.o stage1flex-ecs.o stage1flex-filter.o stage1flex-gen.o stage1flex-main.o stage1flex-misc.o stage1flex-nfa.o stage1flex-options.o stage1flex-parse.o stage1flex-regex.o stage1flex-scanflags.o stage1flex-scanopt.o stage1flex-skel.o stage1flex-sym.o stage1flex-tables.o stage1flex-tables_shared.o stage1flex-tblcmp.o stage1flex-yylex.o    -lm 
OpenWrt-libtool: link: gcc -O2 -I/datadisk/Projekte/R2/bpi-r2_lede/staging_dir/host/include -I/datadisk/Projekte/R2/bpi-r2_lede/staging_dir/host/usr/include -o stage1flex stage1flex-scan.o stage1flex-buf.o stage1flex-ccl.o stage1flex-dfa.o stage1flex-ecs.o stage1flex-filter.o stage1flex-gen.o stage1flex-main.o stage1flex-misc.o stage1flex-nfa.o stage1flex-options.o stage1flex-parse.o stage1flex-regex.o stage1flex-scanflags.o stage1flex-scanopt.o stage1flex-skel.o stage1flex-sym.o stage1flex-tables.o stage1flex-tables_shared.o stage1flex-tblcmp.o stage1flex-yylex.o  -L/datadisk/Projekte/R2/bpi-r2_lede/staging_dir/host/lib -L/datadisk/Projekte/R2/bpi-r2_lede/staging_dir/host/usr/lib -lm
./stage1flex   -o stage1scan.c ./scan.l
Makefile:1689: recipe for target 'stage1scan.c' failed
make[6]: *** [stage1scan.c] Segmentation fault
make[6]: Leaving directory '/datadisk/Projekte/R2/bpi-r2_lede/build_dir/host/flex-2.6.4/src'
Makefile:539: recipe for target 'all' failed
make[5]: *** [all] Error 2
make[5]: Leaving directory '/datadisk/Projekte/R2/bpi-r2_lede/build_dir/host/flex-2.6.4/src'
Makefile:525: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/datadisk/Projekte/R2/bpi-r2_lede/build_dir/host/flex-2.6.4'
Makefile:28: recipe for target '/datadisk/Projekte/R2/bpi-r2_lede/build_dir/host/flex-2.6.4/.built' failed
make[3]: *** [/datadisk/Projekte/R2/bpi-r2_lede/build_dir/host/flex-2.6.4/.built] Error 2
make[3]: Leaving directory '/datadisk/Projekte/R2/bpi-r2_lede/tools/flex'
tools/Makefile:148: recipe for target 'tools/flex/compile' failed
make[2]: *** [tools/flex/compile] Error 2
make[2]: Leaving directory '/datadisk/Projekte/R2/bpi-r2_lede'
tools/Makefile:146: recipe for target '/datadisk/Projekte/R2/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny' failed
make[1]: *** [/datadisk/Projekte/R2/bpi-r2_lede/staging_dir/target-arm_cortex-a7+neon-vfpv4_musl_eabi/stamp/.tools_compile_yynyyyyynyyyyynyynnyyyynyyyyyyyyyyyyyyynyynynnyyynny] Error 2
make[1]: Leaving directory '/datadisk/Projekte/R2/bpi-r2_lede'
/datadisk/Projekte/R2/bpi-r2_lede/include/toplevel.mk:207: recipe for target 'world' failed
make: *** [world] Error 2

(Frank W.) #5

Try without optimization (-O0 instead of 2) and -Wall to show all warnings