Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 697840 - dev-libs/openssl-1.1.1d-r2 - This system (linux-alpha+bwx-gcc) is not supported. See file INSTALL for details.
Summary: dev-libs/openssl-1.1.1d-r2 - This system (linux-alpha+bwx-gcc) is not support...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Alpha Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://github.com/openssl/openssl/pu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-16 08:35 UTC by Yoshihiko Iwama
Modified: 2020-02-26 04:55 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_--info.log.txt,5.54 KB, text/plain)
2019-10-16 08:38 UTC, Yoshihiko Iwama
Details
build.log (build.log,2.08 KB, text/plain)
2019-10-16 08:40 UTC, Yoshihiko Iwama
Details
perl Configure LIST (Configure_LIST.txt,292 bytes, text/plain)
2019-10-16 08:43 UTC, Yoshihiko Iwama
Details
emerge --info(PC164LX) (emerge_--info.txt,5.54 KB, text/plain)
2019-10-19 03:44 UTC, Yoshihiko Iwama
Details
build.log(PC164LX) (build.log,2.08 KB, text/plain)
2019-10-19 03:44 UTC, Yoshihiko Iwama
Details
emerge --info(PC164SX) (emerge_--info.txt,5.23 KB, text/plain)
2019-10-20 04:53 UTC, Yoshihiko Iwama
Details
build.log(PC164SX) (build.log,2.08 KB, text/plain)
2019-10-20 04:54 UTC, Yoshihiko Iwama
Details
openssl-1.1.1d-alpha.patch (openssl-1.1.1d-alpha.patch,558 bytes, patch)
2019-10-24 06:44 UTC, Yoshihiko Iwama
Details | Diff
gentoo.config-1.0.2-alpha.patch (gentoo.config-1.0.2-alpha.patch,542 bytes, patch)
2019-10-24 06:45 UTC, Yoshihiko Iwama
Details | Diff
patch (0001-restore-linux-alpha-gcc-bwx-configuration.patch,1.00 KB, patch)
2020-02-19 05:22 UTC, Matt Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yoshihiko Iwama 2019-10-16 08:35:25 UTC
On UP1100, emerge fails in below error:
Operating system: alpha-whatever-linux2
This system (linux-alpha+bwx-gcc) is not supported. See file INSTALL for details.


Reproducible: Always

Steps to Reproduce:
1.On BWX platform
2.emerge --ask dev-libs/openssl
Actual Results:  
>>> Emerging (1 of 24) dev-libs/openssl-1.1.1d-r2::gentoo
 * Fetching files in the background.
 * To view fetch progress, run in another terminal:
 * tail -f /var/log/emerge-fetch.log
 * openssl-1.1.1d.tar.gz BLAKE2B SHA512 size ;-) ...                     [ ok ]
>>> Unpacking source...
>>> Unpacking openssl-1.1.1d.tar.gz to /var/tmp/portage/dev-libs/openssl-1.1.1d-r2/work
>>> Source unpacked in /var/tmp/portage/dev-libs/openssl-1.1.1d-r2/work
>>> Preparing source in /var/tmp/portage/dev-libs/openssl-1.1.1d-r2/work/openssl-1.1.1d ...
 * Applying openssl-1.1.0j-parallel_install_fix.patch ...                [ ok ]
 * Applying openssl-1.1.1d-fix-zlib.patch ...                            [ ok ]
 * Applying openssl-1.1.1d-fix-potential-memleaks-w-BN_to_ASN1_INTEGER.p [ ok ].
Operating system: alpha-whatever-linux2
This system (linux-alpha+bwx-gcc) is not supported. See file INSTALL for details.
 * ERROR: dev-libs/openssl-1.1.1d-r2::gentoo failed (prepare phase):
 *   I AM NOT SANE
 *
 * Call stack:
 *     ebuild.sh, line 125:  Called src_prepare
 *   environment, line 2073:  Called die
 * The specific snippet of code:
 *       ./config --test-sanity || die "I AM NOT SANE";


Expected Results:  
Use system "linux-alpha-gcc" instead of "linux-alpha+bwx-gcc"

OpenSSL-1.1.1d does not support system "linux-alpha+bwx-gcc". However command "config" generates "linux-alpha+bwx-gcc" on BWX platforms. BWX platforms is recognized by string "*[678]" in "cpu model" of /proc/cpuinfo. For example, my UP1100's cpu model is "EV67".
Valid "system"s should include by results of command "perl Configure LIST", but "linux-alpha+bwx-gcc" is no longer included. All (valid) "system"s listed in Configurations/10-main.conf.
Comment 1 Yoshihiko Iwama 2019-10-16 08:38:06 UTC
Created attachment 592852 [details]
emerge --info
Comment 2 Yoshihiko Iwama 2019-10-16 08:40:07 UTC
Created attachment 592854 [details]
build.log
Comment 3 Yoshihiko Iwama 2019-10-16 08:43:22 UTC
Created attachment 592856 [details]
perl Configure LIST
Comment 4 Yoshihiko Iwama 2019-10-19 03:42:51 UTC
The same result was obtained on PC164LX. my PC164LX's "cpu model" is "EV56", so ti's a BWX platform.
Comment 5 Yoshihiko Iwama 2019-10-19 03:44:07 UTC
Created attachment 593270 [details]
emerge --info(PC164LX)
Comment 6 Yoshihiko Iwama 2019-10-19 03:44:35 UTC
Created attachment 593272 [details]
build.log(PC164LX)
Comment 7 Matt Turner gentoo-dev 2019-10-19 19:38:13 UTC
An Alpha user!

I'll check on my UP1500 and see what's going on.
Comment 8 Yoshihiko Iwama 2019-10-20 04:52:35 UTC
Thank you for your cooperation.
I think it is important whether "cpu model" of /proc/cpuinfo matches "*[678]" or not for this to happen.

Also, I got the same result on PC164SX. My PC164SX's "cpu model" is "PCA56", so it's a BWX platform.
Comment 9 Yoshihiko Iwama 2019-10-20 04:53:26 UTC
Created attachment 593342 [details]
emerge --info(PC164SX)
Comment 10 Yoshihiko Iwama 2019-10-20 04:54:02 UTC
Created attachment 593344 [details]
build.log(PC164SX)
Comment 11 Yoshihiko Iwama 2019-10-24 06:43:37 UTC
I think that "system" named "linux-alpha+bwx-gcc" has been abolished in OpenSSL-1.1.1d, so both OpenSSL-1.1.1d's "config" script and "gentoo.config-1.0.2" script provided by Gentoo should be changed so that "linux-alpha+bwx-gcc" is not generated.

This issue occurs in "./config --test-sanity" that is executed at the end of emerge's "preparing source" phase. I don't know why this is necessary in this phase, but "./Configure" in the "configuring source" phase is the real configuration for  construction. The "system" given as an argument of "./Configure" is the "system" determined by gentoo.config-1.0.2 provided by Gentoo, and is determined by CHOST. If CHOST is "alpha-unknown-linux-gnu" as it is in Gentoo distribution's make.conf, "system" will be "alpha-linux-gcc" and there is no problem, but If CHOST is changed to "alphaev56-unknown-linux" or "alphaev6-unknown-linux-gnu", etc., "system" becomes "alpha-linux+bwx-gcc", which seems to cause problems in the "configuring source" phase.
I applied the attached "openssl-1.1.1d-alpha.patch" (ie put it in /etc/portage/patches/dev-libs/openssl-1.1.1d-r2/) and when I emerged on my UP1100 , it was able to install without problems.
I also created "gentoo.config-1.0.2-alpha.patch" as a proposed change to gentoo.config-1.0.2. This has not been tried by emerge.

Or should we restore the "system" named "linux-alpha+bwx-gcc"? Using this "system" will improve performance, but I don't think RC4_CHAR(RC4_INT) has a wide impact. (And is there any reason to focus on RC4 in the future?) The difference between system "linux-alpha-gcc" and "linux-alpha+bwx-gcc" in "Configure" of OpenSSL-1.0.2t is that "RC4_CHAR" is added to the latter. 
In "Configurations/10-main.conf" of OpenSSL-1.1.1d, "RC4_CHAR" is disabled in  "bn_ops" of system "linux-alpha-gcc", however "RC4_CHAR" is enabled in the inheritance source system "linux-generic64", so I think it is equivalent to system "linux-alpha-gcc" of OpenSSL-1.0.2t.

OpenSSL-1.1.1d's "CHANGES" doesn't mention "linux-alpha+bwx-gcc" abolished, so I don't know why upstream has abolished "linux-alpha+bwx-gcc".
Comment 12 Yoshihiko Iwama 2019-10-24 06:44:40 UTC
Created attachment 593748 [details, diff]
openssl-1.1.1d-alpha.patch
Comment 13 Yoshihiko Iwama 2019-10-24 06:45:20 UTC
Created attachment 593750 [details, diff]
gentoo.config-1.0.2-alpha.patch
Comment 14 Jason Howe 2019-10-25 03:30:41 UTC
Not surprisingly, seeing the same issue on my EV6 based DS20.
Comment 15 Yoshihiko Iwama 2019-10-25 04:15:38 UTC
Thank you for your cooperation.

As a note, even if the architecture is EV6 or later, the following "cpu model"s are not recognized as BWX platform by "config" script, these do not match "*[678]".:

"EV68AL"(21264B)
"EV68CB"(21264C)
"EV68CX"(21264D)
"EV79"(21364A)
"EV69"(what's this?)

(from "cpu_names" array in arch/alpha/kernel/setup.c of kernel source)
Comment 16 Matt Turner gentoo-dev 2019-11-11 00:32:34 UTC
(In reply to Yoshihiko Iwama from comment #11)
> I think that "system" named "linux-alpha+bwx-gcc" has been abolished in
> OpenSSL-1.1.1d, so both OpenSSL-1.1.1d's "config" script and
> "gentoo.config-1.0.2" script provided by Gentoo should be changed so that
> "linux-alpha+bwx-gcc" is not generated.
> 
> This issue occurs in "./config --test-sanity" that is executed at the end of
> emerge's "preparing source" phase. I don't know why this is necessary in
> this phase, but "./Configure" in the "configuring source" phase is the real
> configuration for  construction. The "system" given as an argument of
> "./Configure" is the "system" determined by gentoo.config-1.0.2 provided by
> Gentoo, and is determined by CHOST. If CHOST is "alpha-unknown-linux-gnu" as
> it is in Gentoo distribution's make.conf, "system" will be "alpha-linux-gcc"
> and there is no problem, but If CHOST is changed to
> "alphaev56-unknown-linux" or "alphaev6-unknown-linux-gnu", etc., "system"
> becomes "alpha-linux+bwx-gcc", which seems to cause problems in the
> "configuring source" phase.
> I applied the attached "openssl-1.1.1d-alpha.patch" (ie put it in
> /etc/portage/patches/dev-libs/openssl-1.1.1d-r2/) and when I emerged on my
> UP1100 , it was able to install without problems.
> I also created "gentoo.config-1.0.2-alpha.patch" as a proposed change to
> gentoo.config-1.0.2. This has not been tried by emerge.
> 
> Or should we restore the "system" named "linux-alpha+bwx-gcc"? Using this
> "system" will improve performance, but I don't think RC4_CHAR(RC4_INT) has a
> wide impact. (And is there any reason to focus on RC4 in the future?) The
> difference between system "linux-alpha-gcc" and "linux-alpha+bwx-gcc" in
> "Configure" of OpenSSL-1.0.2t is that "RC4_CHAR" is added to the latter. 
> In "Configurations/10-main.conf" of OpenSSL-1.1.1d, "RC4_CHAR" is disabled
> in  "bn_ops" of system "linux-alpha-gcc", however "RC4_CHAR" is enabled in
> the inheritance source system "linux-generic64", so I think it is equivalent
> to system "linux-alpha-gcc" of OpenSSL-1.0.2t.
> 
> OpenSSL-1.1.1d's "CHANGES" doesn't mention "linux-alpha+bwx-gcc" abolished,
> so I don't know why upstream has abolished "linux-alpha+bwx-gcc".

Thank you for the analysis. I think you are correct that linux-alpha+bwx-gcc has been abolished upstream. It looks like it was removed in

commit 7ead0c89185c46378e3ed85c0012d083f4b3039b
Author: Andy Polyakov <appro@openssl.org>
Date:   Mon Mar 16 22:33:36 2015 +0100

    Configure: fold related configurations more aggressively and clean-up.
    
    Reviewed-by: Richard Levitte <levitte@openssl.org>

and like you said that configuration defined only the RC4_CHAR in addition to linux-alpha-gcc.

Perhaps we should readd linux-alpha+bwx-gcc upstream (it's unclear whether it was removed intentionally, since the string "linux-alpha+bwx" still appears in the 'config' file).

I'll try to confirm what you said -- that RC4_CHAR is implied by linux-generic64.
Comment 17 Jason Howe 2019-11-11 00:58:02 UTC
Confirming that the patch from comment #12 allows me to successfully build.
Comment 18 Yoshihiko Iwama 2019-11-12 00:39:34 UTC
Thank you for your cooperation.

Thank you for investigating upstream modifications. I also confirmed that "linux-alpha-gcc" was removed there.

The patch in comment #12 for the 'config' script simply enforces "linux-alpha-gcc", so if you re-add "linux-alpha+bwx-gcc", another patch Is required. Because BWX is implemented in all processor models after EV56. If the current condition is "* [678]", as written in comment #15, five models are not enough.

Also, for strictness, I think that the settings of "__CNF_CFLAGS" and "__CNF_CXXFLAGS" should be changed. This definition has no meaning when using emerge.
Comment 19 Matt Turner gentoo-dev 2020-02-19 05:22:12 UTC
Created attachment 614474 [details, diff]
patch

Sorry for the delay.

This is what I plan to commit, and to send upstream.
Comment 20 Larry the Git Cow gentoo-dev 2020-02-25 22:41:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3dec9bf2da04ace6b2e999ff779d117beb65e6e

commit e3dec9bf2da04ace6b2e999ff779d117beb65e6e
Author:     Matt Turner <mattst88@gentoo.org>
AuthorDate: 2020-02-25 22:37:15 +0000
Commit:     Matt Turner <mattst88@gentoo.org>
CommitDate: 2020-02-25 22:40:42 +0000

    dev-libs/openssl: Fix the build on alpha
    
    Closes: https://bugs.gentoo.org/697840
    Signed-off-by: Matt Turner <mattst88@gentoo.org>

 ...sl-1.1.1d-config-Drop-linux-alpha-gcc-bwx.patch | 42 ++++++++++++++++++++++
 dev-libs/openssl/openssl-1.1.1d-r3.ebuild          |  1 +
 2 files changed, 43 insertions(+)
Comment 21 Yoshihiko Iwama 2020-02-26 04:55:59 UTC
Thank you very much.

I understand that, as a result of benchmarking on EV7, the use of RC4_CHAR is not superior in performance, so linux-alpha+bwx-gcc was not restored and the Configure script was changed.
I have confirmed that modified emerge can be successfully run on my UP1100, that's  cpu model is 'EV67'.

I look forward to long-term support for Linux/Alpha in the upstream as a result of this our action.