G'day Intrepid,

I'm a long time user of Cygwin for both personal and $work tasks. I currently have (running on Win10):

ken@titan ~/tmp $ uname -a CYGWIN_NT-10.0-19045 titan 3.6.1-1.x86_64 2025-04-09 11:31 UTC x86_64 +Cygwin

I update Cygwin weekly which typically takes just a few minutes; updating infrequently can take hours -- obviously, I'd recommend the former. The last update that I did was less than 12 hours ago and there were multiple pages of perl-* packages (this still only took some minutes).

I never use the system perl (/usr/bin/perl) except for tests such as those that follow; I do use Perlbrew which I heartily recommend.

I don't know why you quoted -Mdiagnostics. It seems superfluous but maybe you had a reason. I've used quoted and unquoted versions in the examples below.

I can't reproduce your error. I rarely use the diagnostics pragma but don't recall ever having encountered problems with this.

Here's my normal and system perls:

ken@titan ~/tmp $ perl -v | head -2 | tail -1 This is perl 5, version 40, subversion 0 (v5.40.0) built for cygwin-th +read-multi $ which perl /home/ken/perl5/perlbrew/perls/perl-5.40.0/bin/perl $ /usr/bin/perl -v | head -2 | tail -1 This is perl 5, version 40, subversion 2 (v5.40.2) built for x86_64-cy +gwin-threads-multi

Here's @INC for both:

ken@titan ~/tmp $ perl -E 'say for @INC' /home/ken/perl5/perlbrew/perls/perl-5.40.0/lib/site_perl/5.40.0/cygwin +-thread-multi /home/ken/perl5/perlbrew/perls/perl-5.40.0/lib/site_perl/5.40.0 /home/ken/perl5/perlbrew/perls/perl-5.40.0/lib/5.40.0/cygwin-thread-mu +lti /home/ken/perl5/perlbrew/perls/perl-5.40.0/lib/5.40.0 $ /usr/bin/perl -E 'say for @INC' /usr/local/lib/perl5/site_perl/5.40/x86_64-cygwin-threads /usr/local/share/perl5/site_perl/5.40 /usr/lib/perl5/vendor_perl/5.40/x86_64-cygwin-threads /usr/share/perl5/vendor_perl/5.40 /usr/lib/perl5/5.40/x86_64-cygwin-threads /usr/share/perl5/5.40

Here's examples of your "Simplest test case":

ken@titan ~/tmp $ perl '-Mdiagnostics' -le 'print $diagnostics::VERSION' 1.40 $ perl -Mdiagnostics -le 'print $diagnostics::VERSION' 1.40 $ /usr/bin/perl '-Mdiagnostics' -le 'print $diagnostics::VERSION' 1.40 $ /usr/bin/perl -Mdiagnostics -le 'print $diagnostics::VERSION' 1.40

If you're installing modules on the system perl, you may have inadvertently broken something in the past.

I don't know enough about your system to offer advice beyond update Cygwin and use Perlbrew. Sorry if that's not particularly helpful for this specific problem. Good luck with your troubleshooting.

— Ken


In reply to Re: diagnostics pragma throwing a compile-time error in Cygwin-Perl by kcott
in thread diagnostics pragma throwing a compile-time error in Cygwin-Perl by Intrepid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.