DBD-Oracle
DBD-Oracle copied to clipboard
Build failing on Fedora 40 with GCC 14
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.
See this PR: https://github.com/perl5-dbi/DBD-Oracle/pull/177
Hi @lzsiga , I have the same problem. I see that this is fixed in PR #177 but what I'm supposed to do? I'm not a Perl user, I'm just installing from CPAN (perl -MCPAN -e 'install DBD::Oracle') because I need it for a script. Isn't the CPAN version updated? Please help.
@johny65 Hi, I would do something like this (as root user):
mkdir -p /usr/local/src
cd /usr/local/src
wget -O DBD-Oracle-1.90.tar.gz https://github.com/perl5-dbi/DBD-Oracle/archive/refs/tags/v1.90.tar.gz
tar xzf DBD-Oracle-1.90.tar.gz
cd DBD-Oracle-1.90
test -f dbdcnx.bak || cp -p 'dbdcnx.c' dbdcnx.bak
sed '/#define llist_drop(ael) do{/,/}while(0)/c\
#define llist_drop(ael) do{\\\
llist_t * el = ael;\\\
if(!llist_empty(el)) {\\\
el->left->right = el->right;\\\
el->right->left = el->left;\\\
llist_init(el);\\\
} \\\
}while(0)
' <dbdcnx.bak >dbdcnx.c
perl Makefile.PL 2>&1 | tee log.Make
make 2>&1 | tee log.make
make install 2>&1 | tee log.make.install
Should anything go wrong, the log.* files might help.
Thank you @lzsiga for your help, it worked fine.
Can we massage this in to a pull request?
Can we massage this in to a pull request?
That is PR-177, merged on Jul 16 2024
Should we close this?
For the record, I eventually solved this with -Wno-error=return-mismatch...I just hadn't figured out the right option to use when I originally reported it. And it sounds like the next release will include a fix to no longer require even that...so I'm fine with closing this.