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

extensions and known_extensions should be written without the prefix into config.sh #85

Open
kanavin opened this issue Jan 9, 2020 · 3 comments

Comments

@kanavin
Copy link
Contributor

kanavin commented Jan 9, 2020

When building a 'classic' perl, the values look like this:
extensions='attributes B Compress/Raw/Bzip2 Compress/Raw/Zlib Cwd Data/Dumper Devel/Peek Devel/PPPort Digest/MD5 Digest/SHA Encode Fcntl File/DosGlob File/Glob Filter/Util/Call Hash/Util Hash/Util/FieldHas...
known_extensions='Amiga/ARexx Amiga/Exec Archive/Tar Attribute/Handlers attributes autodie AutoLoader autouse B base bignum Carp Compress/Raw/Bzip2 Compress/Raw/Zlib Config/Perl/V constant CPAN CPAN/Meta CPAN/Meta/Requirements

When building using perl-cross, the values look like this:
known_extensions='ext/Amiga-ARexx ext/Amiga-Exec ext/attributes ext/B ext/Devel-Peek ext/Errno ext/ExtUtils-Miniperl ext/Fcntl ext/FileCache ext/File-DosGlob ext/File-Find ext/File-Glob ext/GDBM_File ext/Hash-Util ext/Hash-Util-FieldHash ext/I18N-Langinfo ext/IPC-Open3 ext/mro ext/NDBM_File ext/ODBM_File ext/Opcode ext/PerlIO-encoding ext/PerlIO-mmap ext/PerlIO-scalar ext/PerlIO-via ext/Pod-Functions ext/

extensions='ext/attributes ext/B ext/Devel-Peek ext/Fcntl ext/File-DosGlob ext/File-Glob ext/GDBM_File ext/Hash-Util ext/Hash-Util-FieldHash ext/I18N-Langinfo ext/mro ext/NDBM_File ext/Opcode ext/PerlIO-encoding ext/PerlIO-mmap ext/PerlIO-scalar ext/PerlIO-via ext/POSIX ext/re ext/SDBM_File ext/Sys-Hostname ext/Tie-Hash-NamedCapture ext/XS-APItest ext/XS-Typemap cpan/Compress-Raw-Bzip2 cpan/Compress-Raw-Zlib cpan/DB_File cpan/Digest-MD5 cpan/Digest-SHA cpan/Encode cpan/Filter-Util-Call cpan/IPC-SysV cpan/Math-BigInt-FastCalc cpan/MIME-Base64 cpan/Scalar-List-Utils cpan/Socket cpan/Sys-Syslog cpan/Time-Pie

This difference matters because perl's test suite assumes the former variant, and if it is given the latter, it fails to exclude the modules that weren't built from testing, with resulting test failures.

I am not sure what is the best way to fix this, so submitting an issue, rather than a patch :)

@arsv
Copy link
Owner

arsv commented Jan 9, 2020

What exactly fails in the test suite?

Tests never use config.sh directly for that purpose, they load Config_heavy.pl via Config.pm, which is generated from config.sh. The script that generates Config_heavy.pl gets patched to strip directory prefixes, so that 'extensions' entry in Config_heavy.pl looks exactly like the tests expect it to.

https://github.com/arsv/perl-cross/blob/master/cnf/configure_mods.sh#L150
https://github.com/arsv/perl-cross/blob/master/cnf/diffs/perl5-5.28.0/configpm.patch

If there are reasons to do so, I think both extensions and known_extensions can be changed to non-prefixed forms in config.sh, as long as nonxs_ext, dynamic_ext and static_ext remain prefixed. But having something that isn't a part of perl-cross reading config.sh and expecting perl-compatible content there is a problem in itself, config.sh generated by perl-cross is not meant to be compatible with vanilla perl.

@kanavin
Copy link
Contributor Author

kanavin commented Jan 9, 2020

Here:
https://github.com/Perl/perl5/blob/blead/t/TEST#L479

The values of extensions and known_extensions are loaded from config.sh, then given to _tests_from_manifest() which expects them to be in the non-prefixed format.

@arsv
Copy link
Owner

arsv commented Jan 10, 2020

Preliminary patch: https://github.com/arsv/perl-cross/tree/extensions

Works for me so far, but I'll try running it a bit more with less common options.
This issue is mostly limited to tests but the fix can break more than just the tests.

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

No branches or pull requests

2 participants