Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master: failed build on CentOS7 #2631

Closed
sergey-safarov opened this issue Feb 9, 2021 · 5 comments
Closed

master: failed build on CentOS7 #2631

sergey-safarov opened this issue Feb 9, 2021 · 5 comments

Comments

@sergey-safarov
Copy link
Member

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

@miconda
Copy link
Member

miconda commented Feb 9, 2021

Try with latest master and if still problems, reopen.

@miconda miconda closed this as completed Feb 9, 2021
@sergey-safarov
Copy link
Member Author

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)

@sergey-safarov sergey-safarov reopened this Feb 9, 2021
@miconda
Copy link
Member

miconda commented Feb 10, 2021

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.

@miconda
Copy link
Member

miconda commented Feb 10, 2021

Try again with latest master, seems to be ok on centos 7.

@miconda miconda closed this as completed Feb 10, 2021
@sergey-safarov
Copy link
Member Author

@miconda, are you use docker on your dev PC?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants