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

configure --with-zlib without path not working #199

Closed eli-schwartz closed 6 months ago

eli-schwartz commented 6 months ago
$ git clone https://github.com/libyal/libewf/
$ cd libewf
$ ./synclibs.sh
$ ./autogen.sh
$ ./configure --with-zlib

[...]
checking whether to use search for zlib in includedir and libdir or in the specified DIR, or no if not to use zlib... (cached) yes
configure: error: in `/tmp/libewf':
configure: error: no such directory: yes
See `config.log' for more details

Per the help text:

  --with-zlib[=DIR]       search for zlib in includedir and libdir or in the
                          specified DIR, or no if not to use zlib
                          [default=auto-detect]

Indicating that not including a value is a valid move, typically, to require it to be found.

Incidentally: it does work as expected in the 2017 release, which is packaged at https://packages.gentoo.org/packages/app-forensics/libewf. I suppose it would be nice to update, except that it doesn't seem possible to bump the version and compile it as is.

Note that it's important to be able to pass these options due to https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Automagic_dependencies#What_are_automagic_dependencies.3F

joachimmetz commented 6 months ago

Note that it's important to be able to pass these options due to

This seems to be a minor issue just Gentoo decided they have to do things in this way.

I'll have a closer look when time permits.

One question though why is Gentoo distributing experimental code?

eli-schwartz commented 6 months ago

One question though why is Gentoo distributing experimental code?

According to https://repology.org/project/libewf/versions

Versions >2014 are distributed by Alpine, Debian Experimental, FreeBSD, Macports, OpenSUSE Tumbleweed, Void Linux, and some less popular distros as well.

I am not certain why. I am not the package's distro maintainer, I was originally working through a list of bugs with packages failing to build with LTO, in this case: https://bugs.gentoo.org/854546 -- and trying to see if I could install a newer version to check if it still had the issue.

joachimmetz commented 6 months ago

According to https://repology.org/project/libewf/versions

Why is that an authoritative source?

https://github.com/libyal/libewf-legacy is the stable release this project is an experimental pre-release

The culprit appears to be (cached) yes instead of auto-detect, it appears AC_ARG_WITH sets $withval to "yes" if no value is provided instead of leaving it empty. I'll add a work-around to set it to auto-detect if set to yes by AC_ARG_WITH

joachimmetz commented 6 months ago

--with-zlib => $withval = "yes" --with-zlib= => $withval = ""

joachimmetz commented 6 months ago

Made some changes in https://github.com/libyal/libewf/commit/f5aa2e233805fd77f65ec97b0fb83beebc521fa4 let me know if that does the trick for you.