问题
I am trying to build Aria2 in the docker image (CentOS 8). The local build of it (inside Docker/outside Docker) works fine. But a build in Gitlab CI with the SAME DOCKER IMAGE fails with an error:
./configure: line 13043: syntax error near unexpected token `libuv'
./configure: line 13043: `ARIA2_ARG_WITH(libuv)'
I cat'ed this fragment of the configure
file, it looks like:
...
cat >>confdefs.h <<_ACEOF
#define TARGET "$target"
_ACEOF
# Checks for arguments.
ARIA2_ARG_WITH(libuv)
ARIA2_ARG_WITHOUT(appletls)
ARIA2_ARG_WITHOUT(wintls)
...
The configure.ac
looks like:
...
# Checks for arguments.
ARIA2_ARG_WITH([libuv])
ARIA2_ARG_WITHOUT([appletls])
ARIA2_ARG_WITHOUT([wintls])
ARIA2_ARG_WITHOUT([gnutls])
...
Any help, tips will be very useful, I have not idea: Docker images are the same, the difference is only in the "host" OSes. But how can this be related to the syntax error in the configure
file?
EDIT:
This is the implementation of the macro:
dnl ARIA2_ARG_WITH(PACKAGE)
dnl wrapper for AC_ARG_WITH with default value 'no'.
dnl If --with-$1 is given explicitly, set with_$1_requested to given value.
AC_DEFUN([ARIA2_ARG_WITH],
[AC_ARG_WITH([$1],
AS_HELP_STRING([--with-$1], [Use $1.]),
[with_$1_requested=$withval with_$1=$withval], [with_$1=no])]
)
来源:https://stackoverflow.com/questions/65828592/the-problem-with-configure-file-in-the-docker-image-under-gitlab-ci