Skip to content

Build fails on gcc 14 #255

@mkumatag

Description

@mkumatag

Steps to reproduce:

podman run -ti golang:1.24-alpine3.21
apk update
apk add git curl wget net-tools gcc g++ make
curl -O https://download.joedog.org/siege/siege-4.1.7.tar.gz
tar zvxf siege-4.1.7.tar.gz
cd siege-4.1.7/
./configure
make install

Error hitting with:

make[1]: Entering directory '/go/siege-4.1.7/src'
gcc -DHAVE_CONFIG_H -I. -I../include      -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value   -g -O2 -c -o cookies.o cookies.c
cookies.c: In function 'new_cookies':
cookies.c:41:24: warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
   41 |   this = calloc(sizeof(struct COOKIES_T), 1);
      |                        ^~~~~~
cookies.c:41:24: note: earlier argument should specify number of elements, later size of each element
cookies.c: In function 'cookies_add':
cookies.c:69:19: error: initialization of 'size_t' {aka 'long unsigned int'} from 'pthread_t' {aka 'struct __pthread *'} makes integer from pointer without a cast [-Wint-conversion]
   69 |   size_t  id    = pthread_self();
      |                   ^~~~~~~~~~~~
cookies.c: In function 'cookies_delete':
cookies.c:125:23: warning: comparison between pointer and integer
  125 |     if (cur->threadID == id) {
      |                       ^~
cookies.c: In function 'cookies_delete_all':
cookies.c:153:23: warning: comparison between pointer and integer
  153 |     if (cur->threadID == id) {
      |                       ^~
cookies.c: In function 'cookies_header':
cookies.c:177:15: error: initialization of 'size_t' {aka 'long unsigned int'} from 'pthread_t' {aka 'struct __pthread *'} makes integer from pointer without a cast [-Wint-conversion]
  177 |   size_t id = pthread_self();
      |               ^~~~~~~~~~~~
make[1]: *** [Makefile:450: cookies.o] Error 1
make[1]: Leaving directory '/go/siege-4.1.7/src'

gcc and os information:

/go/siege-4.1.7 # gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-alpine-linux-musl/14.2.0/lto-wrapper
Target: aarch64-alpine-linux-musl
Configured with: /home/buildozer/aports/main/gcc/src/gcc-14.2.0/configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --build=aarch64-alpine-linux-musl --host=aarch64-alpine-linux-musl --target=aarch64-alpine-linux-musl --enable-checking=release --disable-cet --disable-fixed-point --disable-libstdcxx-pch --disable-multilib --disable-nls --disable-werror --disable-symvers --enable-__cxa_atexit --enable-default-pie --enable-default-ssp --enable-languages=c,c++,d,objc,go,fortran,ada --enable-link-serialization=2 --enable-linker-build-id --with-arch=armv8-a --with-abi=lp64 --disable-libquadmath --disable-libssp --disable-libsanitizer --enable-shared --enable-threads --enable-tls --with-bugurl=https://gitlab.alpinelinux.org/alpine/aports/-/issues --with-system-zlib --with-linker-hash-style=gnu --with-pkgversion='Alpine 14.2.0'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.2.0 (Alpine 14.2.0)
/go/siege-4.1.7 # cat /etc/os-release
NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.21.4
PRETTY_NAME="Alpine Linux v3.21"
HOME_URL="https://alpinelinux.org/"
BUG_REPORT_URL="https://gitlab.alpinelinux.org/alpine/aports/-/issues"
/go/siege-4.1.7 #

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions