perl5-dbi / DBD-Oracle

Oracle database driver for the DBI module
http://search.cpan.org/dist/DBD-Oracle
18 stars 25 forks source link

Build failing on Fedora 40 with GCC 14 #174

Open kmoradha opened 4 months ago

kmoradha commented 4 months ago

Compile of DBD::Oracle 1.90 failing with GCC 14 on Fedora 40, at this point:

gcc -c  -I/usr/include/oracle/19.23/client64 -I/usr/lib64/perl5/vendor_perl/auto/DBI -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g   -DVERSION=\"1.90\" -DXS_VERSION=\"1.90\" -fPIC "-I/usr/lib64/perl5/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"19.23.0.0\" -DORA_OCI_102 -DORA_OCI_112 dbdcnx.c
dbdcnx.c: In function ‘find_env’:
dbdcnx.c:90:25: error: ‘return’ with no value, in function returning non-void [-Wreturn-mismatch]
   90 |     if(llist_empty(el)) return;\
      |                         ^~~~~~
dbdcnx.c:294:21: note: in expansion of macro ‘llist_drop’
  294 |                     llist_drop(base);
      |                     ^~~~~~~~~~
dbdcnx.c:271:1: note: declared here
  271 | find_env(ub4 mode, ub2 cset, ub2 ncset)
      | ^~~~~~~~
make: *** [Makefile:386: dbdcnx.o] Error 1
error: Bad exit status from /var/opt/rpm/build/tmp/rpm-tmp.Tk9cPu (%build)

I tried adding -Wreturn-mismatch to CCFLAGS (based on the error message), but had the same result.

lzsiga commented 3 months ago

See this PR: https://github.com/perl5-dbi/DBD-Oracle/pull/177