Open maxhofidrone opened 5 years ago
I have not ran into this issue. I recommend asking this question on gbd.
I have the same error with a fresh Ubuntu 18.04.3 LTS install, have you found a solution?
I have the same error here, Ubuntu 18.04.3. I google and find that problem [-Werror=implicit-fallthrough=] is related with gcc version, my is 7.4.0. This version complain about "fallthrough" same as "case" without a "break". This ocurs in several parts of code. First i tryed to change the Makefile, but i could't find the flags to ignore those erros than i dig into code puting "attribute((fallthrough));" inside cases, the compiller stops complain but i stuck in another error.
"coffgen.c"
`switch (combined->u.syment.n_sclass)
{
case C_FILE:
fprintf (file, "File ");
break;
case C_STAT:
if (combined->u.syment.n_type == T_NULL)
/* Probably a section symbol ? */
{
fprintf (file, "AUX scnlen 0x%lx nreloc %d nlnno %d",
(unsigned long) auxp->u.auxent.x_scn.x_scnlen,
auxp->u.auxent.x_scn.x_nreloc,
auxp->u.auxent.x_scn.x_nlinno);
if (auxp->u.auxent.x_scn.x_checksum != 0
|| auxp->u.auxent.x_scn.x_associated != 0
|| auxp->u.auxent.x_scn.x_comdat != 0)
fprintf (file, " checksum 0x%lx assoc %d comdat %d",
auxp->u.auxent.x_scn.x_checksum,
auxp->u.auxent.x_scn.x_associated,
auxp->u.auxent.x_scn.x_comdat);
break;
}
/* Otherwise fall through. */
__attribute__((fallthrough)); **// I put this here**
case C_EXT:
__attribute__((fallthrough));
case C_AIX_WEAKEXT:
if (ISFCN (combined->u.syment.n_type))
{
long next, llnos;
if (auxp->fix_end)
next = (auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p
- root);
else
next = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l;
llnos = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_lnnoptr;
fprintf (file,
"AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld",
tagndx,
(unsigned long) auxp->u.auxent.x_sym.x_misc.x_fsize,
llnos, next);
break;
}
/* Otherwise fall through. */
__attribute__((fallthrough));
`
I have the same error with Ubuntu 20.
The problem is you have high level GCC ,it will trun some warnings to error, you can use newer version gdb to solve this problem.
Adding -Werror=implicit-fallthrough=0 in the Makefile's WARN_CFLAGS removed the error for me
Hello, I installed successfully ROS Qt Creator Plug-in according their instruction (Ubuntu 18.04 ROS Melodic https://ros-qtc-plugin.readthedocs.io/en/latest/_source/How-to-Install-Users.html). Also the setup according their instruction work fine besides the installation of this repository:
then I get following error:
coffgen.c: In function ‘coff_print_symbol’: coffgen.c:2103:8: error: this statement may fall through [-Werror=implicit-fallthrough=] if (combined->u.syment.n_type == T_NULL) ^ coffgen.c:2120:3: note: here case C_EXT: ^~~~ coffgen.c:2122:8: error: this statement may fall through [-Werror=implicit-fallthrough=] if (ISFCN (combined->u.syment.n_type)) ^ coffgen.c:2140:3: note: here default: ^
~~ cc1: all warnings being treated as errors Makefile:1618: recipe for target 'coffgen.lo' failed make[4]: [coffgen.lo] Error 1 make[4]: Leaving directory '/home/max/gdb-7.7.1/bfd' Makefile:1660: recipe for target 'all-recursive' failed make[3]: [all-recursive] Error 1 make[3]: Leaving directory '/home/max/gdb-7.7.1/bfd' Makefile:1142: recipe for target 'all' failed make[2]: [all] Error 2 make[2]: Leaving directory '/home/max/gdb-7.7.1/bfd' Makefile:2599: recipe for target 'all-bfd' failed make[1]: [all-bfd] Error 2 make[1]: Leaving directory '/home/max/gdb-7.7.1' Makefile:832: recipe for target 'all' failed make: *** [all] Error 2What does this mean? How can I fix it? I did not find any information about it online. Flex and bison is installed. I would be very happy for any help about this!
Thanks in advance!
Max