MakeMaker writes Perl v-string VERSION bytes into generated Makefile
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 57/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- perl
- Domaine
- build-system
Piste de recherche
Start in src/main/perl/lib/ExtUtils/MakeMaker.pm and trace how WriteMakefile selects and passes VERSION into Makefile generation. Add a focused regression test for VERSION = v0.1.0 that checks generated version fields and recipes contain printable text without control bytes, then confirm the generated Makefile works with make. The issue notes that the full upstream suite cannot run under the available system Perl.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Summary
File-Util-SecureDir v0.1.0 fails during the PerlOnJava MakeMaker build, before its test suite starts. Its Makefile.PL passes a dotted version string literal as the MakeMaker VERSION:
WriteMakefile(
NAME => 'File::Util::SecureDir',
VERSION => v0.1.0,
...
);
PerlOnJava writes the literal's internal v-string bytes into the generated Makefile instead of its printable version representation. The resulting all recipe is malformed, and make exits with a shell unmatched-quote error.
Evidence
CPAN tester run 20261119-133823-51077, distribution LEMBARK/File-Util-SecureDir-v0.1.0.tar.gz:
Makefile.PLcompletes successfully.- The generated Makefile contains NUL/SOH/NUL bytes where the version should be (
VERSION = <NUL><SOH><NUL>). PerlOnJava's MakeMaker diagnostic likewise prints the version as control bytes. - The
allrecipe interpolates that raw value into a quotedechocommand. /usr/bin/makefails before tests with/bin/sh: ... unexpected EOF while looking for matching \".
A minimal WriteMakefile(NAME => 'Probe::Version', VERSION => v0.1.0) probe reproduces the difference: system Perl's ExtUtils::MakeMaker emits the printable VERSION = v0.1.0, while PerlOnJava's generated Makefile has an empty/truncated version field and a recipe containing the raw control bytes.
Root cause
In src/main/perl/lib/ExtUtils/MakeMaker.pm, WriteMakefile selects $version directly from $args{VERSION} (or VERSION_FROM) and passes it into Makefile generation. The value is interpolated into Makefile variables and recipes without converting a Perl v-string to printable version text. A v-string such as v0.1.0 is internally represented as the bytes 00 01 00; embedding those bytes in a shell command causes the shell to see a truncated quoted command.
Proposed fix
Normalize the selected version to printable version text before using it in diagnostics, metadata, DISTVNAME, Makefile variables, and recipes. Use the core version module's parsed version string representation (while preserving ordinary decimal versions). Add a focused regression test that calls WriteMakefile with VERSION => v0.1.0, then verifies the generated Makefile contains a printable version and no embedded NUL/control bytes in version-derived fields or recipes. The generated Makefile should also be usable by make.
Standard Perl comparison and scope
The installed system Perl is 5.34.1, but this distribution declares use v5.36, so its full upstream configure/build/test suite could not be run under the available system Perl. The minimal system-Perl MakeMaker probe did emit the expected printable version. The archived PerlOnJava failure occurs during make all, before any upstream tests execute.
This is a pure-Perl CPAN distribution; there is no XS/native dependency or reverse-dependency count to report. Existing issue #2068 concerns Module::Install::Share staging and does not cover this v-string serialization bug.
- Langage dominant
- Perl
- Étoiles
- 67
- Forks
- 8
- Merge moyen
- 5 h 12 min
- PR mergées (30 j)
- 131
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de fglock/PerlOnJava
-
area:cpan-port bug
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
fglock/PerlOnJava#2153 ·
Les mainteneurs répondent en général sous 1 jour
-
area:cpan-port area:parser bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
fglock/PerlOnJava#2137 ·
Les mainteneurs répondent en général sous 1 jour
-
area:backend area:cpan-port area:runtime bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
fglock/PerlOnJava#2071 ·
Les mainteneurs répondent en général sous 1 jour
-
area:runtime documentation enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
fglock/PerlOnJava#1579 ·
Les mainteneurs répondent en général sous 1 jour
-
area:cpan-port bug
Difficulté 3/5 1-2 jours Accessibilité débutants 62/100
fglock/PerlOnJava#2157 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de fglock/PerlOnJava
Issues similaires
-
Dev-output directory preparation accepts file-valued lib/include paths and fails on dangling linksOuverteteam-cli
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 93/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 73/100
inverse-inc/packetfence#9728 ·
Les mainteneurs répondent en général sous 1 jour
-
fix(char-create): show the real reason a character is refusedPeut-être pris @baphomello l’a pris il y a 1 jour. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour