You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run docker build --progress=plain -t test:latest ., using the following Dockerfile
# docker build --progress=plain -t test:latest .
FROM fedora:42@sha256:70d5934128fe1b1abc97750dc358dad9cf499c11059f0ed720872fedcc4880d1
RUN set -x \
&& dnf install -y gcc \
&& dnf clean all
RUN set -x \
&& uname -a
RUN set -x \
&& cat /etc/*release | grep PRETTY
RUN set -x \
&& gcc -v
RUN set -x \
&& curl -sL https://github.com/nwchemgit/nwchem/raw/refs/heads/master/src/rtdb/hdbm/hdbm.c -o /tmp/hdbm.c \
&& curl -sL https://github.com/nwchemgit/nwchem/raw/refs/heads/master/src/rtdb/hdbm/hdbm.h -o /tmp/hdbm.h
RUN cd /tmp && gcc -c hdbm.c
CMD ["/bin/bash"]
Expected behavior
Successful build.
The text was updated successfully, but these errors were encountered:
It sounds like a bug in the compiler parser to me, confused by the false variable name.
If you replace the false variable name with something else, gcc-15 does not throw an error.
Here is the Dockerfile
# docker build --progress=plain -t test:latest .
FROM fedora:42@sha256:70d5934128fe1b1abc97750dc358dad9cf499c11059f0ed720872fedcc4880d1
RUN set -x \
&& dnf install -y gcc patch \
&& dnf clean all
RUN set -x \
&& uname -a
RUN set -x \
&& cat /etc/*release | grep PRETTY
RUN set -x \
&& gcc -v
RUN set -x \
&& curl -sL https://github.com/nwchemgit/nwchem/raw/refs/heads/master/src/rtdb/hdbm/hdbm.c -o /tmp/hdbm.c \
&& curl -sL https://github.com/nwchemgit/nwchem/raw/refs/heads/master/src/rtdb/hdbm/hdbm.h -o /tmp/hdbm.h
RUN cat > /tmp/hdbm_false.patch <<EOF
diff --git a/hdbm.c b/hdbm.c
index 5e0170e..38211b1 100644
--- a/hdbm.c
+++ b/hdbm.c
@@ -607,7 +607,7 @@ static int delete_file_entry(hdbm db, entry *e)
file_entry fe;
long act_ptr = e->rec_ptr +
(long) (((char *) &fe.active) - ((char *) &fe));
- int false = 0;
+ int flse = 0;
int ind;
if (hdbm_fseek(file, act_ptr, SEEK_SET)) {
@@ -616,7 +616,7 @@ static int delete_file_entry(hdbm db, entry *e)
return 0;
}
- if (hdbm_fwrite((char *) &false, sizeof(false), (size_t) 1, file) != 1) {
+ if (hdbm_fwrite((char *) &flse, sizeof(flse), (size_t) 1, file) != 1) {
fprintf(stderr, "delete_file_entry: failed to inactivate header\n");
return 0;
}
EOF
RUN cd /tmp && patch -p1 < /tmp/hdbm_false.patch
RUN cd /tmp && gcc -c hdbm.c
CMD ["/bin/bash"]
Describe the bug
For 8701f25, the compilation fails on Fedora42,
gcc version 15.0.1 20250114 (Red Hat 15.0.1-0) (GCC)
, withReported at https://bugzilla.redhat.com/show_bug.cgi?id=2340948
To Reproduce
docker build --progress=plain -t test:latest .
, using the following DockerfileExpected behavior
Successful build.
The text was updated successfully, but these errors were encountered: