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

[package] openssl/3.3.2 build fails because of perl #26398

Open
ErikTempelaarVO opened this issue Jan 16, 2025 · 5 comments
Open

[package] openssl/3.3.2 build fails because of perl #26398

ErikTempelaarVO opened this issue Jan 16, 2025 · 5 comments
Labels
bug Something isn't working

Comments

@ErikTempelaarVO
Copy link

ErikTempelaarVO commented Jan 16, 2025

Description

When trying to build the openssl package on a platform with perl 5.18, it fails with an error.

perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" crypto/params_idx.c.in > crypto/params_idx.c
"pairs" is not exported by the List::Util module
Can't continue after import errors at util/mkinstallvars.pl line 14.
BEGIN failed--compilation aborted at util/mkinstallvars.pl line 14.

The issue is described here:
openssl/openssl#24840
and there's a patch here:
openssl/openssl#25367

Saw some other openssl-related issues, maybe this could be patched in as well.

Package and Environment Details

  • Package Name/Version: openssl/3.3.2
  • Operating System+version: Slackware Linux 14.2
  • Compiler+version: GCC 9.5
  • Conan version: conan 2.11.0
  • Python version: Python 3.7.4

Conan profile

Host
[settings]
os=Linux
arch=x86
compiler=gcc
compiler.version=9
compiler.libcxx=libstdc++11
compiler.cppstd=gnu17
compiler.threads=posix

[conf]
tools.cmake.cmaketoolchain:user_toolchain += {{profile_dir}}/i686-custom-linux-gnu.cmake

Build
[settings]
os=Linux
arch=x86_64
compiler=gcc
compiler.version=5.5
compiler.libcxx=libstdc++11
build_type=Release
compiler.threads=posix

[conf]
tools.build:compiler_executables={"cpp": "/usr/bin/g++", "c": "/usr/bin/gcc"}

Steps to reproduce

conan install -r conancenter openssl/3.3.2@ -pr:b=pr_slackware_x64.txt -pr:b=pr_slackware_x86.txt

Logs

Click to expand log
lflags => add("-m32"),
        
        
        
        
    },
);

openssl/3.3.2: Generating aggregated env files
openssl/3.3.2: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
openssl/3.3.2: Calling build()
openssl/3.3.2: Activated option: no_zlib
openssl/3.3.2: RUN: perl ./Configure "conan-Release-Linux-x86-gcc-9" no-shared --release --prefix=/ --libdir=lib --openssldir="/etc/ssl" threads PERL=perl no-unit-test no-tests -fPIC enable-fips no-md2 no-zlib
Configuring OpenSSL version 3.3.2 for target conan-Release-Linux-x86-gcc-9
Using os-specific seed configuration
Created configdata.pm
Running configdata.pm
Created Makefile.in
Created Makefile
Created include/openssl/configuration.h

**********************************************************************
***                                                                ***
***   OpenSSL has been successfully configured                     ***
***                                                                ***
***   If you encounter a problem while building, please open an    ***
***   issue on GitHub <[https://github.com/openssl/openssl/issues>](https://github.com/openssl/openssl/issues%3E)  ***
***   and include the output from the following command:           ***
***                                                                ***
***       perl configdata.pm --dump                                ***
***                                                                ***
***   (If you are new to OpenSSL, you might want to consult the    ***
***   'Troubleshooting' section in the INSTALL.md file first)      ***
***                                                                ***
**********************************************************************

openssl/3.3.2: RUN: make -j2
perl util/mkinstallvars.pl PREFIX=. BINDIR=apps APPLINKDIR=ms LIBDIR= INCLUDEDIR=include "INCLUDEDIR=./include" ENGINESDIR=engines MODULESDIR=providers "VERSION=3.3.2" "LDLIBS=-ldl -pthread " > builddata.pm
perl "-I." "-Iutil/perl" "-Mconfigdata" "-MOpenSSL::paramnames" "util/dofile.pl" "-oMakefile" crypto/params_idx.c.in > crypto/params_idx.c
"pairs" is not exported by the List::Util module
Can't continue after import errors at util/mkinstallvars.pl line 14.
BEGIN failed--compilation aborted at util/mkinstallvars.pl line 14.
Makefile:3953: recipe for target 'builddata.pm' failed
make: *** [builddata.pm] Error 255
make: *** Waiting for unfinished jobs....

openssl/3.3.2: ERROR: 
Package 'fb36ab4a26317533fb8e98ecbc675003ed5bf348' build failed
openssl/3.3.2: WARN: Build folder /home/vsts_azpcontainer/.conan2/p/b/opensfe15ac270fc28/b/build-release
ERROR: openssl/3.3.2: Error in build() method, line 532
	self._make()
while calling '_make', line 525
	self._run_make()
while calling '_run_make', line 497
	self.run(" ".join(command), env="conanbuild")
	ConanException: Error 2 while executing
##[error]Bash exited with code '1'.
@ErikTempelaarVO ErikTempelaarVO added the bug Something isn't working label Jan 16, 2025
@jcar87
Copy link
Contributor

jcar87 commented Jan 16, 2025

Hi @ErikTempelaarVO - thanks for reporting this.

Perhaps this discussion is relevant: openssl/openssl#24840 (comment)

  • any chance your version of Perl is older than required?

@ErikTempelaarVO
Copy link
Author

ErikTempelaarVO commented Jan 16, 2025

@jcar87

Yes, this is an upstream problem in openssl.
According to this post from a openssl maintainer the minimum perl version for openssl is 5.10, I have 5.18, starting from 5.19.3 it's included by default (so it won't be a problem on newer perls)
openssl/openssl#25367 (comment)

This is probably not conan's problem to solve. But it would be nice if this was patched.

And if not, hopefully this will help other users that encounter this error.

@jcar87
Copy link
Contributor

jcar87 commented Jan 16, 2025

Hi @ErikTempelaarVO - thanks for looking into this.

We would consider a patch if the upstream maintainers have a solution already in place, even for newer versions - or if there is a widely known solution for this that has been vetted and validated. It's not only a question of maintainability of the recipe, but security as well - we aren't really in a good position to vet patches via the recipe to perl code.

I can see this as a proposed fix openssl/openssl#25367 - but confusingly Im not sure if it was merged or just closed and discarded

@ErikTempelaarVO
Copy link
Author

ErikTempelaarVO commented Jan 16, 2025

This comment states that it was merged for 3.3.3 and master:
openssl/openssl#25367 (comment)

(but github doesn't show unless you expand all comments in the thread, so it's a bit hard to find)

Here are the commits on master and 3.3.3-branch:
openssl/openssl@40c8ebe
openssl/openssl@210dc9a

So I guess this recipe-patch will be relevant for 3.3.2 only. Newer versions will have it included in upstream, i.e. 3.3.3 or 3.4.0, whenever they are released.

@jcar87
Copy link
Contributor

jcar87 commented Jan 21, 2025

Hi @ErikTempelaarVO - thanks for providing those links!

I see - we currently have 3.4.0 on hold since publishing it would require to re-generate a lot of downstream binary packages - so we want to get the timing right. But feel free to open a PR to add that patch to the 3.3.3 version if necessary!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants