libyal / libewf

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

openssl 3 undeclared identifier 'SHLIB_VERSION_NUMBER' #164

Closed Thomasmuur closed 2 years ago

Thomasmuur commented 2 years ago

Hi there,

I am trying to follow the guide, building from source (https://github.com/libyal/libewf/wiki/Building). Trying to build libewf-experimental-20201230 .

./configure --with-openssl=/opt/homebrew/opt/openssl@3 works fine, but when I try to use the make command it ends on the error:

ewftools_output.c:244:3: error: use of undeclared identifier 'SHLIB_VERSION_NUMBER' SHLIB_VERSION_NUMBER ); ^ 1 error generated. make[1]: *** [ewftools_output.o] Error 1 make: *** [all-recursive] Error 1

I can't fine anything about it online, someone who can help me?

Thanks in regards.

joachimmetz commented 2 years ago

As you can derive from here https://github.com/libyal/libewf/blob/57dfc1f510f08f34eb34452f6679c38185be9472/ewftools/ewftools_output.c#L243

SHLIB_VERSION_NUMBER contains the libcrypto version number. Is suspect configure/make not able to correctly find the OpenSSL source on your build configuration.

Thomasmuur commented 2 years ago

Thanks for your answer! That's weird though, as Im using the --with-openssl parameter..

Do you know what could be the cause that it's not working, the path exists.

joachimmetz commented 2 years ago

check you config.log, and build command line what the include and link paths are one other option is that maybe this has changed in your version of openssl/libcypto

joachimmetz commented 2 years ago

So it looks like SHLIB_VERSION_NUMBER is no longer supported by openssl 3.0.0

joachimmetz commented 2 years ago

openssl 1.1.1

# define SHLIB_VERSION_NUMBER "1.1"

openssl 3.0.0.

# define OPENSSL_VERSION_MAJOR  3
# define OPENSSL_VERSION_MINOR  0
# define OPENSSL_VERSION_PATCH  0
joachimmetz commented 2 years ago

At a first glance libhmac works with openssl3 but libcaes not yet https://github.com/libyal/libcaes/issues/17

joachimmetz commented 2 years ago

Added changes to support OpenSSL 3 version number

Thomasmuur commented 2 years ago

Thanks for checking this out. Will test tomorrow!

joachimmetz commented 2 years ago

Thanks for checking this out. Will test tomorrow!

Note that I'll not recommend using openssl 3 at this point, I've not tested with it and running into some yet unexplained behavior in contrast to the latest openssl 1.1.1

schopin-pro commented 2 years ago

@joachimmetz ACK on the warning. I'm working on Ubuntu, where we've started transitioning to OpenSSL 3, so I've cherry-picked the patch into the package that we synced from Debian (so, based on 20140812).

Could you perhaps describe the unexplained behaviors? I might be able to help :)

joachimmetz commented 2 years ago

@schopin-pro libyal/libcaes#17