Skip to content

Build error with latest aspnet alpine image #106

@felipesegade

Description

@felipesegade

Hello,

I'm building your lib from this repository in a docker container using a aspnet:8.0-alpine image as a base

I'm executing those commands:

RUN git clone --depth 1 --branch v1.3.1 https://github.com/gssapi/gss-ntlmssp
RUN autoreconf -f -i
RUN ./configure --without-manpages --disable-nls
RUN make

The build fails with the following error:

gcc -DHAVE_CONFIG_H -I.  -Wall -Iinclude -I.. -I./include -I. -Iinclude -I. -DLIBDIR=\"/usr/local/lib\" -DVARDIR=\"/usr/local/var\" -DSHLIBEXT=\"\" -DSYSCONFDIR=\"/usr/local/etc\" -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/include -I/usr/include -I/usr/include/samba-4.0 -DHAVE_IMMEDIATE_STRUCTURES=1  -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -fno-strict-aliasing  -g -O2 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -MT src/ntlmssptest-gss_err.o -MD -MP -MF src/.deps/ntlmssptest-gss_err.Tpo -c -o src/ntlmssptest-gss_err.o `test -f 'src/gss_err.c' || echo './'`src/gss_err.c
src/gss_err.c: In function 'gssntlm_display_status':
src/gss_err.c:109:13: error: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  109 |         ret = strerror_r(status_value, buf, 400);
      |             ^
make[2]: *** [Makefile:1233: src/ntlmssptest-gss_err.o] Error 1
make[2]: Leaving directory '/gss-ntlmssp'
make[1]: Leaving directory '/gss-ntlmssp'
error building image: error building stage: failed to execute command: waiting for process to exit: exit status 2
make[1]: *** [Makefile:1459: all-recursive] Error 1
make: *** [Makefile:821: all] Error 2
ERROR: Job failed: command terminated with exit code 1

This build used to work until recently and I think that is related to the change of behaviour of GCC since the version 14 (see here https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106416)

I changed my Dockerfile to add the following flags and fix the build:

RUN git clone --depth 1 --branch v1.3.1 https://github.com/gssapi/gss-ntlmssp
RUN autoreconf -f -i
RUN ./configure CFLAGS="-g -O2 -Wno-error=int-conversion" --without-manpages --disable-nls
RUN make
gcc -DHAVE_CONFIG_H -I.  -Wall -Iinclude -I.. -I./include -I. -Iinclude -I. -DLIBDIR=\"/usr/local/lib\" -DVARDIR=\"/usr/local/var\" -DSHLIBEXT=\"\" -DSYSCONFDIR=\"/usr/local/etc\" -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/include -I/usr/include -I/usr/include/samba-4.0 -DHAVE_IMMEDIATE_STRUCTURES=1  -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Werror-implicit-function-declaration -fno-strict-aliasing  -g -O2 -Wno-error=int-conversion -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -MT src/ntlmssptest-gss_err.o -MD -MP -MF src/.deps/ntlmssptest-gss_err.Tpo -c -o src/ntlmssptest-gss_err.o `test -f 'src/gss_err.c' || echo './'`src/gss_err.c
src/gss_err.c: In function 'gssntlm_display_status':
src/gss_err.c:109:13: warning: assignment to 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
  109 |         ret = strerror_r(status_value, buf, 400);
      |             ^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions