``` CC (gcc) [kamailio] core/cfg/cfg.o CC (gcc) [kamailio] core/utils/srjson.o CC (gcc) [kamailio] core/utils/sruid.o CC (gcc) [kamailio] core/utils/tmrec.o bison -d -b core/cfg core/cfg.y flex -o core/lex.yy.c core/cfg.lex CC (gcc) [kamailio] core/lex.yy.o core/cfg.lex:45:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'yy_fatal_error' static void yynoreturn yy_fatal_error ( const char* msg ) __attribute__((unused)); ^ core/cfg.lex:46:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ksr_yy_fatal_error' static void yynoreturn ksr_yy_fatal_error(const char* msg); ^ core/lex.yy.c: In function 'yylex': core/lex.yy.c:6389:3: warning: implicit declaration of function 'ksr_yy_fatal_error' [-Wimplicit-function-declaration] YY_FATAL_ERROR( ^ core/cfg.lex: At top level: core/cfg.lex:2172:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ksr_yy_fatal_error' { ^ core/lex.yy.c:7055:13: warning: 'yy_fatal_error' defined but not used [-Wunused-function] static void yy_fatal_error (yyconst char* msg ) ^ make[1]: *** [core/lex.yy.o] Error 1 make: *** [default] Error 2 make[1]: Leaving directory `/root/rpmbuild/BUILD/kamailio-5.5.0-dev3/src' error: Bad exit status from /var/tmp/rpm-tmp.HXxCns (%build) ```
On CentOS7 build properly
Closed #2631.
Try with latest master and if still problems, reopen.
On current master on CentOS 7
``` CC (gcc) [kamailio] core/utils/tmrec.o bison -d -b core/cfg core/cfg.y flex -o core/lex.yy.c core/cfg.lex CC (gcc) [kamailio] core/lex.yy.o core/cfg.lex:45:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ksr_yy_fatal_error' static void yynoreturn ksr_yy_fatal_error(const char* msg); ^ core/lex.yy.c: In function 'yylex': core/lex.yy.c:6388:3: warning: implicit declaration of function 'ksr_yy_fatal_error' [-Wimplicit-function-declaration] YY_FATAL_ERROR( ^ core/cfg.lex: At top level: core/cfg.lex:2171:24: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ksr_yy_fatal_error' { ^ core/lex.yy.c:7054:13: warning: 'yy_fatal_error' defined but not used [-Wunused-function] static void yy_fatal_error (yyconst char* msg ) ^ make[1]: *** [core/lex.yy.o] Error 1 make[1]: Leaving directory `/root/rpmbuild/BUILD/kamailio-5.5.0-dev3/src' make: *** [default] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.TzvNS3 (%build) ```
Reopened #2631.
Hmm, it seems to be specific to old distros (likely old versions of flex and bison), on ubuntu 20.04 where I could reproduce --atexit issues, works fine. I need to get access to a centos 7 to see what flex/bison generates.
Try again with latest master, seems to be ok on centos 7.
Closed #2631.
@miconda, are you use docker on your dev PC?