Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

% perlbrew install -v perl-5.8.9 ... DB_File.xs:998:34: error: incompatible function pointer types assignin +g to 'u_int32_t (*)(const void *, size_t)' (aka 'unsigned int (*)(con +st void *, unsigned long)') from 'int (const void *, size_t)' (aka 'i +nt (const void *, unsigned long)') [-Wincompatible-function-pointer-t +ypes] info->db_HA_hash = hash_cb ; ^ ~~~~~~~ DB_File.xs:1041:36: error: incompatible function pointer types assigni +ng to 'size_t (*)(const DBT *, const DBT *)' (aka 'unsigned long (*)( +const DBT *, const DBT *)') from 'int (const DBT *, const DBT *)' [-W +incompatible-function-pointer-types] info->db_BT_prefix = btree_prefix ; ^ ~~~~~~~~~~~~ ... 308 warnings and 2 errors generated. make[1]: *** [DB_File.o] Error 1 make: *** [lib/auto/DB_File/DB_File.bundle] Error 2 perl-5.8.9 is successfully installed. % perlbrew list * perl-5.42.0 perl-5.38.2 % perlbrew install -v perl-5.24.4 ... # Failed test 25 - SHA for cpan/ExtUtils-MakeMaker/lib/ExtUtils/Liblis +t/Kid.pm matches stashed SHA at porting/customized.t line 105 # got "47d2fdf890d7913ccd0e32b5f98a98f75745d227" # expected "bfd2aa00ca4ed251f342e1d1ad704abbaf5a615e" porting/customized.t .............................................. Failed 1/181 subtests ... Test Summary Report ------------------- porting/customized.t (Wstat +: 0 Tests: 181 Failed: 1) Failed test: 25 porting/libperl.t (Wstat +: 7424 Tests: 0 Failed: 0) Non-zero exit status: 29 Parse errors: No plan found in TAP output Files=2410, Tests=850611, 515 wallclock secs (11.99 usr 2.72 sys + 13 +4.39 cusr 16.64 csys = 165.74 CPU) Result: FAIL make: *** [test_harness] Error 1 perl-5.24.4 is successfully installed. % perlbrew list * perl-5.42.0 perl-5.38.2
Summary of my perl5 (revision 5 version 42 subversion 0) configuration:
   
  Platform:
    osname=darwin
    osvers=23.3.0
    archname=darwin-2level
    gccversion='Apple LLVM 15.0.0 (clang-1500.3.9.4)'

    PERLBREW_PERL="perl-5.42.0"
    PERLBREW_SHELLRC_VERSION="1.02"
    PERLBREW_VERSION="1.02"

Replies are listed 'Best First'.
Re: Perlbrew fails to install perl but reports success
by choroba (Cardinal) on Apr 14, 2026 at 19:06 UTC
    You can report the issue to perlbrew's developer.

    map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
Re: Perlbrew fails to install perl but reports success
by ikegami (Patriarch) on Apr 14, 2026 at 19:11 UTC

    perlbrew always says it successfully installs. This isn't new.

Re: Perlbrew fails to install perl but reports success
by Anonymous Monk on May 08, 2026 at 02:53 UTC
    I tried installing the old Perls until I found one that works. I don't think perlbrew is the problem (other than reporting failure as success lol). Is macos (sonoma+) incompatible with older versions of Perl? I have not tried --force yet, is that advisable? The errors are a bit cryptic to me but I think these are the reasons:
    perl-5.6.2 failed C compiler
    perl-5.8.9 failed DB_File.o
    perl-5.10.1 failed groups.t, locale.t
    perl-5.12.5 failed locale.t
    perl-5.14.4 failed locale.t
    perl-5.16.3 success!
    

    perlbrew install -v perl-5.6.2
    Use which C compiler? cc  
     
    Checking for GNU cc in disguise and/or its version number...
    gccvers.c:10:2: error: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
            exit(0);
            ^
    gccvers.c:10:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit'
    1 error generated.
     
    *** WHOA THERE!!! ***
        Your C compiler "cc" doesn't seem to be working!
        You'd better start hunting for one and let me know about it.
    

    perlbrew install -v perl-5.8.9
    DB_File.c:3003:5: warning: '}' and ')' tokens terminating statement expression appear in different macro expansion contexts [-Wcompound-token-split-by-macro]
        XSRETURN_YES;
        ^~~~~~~~~~~~
    ../../XSUB.h:283:65: note: expanded from macro 'XSRETURN_YES'
    #define XSRETURN_YES   STMT_START { XST_mYES(0);   XSRETURN(1); } STMT_END
                                                                    ^
    DB_File.c:3003:5: note: ')' token is here
        XSRETURN_YES;
        ^~~~~~~~~~~~
    ../../XSUB.h:283:67: note: expanded from macro 'XSRETURN_YES'
    #define XSRETURN_YES   STMT_START { XST_mYES(0);   XSRETURN(1); } STMT_END
                                                                      ^~~~~~~~
    ../../perl.h:357:21: note: expanded from macro 'STMT_END'
    #   define STMT_END     )
                            ^
    308 warnings and 2 errors generated.
    make1: *** [DB_File.o] Error 1
    make: *** [lib/auto/DB_File/DB_File.bundle] Error 2
    

    perlbrew install -v perl-5.10.1
    Test Summary Report
    -------------------
    op/groups.t                                                    (Wstat: 0 Tests: 2 Failed: 1)
      Failed test:  1
    ../ext/POSIX/t/posix.t                                         (Wstat: 0 Tests: 66 Failed: 0)
      TODO passed:   11
    ../lib/locale.t                                                (Wstat: 0 Tests: 117 Failed: 1)
      Failed test:  99
    Files=1711, Tests=227048, 325 wallclock secs ( 4.52 usr  1.67 sys + 96.01 cusr 15.00 csys = 117.20 CPU)
    Result: FAIL
    Failed 2/1711 test programs. 2/227048 subtests failed.
    make2: *** [_test_tty] Error 255
    make1: *** [_test] Error 2
    make: *** [test_harness] Error 2
    

    perlbrew install -v perl-5.12.5
    Test Summary Report
    -------------------
    ../ext/POSIX/t/posix.t                                          (Wstat: 0 Tests: 66 Failed: 0)
      TODO passed:   11
    ../lib/locale.t                                                 (Wstat: 0 Tests: 117 Failed: 1)
      Failed test:  99
    Files=1806, Tests=349990, 351 wallclock secs ( 6.71 usr  2.00 sys + 113.55 cusr 17.93 csys = 140.19 CPU)
    Result: FAIL
    make: *** [test_harness] Error 1
    

    perlbrew install -v perl-5.14.4
    Test Summary Report
    -------------------
    ../ext/POSIX/t/posix.t                                          (Wstat: 0 Tests: 66 Failed: 0)
      TODO passed:   11
    ../lib/locale.t                                                 (Wstat: 0 Tests: 117 Failed: 1)
      Failed test:  99
    Files=2090, Tests=455882, 373 wallclock secs ( 8.16 usr  1.87 sys + 120.61 cusr 19.32 csys = 149.96 CPU)
    Result: FAIL
    make: *** [test_harness] Error 1
    

    perl-5.16.3 is successfully installed.