archiecobbs / s3backer

FUSE/NBD single file backing store via Amazon S3
Other
538 stars 77 forks source link

Docker build failing #189

Closed jreadey closed 2 years ago

jreadey commented 2 years ago

If I run: docker build -t s3backer . I get the following error:

Step 5/8 : RUN ["./autogen.sh"]
 ---> Running in 05cc8d361708
cleaning up
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf
configure.ac:92: error: possibly undefined macro: PKG_CHECK_VAR
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
The command './autogen.sh' returned a non-zero code: 1

Any idea what's up with that?

archiecobbs commented 2 years ago

The PKG_CHECK_VAR macro is provided by pkg-config. https://autotools.info/pkgconfig/variables.html

Whatever system you're building on probably needs a version of pkg-config (at least 0.28, released in 2013):

$ rpom -q --changelog pkg-config
* Tue Feb 05 2013 p.drouand@gmail.com
- Update to version 0.28:
  + Fixed a pair of long-standing and intertwined bugs involving
    unwanted removal of flags:
  ...
  + New autoconf macro PKG_CHECK_VAR for reading variables from .pc
    files.
  ...

Managing docker builds is outside the scope of this project so I'm closing this bug, but feel free to add more questions or comments.

jreadey commented 2 years ago

Thanks for the quick response.

Looks like the Dockerfile hasn't been updated for a while. I could modify it myself, but first I'm having problems just building s3backer on ubuntu 22.04. I installed the packages listed in the INSTALL file, did ./configure but get the error:

checking for ZSTD... no
checking for NBDKIT... no
checking for curl_version in -lcurl... yes
checking for BIO_new in -lcrypto... no
configure: error: required library libcrypto missing

Thought to just install libcrypto but don't see that package:

# apt-cache search libcrypto
android-libcrypto-utils - Android crypto-utils library
android-libcrypto-utils-dev - Android crypto-utils library - Development files
libcrypto++-dev - General purpose cryptographic library - C++ development
libcrypto++-doc - General purpose cryptographic library - documentation
libcrypto++-utils - General purpose cryptographic library - utilities and data files
libcrypto++6 - General purpose cryptographic library - shared library
libcrypto++6-dbg - General purpose cryptographic library - debug symbols
libcrypto-equality-clojure - Clojure library protecting against timing attacks
libcrypto-random-clojure - secure random generator for Clojure
libcryptokit-ocaml - cryptographic algorithm library for OCaml - runtime
libcryptokit-ocaml-dev - cryptographic algorithm library for OCaml - development

Any thoughts on what I should try next?

archiecobbs commented 2 years ago

I could modify it myself

Thanks. I forgot that there was a Dockerfile in the source tree.

Once you/we get it updated and working I'll update it the one in the source tree.

Any thoughts on what I should try next?

libcrypto is part of OpenSSL.

I don't ever use Ubuntu so I don't know what their names are for the required packages. On openSUSE the required names are listed in the INSTALL file:

        fuse-devel
        libcurl-devel
        libexpat-devel
        libopenssl-devel
        libzstd-devel
        nbdkit-devel
        pkg-config
        zlib-devel

So you just need to identify the Ubuntu names for those same packages.

jreadey commented 2 years ago

Thanks - I was able to build from the distribution source once I figured which packages to grab.