Build fails in branch openocd-cubeide-r4 or tag openocd-cubeide-v1.8.0 or later [-Werror=maybe-uninitialized]
@tarek-bochkati is already working on this.
Since Nov 2, 2022.
Assessment
This issue has not been assessed yet.
Description
Build fails in fresh docker build on branch openocd-cubeide-r4 or tag openocd-cubeide-v1.8.0 or later.
Tag openocd-cubeide-v1.7.0 and branch openocd-cubeide-r3 build fine.
Docker commands:
ARG VARIANT="focal"
FROM ubuntu:${VARIANT} AS openocd-builder
ARG OPENOCD_PATH=/opt/openocd-stm
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends \
build-essential \
ca-certificates \
git \
# build tools for openocd
libhidapi-dev \
libusb-1.0-0-dev \
libusb-dev \
libtool \
make \
automake \
autoconf \
pkg-config \
tclsh \
telnet \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --branch openocd-cubeide-r4 https://github.com/STMicroelectronics/OpenOCD.git ${OPENOCD_PATH} \
&& cd ${OPENOCD_PATH} \
&& ./bootstrap \
&& ./configure --enable-stlink \
&& make -j"$($(nproc) + 2)"
Full error message:
#6 67.64 /bin/bash ./libtool --tag=CC --mode=link gcc -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Wpointer-arith -Wundef -Wno-error=deprecated-declarations -Werror -g -O2 -o src/target/openrisc/libopenrisc.la src/target/openrisc/or1k.lo src/target/openrisc/or1k_du_adv.lo src/target/openrisc/or1k_tap_mohor.lo src/target/openrisc/or1k_tap_vjtag.lo src/target/openrisc/or1k_tap_xilinx_bscan.lo src/target/openrisc/jsp_server.lo -lutil -ldl
#6 67.71 In file included from ./src/helper/list.h:21,
#6 67.71 from ./src/helper/binarybuffer.h:25,
#6 67.71 from src/jtag/drivers/stlink_usb.c:37:
#6 67.71 src/jtag/drivers/stlink_usb.c: In function 'stlink_dap_op_queue_run_internal':
#6 67.71 mv -f src/target/.deps/libtarget_la-armv8_dpm.Tpo src/target/.deps/libtarget_la-armv8_dpm.Plo
#6 67.74 ./src/helper/types.h:194:9: error: 'misc_items' may be used uninitialized in this function [-Werror=maybe-uninitialized]
#6 67.74 194 | buf[0] = (uint8_t) (val >> 0);
#6 67.74 | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
#6 67.74 src/jtag/drivers/stlink_usb.c:4595:20: note: 'misc_items' was declared here
#6 67.74 4595 | unsigned int cnt, misc_items;
#6 67.74 | ^~~~~~~~~~
- Dominant language
- C
- Stars
- 202
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from STMicroelectronics/OpenOCD
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
bug
STMicroelectronics/OpenOCD#44 · 1 comment · 1 assignee ·
All issues in STMicroelectronics/OpenOCD
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NVIDIA/k8s-device-plugin#2061 · 1 comment ·
-
task
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
vsanthanam/JBird#429 ·