Skip to content

DBD-Oracle-1.90 Fails to build on Debian based Kali Linux in dbdcnx.c #183

@ryan-r-russo

Description

@ryan-r-russo

I have been successfully building and using an older build of this module ($VERSION = '1.83') on Red Hat.
However, when I attempted to build 1.90 on a Kali VM ran into the compile error down below.

Looking in the code the issue seems to hinge around llist_drop macro on line 88 where it may do a return without a value.

This macro is called by three functions. Two of them have void return types.
However the problem seems to be third function where the macro is used; find_env function's return type "env_box_t *"

I have no familiarity with this code and haven't coded in c in, well, 27 years but my ignorant thought was should the return on line 90 be a break? If not, then would seem you would need 2 macros. One for the functions which return void and one for the find_env function.

I changed my local copy to break instead of return in the macro and it compiled but, I suspect I created future issue for myself if llist_drop macro is supposed to force the users of the macro to exit immediately when llist_empty(el) returns true on line 90.

I'm really just trying to test building my Perl script using Par packer and this is one of the modules it depends on.

If you need more info let me know.

cc -c -I/usr/include/oracle/19.6/client64 -I/home/kali/perl5/perlbrew/perls/perl-5.38.3/lib/site_perl/5.38.3/x86_64-linux-thread-multi/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -O2 -DVERSION=\"1.90\" -DXS_VERSION=\"1.90\" -fPIC "-I/home/kali/perl5/perlbrew/perls/perl-5.38.3/lib/5.38.3/x86_64-linux-thread-multi/CORE" -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"19.6.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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions