Menu

#133 Compilation error on Alpine

All
open
nobody
None
5
2025-05-13
2024-12-25
Anonymous
No

Hi there,

I'm facing this output while compiling c-icap v0.6.3:

46.04 gcc -DHAVE_CONFIG_H -I.    -fvisibility=hidden -I./include/ -I./include/ -DCI_CONFDIR=\"/opt/c-icap/etc\" -DCI_MODSDIR=\"/opt/c-icap/lib/c_icap/\" -DCI_SERVDIR=\"/opt/c-icap/lib/c_icap/\" -DCI_LOGDIR=\"/opt/c-icap/var/log/\" -DCI_DATADIR=\"/opt/c-icap/share/c_icap/\" -DCI_USE_INLINE_OBJECT_METHODS  -D_REENTRANT -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -MT c_icap-_autoconf_table.o -MD -MP -MF .deps/c_icap-_autoconf_table.Tpo -c -o c_icap-_autoconf_table.o `test -f '_autoconf_table.c' || echo './'`_autoconf_table.c
46.07 _autoconf_table.c:12:38: warning: multi-character literal with 20 characters exceeds 'int' size of 4 bytes
46.07    12 |      {"C_ICAP_CONFIGURE_OPTIONS", "" '--prefix=/opt/c-icap' '--enable-large-files'""},
46.07       |                                      ^~~~~~~~~~~~~~~~~~~~~~
46.07 _autoconf_table.c:12:38: error: expected '}' before '\x69636170'
46.07    12 |      {"C_ICAP_CONFIGURE_OPTIONS", "" '--prefix=/opt/c-icap' '--enable-large-files'""},
46.07       |      ~                               ^~~~~~~~~~~~~~~~~~~~~~
46.07 _autoconf_table.c:12:61: warning: multi-character literal with 20 characters exceeds 'int' size of 4 bytes
46.07    12 |      {"C_ICAP_CONFIGURE_OPTIONS", "" '--prefix=/opt/c-icap' '--enable-large-files'""},
46.07       |                                                             ^~~~~~~~~~~~~~~~~~~~~~
46.07 _autoconf_table.c:15:36: error: expected '}' before 'x86_64'
46.07    15 |      {"C_ICAP_CONFIG_HOST_TYPE", ""x86_64-pc-linux-musl""},
46.07       |      ~                             ^~~~~~
46.07 _autoconf_table.c:147:22: error: request for member 'libs' in something not a structure or union
46.07   147 |      {"LT_OBJDIR", "".libs/""},
46.07       |                      ^
46.07 _autoconf_table.c:150:20: error: expected '}' before 'c_icap'
46.07   150 |      {"PACKAGE", ""c_icap""},
46.07       |      ~             ^~~~~~
46.07 _autoconf_table.c:156:25: error: expected '}' before 'c_icap'
46.07   156 |      {"PACKAGE_NAME", ""c_icap""},
46.07       |      ~                  ^~~~~~
46.07 _autoconf_table.c:159:27: error: expected '}' before 'c_icap'
46.07   159 |      {"PACKAGE_STRING", ""c_icap 0.6.3""},
46.07       |      ~                    ^~~~~~
46.07 _autoconf_table.c:159:34: error: too many decimal points in number
46.07   159 |      {"PACKAGE_STRING", ""c_icap 0.6.3""},
46.07       |                                  ^~~~~
46.07 _autoconf_table.c:162:28: error: expected '}' before 'c_icap'
46.07   162 |      {"PACKAGE_TARNAME", ""c_icap""},
46.07       |      ~                     ^~~~~~
46.07 _autoconf_table.c:168:28: error: too many decimal points in number
46.07   168 |      {"PACKAGE_VERSION", ""0.6.3""},
46.07       |                            ^~~~~
46.07 _autoconf_table.c:168:28: error: expected '}' before numeric constant
46.07   168 |      {"PACKAGE_VERSION", ""0.6.3""},
46.07       |      ~                     ^~~~~
46.07 _autoconf_table.c:243:20: error: too many decimal points in number
46.07   243 |      {"VERSION", ""0.6.3""},
46.07       |                    ^~~~~
46.08 _autoconf_table.c:243:20: error: expected '}' before numeric constant
46.08   243 |      {"VERSION", ""0.6.3""},
46.08       |      ~             ^~~~~
46.08 make[2]: Leaving directory '/c_icap-0.6.3'
46.08 make[2]: *** [Makefile:1485: c_icap-_autoconf_table.o] Error 1
46.08 make[1]: *** [Makefile:1551: all-recursive] Error 1
46.08 make[1]: Leaving directory '/c_icap-0.6.3'
46.08 make: *** [Makefile:691: all] Error 2

I am suspecting a GCC issue as such compilations where running all fine before. I'm compiling this on a Docker container, hence all the packages are updated at container creation time.

Find below the Docker outputs:

Dockerfile:38
--------------------
  37 |     # 3. download c_icap, c_icap modules and install them 
  38 | >>> RUN curl --silent --location --remote-name "http://downloads.sourceforge.net/project/c-icap/c-icap/0.6.x/c_icap-${cicapBaseVersion}.tar.gz" && \
  39 | >>>     curl --silent --location --remote-name "https://sourceforge.net/projects/c-icap/files/c-icap-modules/0.5.x/c_icap_modules-${cicapModuleVersion}.tar.gz" && \
  40 | >>>     tar -xzf "c_icap-${cicapBaseVersion}.tar.gz" && tar -xzf "c_icap_modules-${cicapModuleVersion}.tar.gz" && cd c_icap-${cicapBaseVersion} && \
  41 | >>> 
  42 | >>>     sed -i 's/HTTP\/1.0/HTTP\/1.1/g' utils/c-icap-client.c && \
  43 | >>>     sed -i 's/HTTP\/1.0/HTTP\/1.1/g' info.c && \
  44 | >>> 
  45 | >>>     /bin/sh RECONF && \
  46 | >>>     ./configure --quiet --prefix=/opt/c-icap --enable-large-files && \
  47 | >>>     make && make install && \
  48 | >>> 
  49 | >>>     cd ../c_icap_modules-${cicapModuleVersion}/ && \
  50 | >>>     ./configure --quiet --with-c-icap=/opt/c-icap --prefix=/opt/c-icap && \
  51 | >>>     make && make install
  52 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c curl --silent --location --remote-name \"http://downloads.sourceforge.net/project/c-icap/c-icap/0.6.x/c_icap-${cicapBaseVersion}.tar.gz\" &&     curl --silent --location --remote-name \"https://sourceforge.net/projects/c-icap/files/c-icap-modules/0.5.x/c_icap_modules-${cicapModuleVersion}.tar.gz\" &&     tar -xzf \"c_icap-${cicapBaseVersion}.tar.gz\" && tar -xzf \"c_icap_modules-${cicapModuleVersion}.tar.gz\" && cd c_icap-${cicapBaseVersion} &&     sed -i 's/HTTP\\/1.0/HTTP\\/1.1/g' utils/c-icap-client.c &&     sed -i 's/HTTP\\/1.0/HTTP\\/1.1/g' info.c &&     /bin/sh RECONF &&     ./configure --quiet --prefix=/opt/c-icap --enable-large-files &&     make && make install &&     cd ../c_icap_modules-${cicapModuleVersion}/ &&     ./configure --quiet --with-c-icap=/opt/c-icap --prefix=/opt/c-icap &&     make && make install" did not complete successfully: exit code: 2

Meanwhile, everything seems functional... Let me know,
Kind regards & thanks for c-icap !

Cheers,
M.

Discussion

  • Anonymous

    Anonymous - 2024-12-27

    FYI, it compiles all fine using:
    FROM alpine:3.20.3

    It fails using:
    FROM alpine:latest
    FROM alpine:3.21.0

    Let me know,
    thanks

     
  • Anonymous

    Anonymous - 2025-01-09

    Hi,

    Reverting gcc/g++ to these version (13.2.1) compiles c-ciap all fine.
    The 14.2.0 versions fails:

    host:/tmp/install/c_icap-0.6.3# apk add gcc=13.2.1_git20240309-r0
    fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz
    fetch https://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz
    (1/6) Downgrading libstdc++ (14.2.0-r5 -> 13.2.1_git20240309-r0)
    (2/6) Downgrading libstdc++-dev (14.2.0-r5 -> 13.2.1_git20240309-r0)
    (3/6) Downgrading libgomp (14.2.0-r5 -> 13.2.1_git20240309-r0)
    (4/6) Downgrading libatomic (14.2.0-r5 -> 13.2.1_git20240309-r0)
    (5/6) Downgrading gcc (14.2.0-r5 -> 13.2.1_git20240309-r0)
    (6/6) Downgrading g++ (14.2.0-r5 -> 13.2.1_git20240309-r0)

    A feedback would be welcome.
    Thanks,
    regards

     
  • chtsanti

    chtsanti - 2025-01-15

    The _autoconf_table.c is autogenerated file and is very simple it should compiled by any compiler. Maybe it is awk release issue?
    Is it possible that downgrading gcc you are downgrading the awk too?
    Can you post the (auto-generated) _autoconf_table.c file which fails to compile?

     
  • Anonymous

    Anonymous - 2025-01-28

    Hi there,

    1st thanks for your feedback, much appreciated. Here is the wanted file:

    host:/tmp/install/c_icap-0.6.3# cat _autoconf_table.c
    /*
         Autogenerated file. Please do not edit.
    */
    #include <stdlib.h>
    #include "autoconf.h"
    
    struct {
         const char *n;
         const char *v;
    } _CI_CONF_AUTOCONF[] = {
    #if defined(C_ICAP_CONFIGURE_OPTIONS)
         {"C_ICAP_CONFIGURE_OPTIONS", "\" 'CXXFLAGS=-O2 -m64 -pipe' 'CFLAGS=-O2 -m64 -pipe' '--without-bdb' '--prefix=/opt/c-icap' '--enable-large-files'\""},
    #endif
    #if defined(C_ICAP_CONFIG_HOST_TYPE)
         {"C_ICAP_CONFIG_HOST_TYPE", "\"x86_64-pc-linux-musl\""},
    #endif
    #if defined(HAVE_128BIT_ATOMICS)
         {"HAVE_128BIT_ATOMICS", "1"},
    #endif
    #if defined(HAVE_ASSERT_H)
         {"HAVE_ASSERT_H", "1"},
    #endif
    #if defined(HAVE_BZLIB)
         {"HAVE_BZLIB", "1"},
    #endif
    #if defined(HAVE_C11_ATOMICS)
         {"HAVE_C11_ATOMICS", "1"},
    #endif
    #if defined(HAVE_DECL_STRERROR_R)
         {"HAVE_DECL_STRERROR_R", "1"},
    #endif
    #if defined(HAVE_DLFCN_H)
         {"HAVE_DLFCN_H", "1"},
    #endif
    #if defined(HAVE_INET_ATON)
         {"HAVE_INET_ATON", "1"},
    #endif
    #if defined(HAVE_INET_NTOP)
         {"HAVE_INET_NTOP", "1"},
    #endif
    #if defined(HAVE_INET_PTON)
         {"HAVE_INET_PTON", "1"},
    #endif
    #if defined(HAVE_INT128)
         {"HAVE_INT128", "1"},
    #endif
    #if defined(HAVE_INTTYPES_H)
         {"HAVE_INTTYPES_H", "1"},
    #endif
    #if defined(HAVE_IPV6)
         {"HAVE_IPV6", "1"},
    #endif
    #if defined(HAVE_LIMITS_H)
         {"HAVE_LIMITS_H", "1"},
    #endif
    #if defined(HAVE_MMAP)
         {"HAVE_MMAP", "1"},
    #endif
    #if defined(HAVE_MUNMAP)
         {"HAVE_MUNMAP", "1"},
    #endif
    #if defined(HAVE_NANOSLEEP)
         {"HAVE_NANOSLEEP", "1"},
    #endif
    #if defined(HAVE_POLL)
         {"HAVE_POLL", "1"},
    #endif
    #if defined(HAVE_POLL_H)
         {"HAVE_POLL_H", "1"},
    #endif
    #if defined(HAVE_POSIX_FILE_LOCK)
         {"HAVE_POSIX_FILE_LOCK", "1"},
    #endif
    #if defined(HAVE_POSIX_MAPPED_FILES)
         {"HAVE_POSIX_MAPPED_FILES", "1"},
    #endif
    #if defined(HAVE_POSIX_SEMAPHORES)
         {"HAVE_POSIX_SEMAPHORES", "1"},
    #endif
    #if defined(HAVE_POSIX_SHARED_MEM)
         {"HAVE_POSIX_SHARED_MEM", "1"},
    #endif
    #if defined(HAVE_PREAD)
         {"HAVE_PREAD", "1"},
    #endif
    #if defined(HAVE_PTHREADS_PROCESS_SHARED)
         {"HAVE_PTHREADS_PROCESS_SHARED", "1"},
    #endif
    #if defined(HAVE_PTHREADS_RWLOCK)
         {"HAVE_PTHREADS_RWLOCK", "1"},
    #endif
    #if defined(HAVE_REGEX)
         {"HAVE_REGEX", "1"},
    #endif
    #if defined(HAVE_REGEX_H)
         {"HAVE_REGEX_H", "1"},
    #endif
    #if defined(HAVE_SETGROUPS)
         {"HAVE_SETGROUPS", "1"},
    #endif
    #if defined(HAVE_STDINT_H)
         {"HAVE_STDINT_H", "1"},
    #endif
    #if defined(HAVE_STDIO_H)
         {"HAVE_STDIO_H", "1"},
    #endif
    #if defined(HAVE_STDLIB_H)
         {"HAVE_STDLIB_H", "1"},
    #endif
    #if defined(HAVE_STRCASESTR)
         {"HAVE_STRCASESTR", "1"},
    #endif
    #if defined(HAVE_STRERROR_R)
         {"HAVE_STRERROR_R", "1"},
    #endif
    #if defined(HAVE_STRINGS_H)
         {"HAVE_STRINGS_H", "1"},
    #endif
    #if defined(HAVE_STRING_H)
         {"HAVE_STRING_H", "1"},
    #endif
    #if defined(HAVE_SYSV_IPC)
         {"HAVE_SYSV_IPC", "1"},
    #endif
    #if defined(HAVE_SYS_IPC_H)
         {"HAVE_SYS_IPC_H", "1"},
    #endif
    #if defined(HAVE_SYS_STAT_H)
         {"HAVE_SYS_STAT_H", "1"},
    #endif
    #if defined(HAVE_SYS_TYPES_H)
         {"HAVE_SYS_TYPES_H", "1"},
    #endif
    #if defined(HAVE_TIOCGWINSZ)
         {"HAVE_TIOCGWINSZ", "1"},
    #endif
    #if defined(HAVE_UNISTD_H)
         {"HAVE_UNISTD_H", "1"},
    #endif
    #if defined(HAVE_VISIBILITY_ATTRIBUTE)
         {"HAVE_VISIBILITY_ATTRIBUTE", "1"},
    #endif
    #if defined(HAVE_WCHAR_H)
         {"HAVE_WCHAR_H", "1"},
    #endif
    #if defined(HAVE_ZLIB)
         {"HAVE_ZLIB", "1"},
    #endif
    #if defined(LT_OBJDIR)
         {"LT_OBJDIR", "\".libs/\""},
    #endif
    #if defined(PACKAGE)
         {"PACKAGE", "\"c_icap\""},
    #endif
    #if defined(PACKAGE_BUGREPORT)
         {"PACKAGE_BUGREPORT", "\"\""},
    #endif
    #if defined(PACKAGE_NAME)
         {"PACKAGE_NAME", "\"c_icap\""},
    #endif
    #if defined(PACKAGE_STRING)
         {"PACKAGE_STRING", "\"c_icap 0.6.3\""},
    #endif
    #if defined(PACKAGE_TARNAME)
         {"PACKAGE_TARNAME", "\"c_icap\""},
    #endif
    #if defined(PACKAGE_URL)
         {"PACKAGE_URL", "\"\""},
    #endif
    #if defined(PACKAGE_VERSION)
         {"PACKAGE_VERSION", "\"0.6.3\""},
    #endif
    #if defined(SIZEOF_INT)
         {"SIZEOF_INT", "4"},
    #endif
    #if defined(SIZEOF_LONG)
         {"SIZEOF_LONG", "8"},
    #endif
    #if defined(SIZEOF_LONG_LONG)
         {"SIZEOF_LONG_LONG", "8"},
    #endif
    #if defined(SIZEOF_OFF_T)
         {"SIZEOF_OFF_T", "8"},
    #endif
    #if defined(SIZEOF_SHORT)
         {"SIZEOF_SHORT", "2"},
    #endif
    #if defined(SIZEOF_VOID_P)
         {"SIZEOF_VOID_P", "8"},
    #endif
    #if defined(STDC_HEADERS)
         {"STDC_HEADERS", "1"},
    #endif
    #if defined(_ALL_SOURCE)
         {"_ALL_SOURCE", "1"},
    #endif
    #if defined(_DARWIN_C_SOURCE)
         {"_DARWIN_C_SOURCE", "1"},
    #endif
    #if defined(__EXTENSIONS__)
         {"__EXTENSIONS__", "1"},
    #endif
    #if defined(_GNU_SOURCE)
         {"_GNU_SOURCE", "1"},
    #endif
    #if defined(_HPUX_ALT_XOPEN_SOCKET_API)
         {"_HPUX_ALT_XOPEN_SOCKET_API", "1"},
    #endif
    #if defined(_NETBSD_SOURCE)
         {"_NETBSD_SOURCE", "1"},
    #endif
    #if defined(_OPENBSD_SOURCE)
         {"_OPENBSD_SOURCE", "1"},
    #endif
    #if defined(_POSIX_PTHREAD_SEMANTICS)
         {"_POSIX_PTHREAD_SEMANTICS", "1"},
    #endif
    #if defined(__STDC_WANT_IEC_60559_ATTRIBS_EXT__)
         {"__STDC_WANT_IEC_60559_ATTRIBS_EXT__", "1"},
    #endif
    #if defined(__STDC_WANT_IEC_60559_BFP_EXT__)
         {"__STDC_WANT_IEC_60559_BFP_EXT__", "1"},
    #endif
    #if defined(__STDC_WANT_IEC_60559_DFP_EXT__)
         {"__STDC_WANT_IEC_60559_DFP_EXT__", "1"},
    #endif
    #if defined(__STDC_WANT_IEC_60559_FUNCS_EXT__)
         {"__STDC_WANT_IEC_60559_FUNCS_EXT__", "1"},
    #endif
    #if defined(__STDC_WANT_IEC_60559_TYPES_EXT__)
         {"__STDC_WANT_IEC_60559_TYPES_EXT__", "1"},
    #endif
    #if defined(__STDC_WANT_LIB_EXT2__)
         {"__STDC_WANT_LIB_EXT2__", "1"},
    #endif
    #if defined(__STDC_WANT_MATH_SPEC_FUNCS__)
         {"__STDC_WANT_MATH_SPEC_FUNCS__", "1"},
    #endif
    #if defined(_TANDEM_SOURCE)
         {"_TANDEM_SOURCE", "1"},
    #endif
    #if defined(VERSION)
         {"VERSION", "\"0.6.3\""},
    #endif
    #if defined(WORDS_LITTLEENDIAN)
         {"WORDS_LITTLEENDIAN", "1"},
    #endif
         {NULL, NULL}
    };
    

    According to the APK logs in my previous post, awk isn't downgraded, this is it's version:

    host:/tmp/install/c_icap-0.6.3# awk --help
    BusyBox v1.37.0 (2025-01-17 20:56:17 UTC) multi-call binary.
    
    Usage: awk [OPTIONS] [AWK_PROGRAM] [FILE]...
    
            -v VAR=VAL      Set variable
            -F SEP          Use SEP as field separator
            -f/-E FILE      Read program from FILE
            -e AWK_PROGRAM
    

    For the time being, my workaround of forcing gcc/g++ to v13.2.1 works, although in the long term that won't stand.

    Thanks a lot for your support,
    Kind regards

     
  • Anonymous

    Anonymous - 2025-03-22

    Hi there, just tested again with "(44/64) Installing gcc (14.2.0-r5)" and it now compiles all fine on c-icap 0.6.3.. Have you modified anything ? Let me know thanks

     
  • Anonymous

    Anonymous - 2025-05-13

    Downgrading gcc with newest Alpine Image is no longer a valid option. Is planned to support GCC 14?

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB