Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type mismatches betwen instantclient 11 and 12 #76

Open
djzort opened this issue Jan 8, 2019 · 2 comments
Open

Type mismatches betwen instantclient 11 and 12 #76

djzort opened this issue Jan 8, 2019 · 2 comments

Comments

@djzort
Copy link
Collaborator

djzort commented Jan 8, 2019

As reported in #42

There are types that are different in IC 11 vs 12 that cause warnings. These should be handled in an elegant way (TBD)

@CarstenGrohmann
Copy link

I used the non-instantclient (admin client?) to compile DBD::Oracle. With this client type I can't reproduce the type warnings raised during the compile process.

Compiler output for Oracle 11.2.0.4 and current master branch

gcc -c  -I/opt/oracle/11.2.0.4/rdbms/public -I/usr/lib64/perl5/vendor_perl/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic   -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -fPIC "-I/usr/lib64/perl5/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0\" -DORA_OCI_102 -DORA_OCI_112 Oracle.c
gcc -c  -I/opt/oracle/11.2.0.4/rdbms/public -I/usr/lib64/perl5/vendor_perl/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic   -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -fPIC "-I/usr/lib64/perl5/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0\" -DORA_OCI_102 -DORA_OCI_112 dbdimp.c
gcc -c  -I/opt/oracle/11.2.0.4/rdbms/public -I/usr/lib64/perl5/vendor_perl/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic   -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -fPIC "-I/usr/lib64/perl5/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"11.2.0\" -DORA_OCI_102 -DORA_OCI_112 oci8.c

Compiler output for Oracle 12.1.0.2 and current master branch

gcc -c  -I/opt/oracle/12.1.0.2/rdbms/public -I/usr/lib64/perl5/vendor_perl/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic   -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -fPIC "-I/usr/lib64/perl5/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"12.1.0\" -DORA_OCI_102 -DORA_OCI_112 Oracle.c
gcc -c  -I/opt/oracle/12.1.0.2/rdbms/public -I/usr/lib64/perl5/vendor_perl/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic   -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -fPIC "-I/usr/lib64/perl5/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"12.1.0\" -DORA_OCI_102 -DORA_OCI_112 dbdimp.c
gcc -c  -I/opt/oracle/12.1.0.2/rdbms/public -I/usr/lib64/perl5/vendor_perl/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic   -DVERSION=\"1.00\" -DXS_VERSION=\"1.00\" -fPIC "-I/usr/lib64/perl5/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"12.1.0\" -DORA_OCI_102 -DORA_OCI_112 oci8.c

Compiler output for Oracle 12.1.0.2 and DBD::Oracle 1.75

# gcc -c  -I/opt/oracle/12.1.0.2/rdbms/public -I/usr/lib64/perl5/vendor_perl/auto/DBI -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic   -DVERSION=\"1.75_2\" -DXS_VERSION=\"1.75_2\" -fPIC "-I/usr/lib64/perl5/CORE"  -Wall -Wno-comment -DUTF8_SUPPORT -DORA_OCI_VERSION=\"12.1.0\" -DORA_OCI_102 -DORA_OCI_112 Oracle.c
dbdimp.c: In function ‘ora_db_login6’:
dbdimp.c:725:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 12 has type ‘size_t’ [-Wformat=]
     OCISessionPoolCreate_log_stat(
     ^
dbdimp.c:725:5: warning: format ‘%d’ expects argument of type ‘int’, but argument 14 has type ‘size_t’ [-Wformat=]
oci8.c: In function ‘ora_blob_read_mb_piece’:
oci8.c:1847:4: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘ub4’ [-Wformat=]
    fbh->field_num+1, ftype, offset, len, destoffset, ul_t(amtp));
    ^

@djzort
Copy link
Collaborator Author

djzort commented Apr 2, 2019

in Oracle.xs its using these macros

#if !defined(ORA_OCI_102) || (defined(_AIX) && !defined(ORA_OCI_112))

Perhaps i can work out how to aply them for the above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants