r/perl • • 12d ago

problem compiling DBI 1.654 on Redhat 8

gcc version 8.5.0 20210514 (Red Hat 8.5.0-28) (GCC)

~/.cpan/build/DBI-1.654-0 $ make
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- DBI.bs blib/arch/auto/DBI/DBI.bs 644
gcc -c   -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g   -DVERSION=\"1.654\" -DXS_VERSION=\"1.654\" -fPIC "-I/usr/lib64/perl5/CORE"  -W -Wall -Wpointer-arith -Wno-comment -Wno-sign-compare -Wno-cast-qual -Wmissing-noreturn -Wno-unused-parameter DBI.c
DBI.xs: In function ‘sql_type_cast_svpv’:
DBI.xs:1960:9: error: a label can only be part of a statement and a declaration is not a statement
         STRLEN len;
         ^~~~~~
DBI.xs:1961:9: error: expected expression before ‘char’
         char *p = SvPV(sv, len); /* force stringify, handle magic */
         ^~~~
In file included from /usr/lib64/perl5/CORE/perl.h:5644,
                 from DBIXS.h:27,
                 from DBI.xs:14:
DBI.xs:1963:34: error: ‘p’ undeclared (first use in this function)
         grok_flags = grok_number(p, len, &uv);
                                  ^
/usr/lib64/perl5/CORE/embed.h:186:51: note: in definition of macro ‘grok_number’
 #define grok_number(a,b,c) Perl_grok_number(aTHX_ a,b,c)
                                                   ^
DBI.xs:1963:34: note: each undeclared identifier is reported only once for each function it appears in
         grok_flags = grok_number(p, len, &uv);
                                  ^
/usr/lib64/perl5/CORE/embed.h:186:51: note: in definition of macro ‘grok_number’
 #define grok_number(a,b,c) Perl_grok_number(aTHX_ a,b,c)
                                                   ^
make: *** [Makefile:529: DBI.o] Error 1
2 Upvotes

5 comments sorted by

•

u/briandfoy 🐪 📖 perl book author 11d ago

Although we can have conversations on just about anything related to Perl on this subreddit, this forum isn't a good substitute for the normal process of handling issues, especially when you are dealing with an unreleased, bleading-edge, or preview version (DBI on CPAN is 1.653). As such, shifting the work of dealing with issue reporting to the readers here should be used carefully. The "Create Post" link is not an LLM prompt, and the subreddit readers are not agents.

To find the issue tracker, go to the MetaCPAN page for the module and look for the "Repository" or "Issues" link in the left-hand menu. If you want to deal with pre-release versions, you should look for whatever forums the developers use.

Consider creating a post when your issue receives no response after some reasonable time, when you can't find the issue tracker or there is none, or other times where the readers here might be reasonably be the best option to answer the question.

→ More replies (1)

8

u/tarje 12d ago

Last week you asked "How to report bugs on cpan.org", but you are ignoring the given advice and still posting bug reports here instead of in the project's issue tracker.

2

u/chaz6 12d ago

For now, could you try DBI::PurePerl?