libyal / libewf

Libewf is a library to access the Expert Witness Compression Format (EWF)
GNU Lesser General Public License v3.0
263 stars 76 forks source link

unable to build with autoreconf on 20.04 LTS #172

Closed rixvet closed 1 year ago

rixvet commented 1 year ago

Starting from fefd88472048e2d3ae562b40a677ab06ff794a0f the requirements for autoconf and gettext has been bumped exceeding the default versions installed at Ubuntu 20.04 LTS. Since this a commonly used default install at many sites (WSL2 for example) it might be interesting to keep supporting it for a while.

Lowering the versions by hand causes it to compile fine, how-ever I do not know if Ubuntu 20.04 LTS is still on the supported operation system releases?

diff --git a/configure.ac b/configure.ac
index 4f2e07c6..ddc3bed3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_PREREQ([2.71])
+AC_PREREQ([2.69])

 AC_INIT(
  [libewf],
@@ -33,7 +33,7 @@ AC_PATH_PROG(PKGCONFIG,[pkg-config])

 dnl Support of internationalization (i18n)
 AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.21])
+AM_GNU_GETTEXT_VERSION([0.19])

 dnl Check for compiler language support
 AC_C_CONST
joachimmetz commented 1 year ago

This is only an issue if you don't build from a source distribution package. Also see: https://github.com/libyal/libewf/wiki/Building#source-distribution-package and https://github.com/libyal/libewf/wiki/Building#read-first

Which should not be an issue unless you're actively developing libewf?

joachimmetz commented 1 year ago

Seeing the thumbs up I assume your question is answered and I'll close the issue as won't fix

jlepere-everlaw commented 4 months ago

@joachimmetz, I'm running into this issue when trying to build a deb package from libewf-experimental-20230212 (specifically, libewf-experimental-20230212.tar.gz) on Ubuntu 20.04. If I'm understanding your comment above, you're saying this should work? Thanks in advance!

joachimmetz commented 4 months ago

Have a read of https://github.com/libyal/libewf/wiki/Building

jlepere-everlaw commented 4 months ago

Have a read of https://github.com/libyal/libewf/wiki/Building

Thanks. I've read that, but I must be missing something. Here's what I've been doing:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:    20.04
Codename:   focal
$ sudo apt install autotools-dev build-essential debhelper dh-autoreconf dh-python fakeroot pkg-config flex bison zlib1g-dev libssl-dev libfuse-dev python3-dev python3-setuptools
...
$ wget https://github.com/libyal/libewf/releases/download/20230212/libewf-experimental-20230212.tar.gz .
...
$ tar -xzf libewf-experimental-20230212.tar.gz
$ cd libewf-20230212/
$ cp -rf dpkg debian
$ dpkg-buildpackage -rfakeroot -b
dpkg-buildpackage: info: source package libewf
dpkg-buildpackage: info: source version 20230212-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Joachim Metz <joachim.metz@gmail.com>
dpkg-buildpackage: info: host architecture amd64
dpkg-buildpackage: warning: debian/rules is not executable; fixing that
 dpkg-source --before-build .
 fakeroot debian/rules clean
dh clean --buildsystem=autoconf --with=autoreconf,python3
   dh_auto_clean -O--buildsystem=autoconf
   dh_autoreconf_clean -O--buildsystem=autoconf
   dh_clean -O--buildsystem=autoconf
 debian/rules build
dh build --buildsystem=autoconf --with=autoreconf,python3
   dh_update_autotools_config -O--buildsystem=autoconf
   dh_autoreconf -O--buildsystem=autoconf
autopoint: *** The AM_GNU_GETTEXT_VERSION declaration in your configure.ac
               file requires the infrastructure from gettext-0.21 but this version
               is older. Please upgrade to gettext-0.21 or newer.
autopoint: *** Stop.
autoreconf: autopoint failed with exit status: 1
dh_autoreconf: error: autoreconf -f -i returned exit code 1
make: *** [debian/rules:10: build] Error 255
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Do you see what I'm missing?

joachimmetz commented 4 months ago

The dpkg config is using autoconf not configure. If you want to use autoconf either update the version on your build system or change the dpkg config to use configure instead.

jlepere-everlaw commented 4 months ago

The dpkg config is using autoconf not configure. If you want to use autoconf either update the version on your build system or change the dpkg config to use configure instead.

Thanks for that tip. I'm understanding this more, but I'm still unsure how to "change the dpkg config to use configure instead". Do you mind elaborating on how that would be done? Thanks in advance.

joachimmetz commented 4 months ago

Given that 20.04 has been superseded by 22.04 and 24.04 is nearing release. I strongly encourage to just use a newer version of Ubuntu.

However if you really have to use this specific version I recommend either looking at an older dpkg configuration used by this project or the dpkg configuration documentation e.g. https://man7.org/linux/man-pages/man7/debhelper.7.html

jlepere-everlaw commented 4 months ago

Sounds good. Thanks for your help, @joachimmetz. Much appreciated.

joachimmetz commented 4 months ago

Note that dpkg configuration and tooling have evolved over time as well, so you'll might have to go back in history here.