Compilation error on Alpine
Status: Beta
Brought to you by:
chtsanti
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.
Anonymous
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
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
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?
Hi there,
1st thanks for your feedback, much appreciated. Here is the wanted file:
According to the APK logs in my previous post, awk isn't downgraded, this is it's version:
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
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
Downgrading gcc with newest Alpine Image is no longer a valid option. Is planned to support GCC 14?