Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile on alpine with autoconf (2.71-r2) fails - autoconf 2.69 works #279

Closed
HarterHorst opened this issue May 20, 2023 · 2 comments
Closed

Comments

@HarterHorst
Copy link

I have written a dockerfile to create an image using alpine linux. The script failed to create the .configure file giving me an error "configure: error: cannot find required auxiliary files: config.guess config.sub".

$\textcolor{blue}{\textsf{dockerfile}}$

FROM alpine:latest

RUN apk update && apk add --virtual build-dependencies build-base automake autoconf musl git curl bison flex libevent-dev openssl-dev

WORKDIR "/compilensd"
RUN git clone https://github.com/NLnetLabs/nsd.git .
RUN aclocal && autoconf && autoheader

RUN ./configure
RUN make
RUN make install
RUN nsd -v

$\textcolor{blue}{\textsf{output}}$

...
#5 4.641 (26/59) Installing autoconf (2.71-r2)
...
#7 [4/9] RUN git clone https://github.com/NLnetLabs/nsd.git .
#7 0.256 Cloning into '.'...
#7 DONE 17.6s

#8 [5/9] RUN aclocal && autoconf && autoheader
#8 DONE 2.3s

#9 [6/9] RUN ./configure
#9 0.243 configure: error: cannot find required auxiliary files: config.guess config.sub
#9 ERROR: process "/bin/sh -c ./configure" did not complete successfully: exit code: 1
------
 > [6/9] RUN ./configure:
#9 0.243 configure: error: cannot find required auxiliary files: config.guess config.sub
------

I googled around and found a hint here which made me try to use a different autoconf version. 2.69 worked without any issues. Here's the dockerfile.

$\textcolor{blue}{\textsf{working dockerfile}}$

FROM alpine:latest

RUN apk update && apk add --virtual build-dependencies build-base automake musl git curl bison flex libevent-dev openssl-dev

# Downgrade to version 2.69 of autoconf due to error "error: cannot find required auxiliary files: config.guess config.sub" with latest autoconf
# see: https://github.com/asdf-vm/asdf-erlang/issues/195

WORKDIR "/autoconf"

RUN curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
RUN tar zxvf autoconf-2.69.tar.gz --strip-components 1
RUN ./configure && make && make install

WORKDIR "/compilensd"
RUN git clone https://github.com/NLnetLabs/nsd.git .
RUN aclocal && autoconf && autoheader

RUN ./configure
RUN make
RUN make install
RUN nsd -v
@wcawijngaards
Copy link
Member

The issue seems to be caused by the new --build and --host implementation in autoconf 2.71 that require the config.sub and config.guess files, to canonicalize and guess the type triplet. The autoconf 2.69 version did not require them for it, and thus did not need them. The build script can be changed to work, for both autoconf-2.69 and autoconf-2.71 by changing aclocal && autoconf && autoheader into autoreconf -fi. That picks up aclocal, config.guess and config.sub if necessary and creates the configure script for me, and then the compile works for me with both autoconf 2.69 and autoconf 2.71.

Perhaps I should change the compile advice on the readme file for this, as well?

@HarterHorst
Copy link
Author

Yes, this works with 'autoreconf -fi' . Thanks for the hint.

As more and more distributions move to autoconf 2.71 or higher, this issue will potentially cause more problems to compile on more up2date platforms.

wcawijngaards added a commit that referenced this issue May 24, 2023
  and also the needed auxiliary files, for autoconf 2.69 and 2.71.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants