Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

coreos/config: add fix for perl cross-compilation#1238

Merged
jepio merged 1 commit intomainfrom
jepio/fix-cross-perl
Aug 31, 2021
Merged

coreos/config: add fix for perl cross-compilation#1238
jepio merged 1 commit intomainfrom
jepio/fix-cross-perl

Conversation

@jepio
Copy link
Copy Markdown
Contributor

@jepio jepio commented Aug 31, 2021

dev-lang/perl: fix cross-compiled perl segfault.

Current cross builds of perl segfault on simple operations such as perl -V.
This appears to be due to the cross-build not getting -fwrapv -fno-strict-aliasing
passed from the configure script. While we try to get this fixed upstream, we
can monkeypatch our old version of perl to fix this.

Upstream PR: gentoo/gentoo#22167
Related issue: flatcar/Flatcar#490

How to use

emerge-amd64-usr perl

Testing done

sudo mount --bind /dev /build/amd64-usr/dev
sudo chroot /build/amd64-usr/ perl -V

Output:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "C.UTF8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Summary of my perl5 (revision 5 version 26 subversion 2) configuration:

Previously this would result in a segfault.

Added a call to perl -V to the dev-container test and ran CI, test passed (previously fail):
http://jenkins.infra.kinvolk.io:8080/job/os/job/manifest/3441/cldsv/

Current cross builds of perl segfault on simple operations such as `perl -V`.
This appears to be due to the cross-build not getting `-fwrapv -fno-strict-aliasing`
passed from the configure script. While we try to get this fixed upstream, we
can monkeypatch our old version of perl to fix this.

Signed-off-by: Jeremi Piotrowski <jpiotrowski@microsoft.com>
@jepio jepio requested a review from a team August 31, 2021 09:05
@jepio jepio merged commit 5617843 into main Aug 31, 2021
@jepio jepio deleted the jepio/fix-cross-perl branch August 31, 2021 10:52
jepio added a commit that referenced this pull request Aug 31, 2021
coreos/config: add fix for perl cross-compilation
jepio added a commit that referenced this pull request Aug 31, 2021
coreos/config: add fix for perl cross-compilation
jepio added a commit that referenced this pull request Aug 31, 2021
coreos/config: add fix for perl cross-compilation
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants