Errors building OpenOCD 0.10.0

Open source ARM Debugger

Moderator: phalanx

Post Reply
parrotrupper
Posts: 2
Joined: Fri Jan 18, 2019 2:51 am

Errors building OpenOCD 0.10.0

Post by parrotrupper » Fri Jan 18, 2019 3:03 am

Open OCD version:
openocd-0.10.0

OS:
LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic

Build command:
./configure && make && make install

Offending code:

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I./src -I./src -I./src/helper -DPKGDATADIR=\"/usr/local/share/openocd\" -DBINDIR=\"/usr/local/bin\" -I./jimtcl -I./jimtcl -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -g -O2 -MT src/svf/svf.lo -MD -MP -MF src/svf/.deps/svf.Tpo -c src/svf/svf.c -o src/svf/svf.o
src/svf/svf.c: In function ‘svf_read_command_from_file’:
src/svf/svf.c:663:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
i = -1;
~~^~~~
src/svf/svf.c:664:4: note: here
case '\r':
^~~~
src/svf/svf.c:667:8: error: this statement may fall through [-Werror=implicit-fallthrough=]
if (!cmd_pos)
^
src/svf/svf.c:669:4: note: here
default:
^~~~~~~
cc1: all warnings being treated as errors
Makefile:2790: recipe for target 'src/svf/svf.lo' failed
make[2]: *** [src/svf/svf.lo] Error 1
make[2]: Leaving directory '/home/deya/dev-tools/openocd/openocd-0.10.0'
Makefile:3665: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/deya/dev-tools/openocd/openocd-0.10.0'
Makefile:1578: recipe for target 'all' failed
make: *** [all] Error 2

parrotrupper
Posts: 2
Joined: Fri Jan 18, 2019 2:51 am

Re: Errors building OpenOCD 0.10.0

Post by parrotrupper » Mon Jan 21, 2019 3:11 am

ping?

mayor
Posts: 5
Joined: Fri Feb 01, 2019 1:15 pm

Re: Errors building OpenOCD 0.10.0

Post by mayor » Fri Feb 01, 2019 2:29 pm

Hi, remove the -Werror flag! You are getting warnings for deliberate switch fallthroughs that are being treated as errors, hence the failed build.

Post Reply