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/1.1.1d: build from source fails on Linux #1147

Open
matthewtberry opened this issue Mar 19, 2020 · 6 comments
Open

[package] openssl/1.1.1d: build from source fails on Linux #1147

matthewtberry opened this issue Mar 19, 2020 · 6 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Need some help to be finish

Comments

@matthewtberry
Copy link

Package and Environment Details (include every applicable attribute)

  • Package Name/Version: openssl/1.1.1d
  • Operating System+version: Linux CentOS 7.7.1908
  • Compiler+version: GCC 7.3.1 (devtoolset-7)
  • Docker image: centos:7.7.1908
  • Conan version: conan 1.23.0
  • Python version: Python 3.6.3

Conan profile

[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7
compiler.libcxx=libstdc++
build_type=Release
[options]
[build_requires]
[env]

Steps to reproduce

  1. Create conanfile.txt:
[requires]
openssl/1.1.1d

[generators]
cmake
  1. Run conan install -r conan-center --build=openssl .
...
install ./include/openssl/x509.h -> /root/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a35b544db7a3c193cc8/include/openssl/x509.h
install ./include/openssl/x509_vfy.h -> /root/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a35b544db7a3c193cc8/include/openssl/x509_vfy.h
install ./include/openssl/x509err.h -> /root/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a35b544db7a3c193cc8/include/openssl/x509err.h
install ./include/openssl/x509v3.h -> /root/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a35b544db7a3c193cc8/include/openssl/x509v3.h
install ./include/openssl/x509v3err.h -> /root/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a35b544db7a3c193cc8/include/openssl/x509v3err.h
install libcrypto.a -> /root/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a35b544db7a3c193cc8/lib/libcrypto.a
install libssl.a -> /root/.conan/data/openssl/1.1.1d/_/_/package/b781af3f476d0aa5070a0a35b544db7a3c193cc8/lib/libssl.a
basename: missing operand
Try 'basename --help' for more information.
make: *** [Makefile:370: install_dev] Error 1
openssl/1.1.1d:
openssl/1.1.1d: ERROR: Package 'b781af3f476d0aa5070a0a35b544db7a3c193cc8' build failed
openssl/1.1.1d: WARN: Build folder /root/.conan/data/openssl/1.1.1d/_/_/build/b781af3f476d0aa5070a0a35b544db7a3c193cc8
ERROR: openssl/1.1.1d: Error in build() method, line 596
        self._make()
while calling '_make', line 565
        self._run_make(targets=["install_sw"], parallel=False)
while calling '_run_make', line 524
        self.run(" ".join(command), win_bash=self._win_bash)
        ConanException: Error 2 while executing /opt/rh/devtoolset-7/root/usr/bin/make install_sw -j1

This seems to be an issue with passing no-shared to OpenSSL build scripts. Issue was also reported there openssl/openssl#11367

@cleeland
Copy link

cleeland commented Mar 24, 2020

Based on the sleuthing I did in the openssl bug, the recipe is strictly correct. Until the bug in openssl gets fixed, the recipe could look to see if the perl module Text::Template is installed on the system and, if it is, error out with an explanatory error message.

Something like (in bash-ese)

perl -MText::Template -e print 2>/dev/null
if [ $? != 0 ]; then
  echo "OpenSSL {VERSION} known to have build errors with system-installed Text::Template package.  Stopping."
  exit 1;
fi

Somebody more fluent in the python can convert that to recipe-ese.

This is confirmed present in both 1.1.1d and 1.1.1e.

@danimtb danimtb added enhancement New feature or request and removed bug Something isn't working labels Mar 24, 2020
@SSE4
Copy link
Contributor

SSE4 commented Apr 21, 2020

@cleeland feel free to submit a simple PR to address this. could be something like:

if self.run("perl -MText::Template -e print 2>/dev/null") != 0:
    raise ConanException("OpenSSL %s known to have build errors with system-installed Text::Template package.  Stopping." % self.version)

@SSE4 SSE4 added good first issue Good for newcomers help wanted Need some help to be finish labels Apr 21, 2020
@madebr
Copy link
Contributor

madebr commented Sep 6, 2020

@matthewtberry
Does the problem still occur in the latest openssl version?

@matthewtberry
Copy link
Author

@madebr
Yes, I reproduced with the following differences from the original report:

  • Package Name/Version: openssl/1.1.1g
  • Conan version: conan 1.29.0
  • Python version: Python 3.6.8

@cleeland
Copy link

cleeland commented Sep 9, 2020

I completely missed the message from @SSE4 with suggested python code for a PR. I'll try to get to that this week.

@Mebus
Copy link

Mebus commented May 16, 2022

Is there some kind of workaround for this, when compiling in Msys2?

Mebus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Need some help to be finish
Projects
None yet
Development

No branches or pull requests

6 participants