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

app-crypt/mit-krb5 emake failed #571

Open
blucybrb14de opened this issue Sep 25, 2024 · 6 comments · May be fixed by #577
Open

app-crypt/mit-krb5 emake failed #571

blucybrb14de opened this issue Sep 25, 2024 · 6 comments · May be fixed by #577

Comments

@blucybrb14de
Copy link

Hello,

It would appear that app-crypt/mit-krb5, - a dependency for games-util/nexusmodsapp fails to compile aginst libressl.

dev-libs/libressl: LibreSSL 3.9.2

sys-apps/keyutils: sys-apps/keyutils-1.6.3-r1

mit-krb5-1.21.3.log

inxi-output.log

Error Message:

clang -fPIC -DSHARED -DHAVE_CONFIG_H  -I../../../include -I/var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src/include  -DKRB5_DEPRECATED=1 -DKRB5_PRIVATE  -O3 -pipe -march=alderlake -mno-cldemote -mno-kl -mno-sgx -mno-widekl -mshstk -fPIC -fplugin=LLVMPolly.so -mllvm -polly -mtune=alderlake -falign-functions=32  -Qunused-arguments -pthread  -c /var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c -o pkinit_crypto_openssl.so.o && mv -f pkinit_crypto_openssl.so.o pkinit_crypto_openssl.so
/var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c:240:32: error: use of undeclared identifier 'EVP_PKEY_DHX'
  240 |     if (!EVP_PKEY_assign(pkey, EVP_PKEY_DHX, *dh)) {
      |                                ^
/var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c:341:10: error: call to undeclared function 'd2i_DHxparams'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  341 |     dh = d2i_DHxparams(NULL, &p, params_der->length);
      |          ^
/var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c:341:10: note: did you mean 'd2i_DHparams'?
/usr/include/openssl/dh.h:177:6: note: 'd2i_DHparams' declared here
  177 | DH *    d2i_DHparams(DH **a,const unsigned char **pp, long length);
      |         ^
/var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c:341:8: error: incompatible integer to pointer conversion assigning to 'DH *' (aka 'struct dh_st *') from 'int' [-Wint-conversion]
  341 |     dh = d2i_DHxparams(NULL, &p, params_der->length);
      |        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c:559:28: error: use of undeclared identifier 'EVP_PKEY_DHX'
  559 |     EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_DERIVE,
      |                            ^
/var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c:560:23: error: use of undeclared identifier 'EVP_PKEY_CTRL_DH_PAD'
  560 |                       EVP_PKEY_CTRL_DH_PAD, 1, NULL);
      |                       ^
/var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src/plugins/preauth/pkinit/pkinit_crypto_openssl.c:5640:9: error: call to undeclared function 'EVP_CIPHER_asn1_to_param'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 5640 |         EVP_CIPHER_asn1_to_param(evp_ctx, enc_alg->parameter) <= 0)
      |         ^
6 errors generated.
make[1]: *** [Makefile:804: pkinit_crypto_openssl.so] Error 1
make[1]: Leaving directory '/var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src-abi_x86_64.amd64/plugins/preauth/pkinit'
make: *** [Makefile:1520: all-recurse] Error 1
 * ERROR: app-crypt/mit-krb5-1.21.3::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=app-crypt/mit-krb5-1.21.3::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-crypt/mit-krb5-1.21.3::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/app-crypt/mit-krb5-1.21.3/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-crypt/mit-krb5-1.21.3/temp/environment'.
 * Working directory: '/var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src-abi_x86_64.amd64'
 * S: '/var/tmp/portage/app-crypt/mit-krb5-1.21.3/work/krb5-1.21.3/src'

If anyone is able to find a solution against libressl, that would be greatly appreciated.

@orbea
Copy link
Contributor

orbea commented Oct 3, 2024

Just want to make it clear I am not ignoring this, but it doesn't seem trivial to fix...

@blucybrb14de
Copy link
Author

blucybrb14de commented Oct 10, 2024

New to programming here: but I believe when I googled libressl + whatever was undefined, this came up, but I'm not sure if this issue is related?

I am using dev-libs/xmlsec-1.3.5

lsh123/xmlsec#665

@orbea
Copy link
Contributor

orbea commented Oct 18, 2024

@blucybrb14de Can you try this patch?

mit-krb5-1.21.3-libressl.patch.txt

It builds, but I am unsure if it works. The tests fail on my end with a failure like this Gentoo issue and I am unsure if its related to libressl or not.

@blucybrb14de
Copy link
Author

Sorry, will get around to testing shortly, but can confirm that it builds successfully with the patch.

@blucybrb14de
Copy link
Author

blucybrb14de commented Oct 29, 2024

@blucybrb14de Can you try this patch?

mit-krb5-1.21.3-libressl.patch.txt

It builds, but I am unsure if it works. The tests fail on my end with a failure like this Gentoo issue and I am unsure if its related to libressl or not.

emerge --info.txt

Unclear. The program itself seems to behave, however when I do compile it with USE=test, I am unable to reproduce the error described.

However when compiling with tests enabled, I seem to fail with a different error.

I would like to test it as a dependency to see if games-util/nexusmodsapp still works as expected,

but it also fails with the dependency dev-dotnet/csharp-gentoodotnetinfo

>>> Source prepared.
>>> Configuring source in /var/tmp/portage/dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1/work/csharp-gentoodotnetinfo-1.1.1 ...
 * Running "dotnet-pkg-base_restore" for project: "GentooDotnetInfo.csproj" ...
 * /opt/dotnet-sdk-bin-8.0/dotnet restore --runtime linux-x64 --source /var/tmp/portage/dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1/temp/nugets -maxCpuCount:20 Source/v1/gentoo-dotnet-info-app/GentooDotnetInfo/GentooDotnetInfo.csproj
No usable version of libssl was found
/var/tmp/portage/dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1/temp/environment: line 838:    46 Aborted                 (core dumped) "$@"
 * ERROR: dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1::gentoo failed (configure phase):
 *   Failed to run command: /opt/dotnet-sdk-bin-8.0/dotnet restore --runtime linux-x64 --source /var/tmp/portage/dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1/temp/nugets -maxCpuCount:20 Source/v1/gentoo-dotnet-info-app/GentooDotnetInfo/GentooDotnetInfo.csproj
 *
 * Call stack:
 *     ebuild.sh, line  136:  Called src_configure
 *   environment, line 1059:  Called dotnet-pkg_src_configure
 *   environment, line  670:  Called dotnet-pkg_foreach-project 'dotnet-pkg-base_restore'
 *   environment, line  645:  Called dotnet-pkg-base_restore 'Source/v1/gentoo-dotnet-info-app/GentooDotnetInfo/GentooDotnetInfo.csproj'
 *   environment, line  577:  Called edotnet 'restore' '--runtime' 'linux-x64' '--source' '/var/tmp/portage/dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1/temp/nugets' '-maxCpuCount:20' 'Source/v1/gentoo-dotnet-info-app/GentooDotnetInfo/GentooDotnetInfo.csproj'
 *   environment, line  882:  Called edo '/opt/dotnet-sdk-bin-8.0/dotnet' 'restore' '--runtime' 'linux-x64' '--source' '/var/tmp/portage/dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1/temp/nugets' '-maxCpuCount:20' 'Source/v1/gentoo-dotnet-info-app/GentooDotnetInfo/GentooDotnetInfo.csproj'
 *   environment, line  840:  Called die
 * The specific snippet of code:
 *       "$@" || die -n "Failed to run command: $@"
 *
 * If you need support, post the output of `emerge --info '=dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1/work/csharp-gentoodotnetinfo-1.1.1'
 * S: '/var/tmp/portage/dev-dotnet/csharp-gentoodotnetinfo-1.1.1-r1/work/csharp-gentoodotnetinfo-1.1.1'

Thanks.

inxi-output.log

@orbea
Copy link
Contributor

orbea commented Oct 30, 2024

Try using dev-dotnet/dotnet-sdk instead of dev-dotnet/dotnet-sdk-bin.

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

Successfully merging a pull request may close this issue.

2 participants