Bug #80876 [NEW]: Compile errors/warnings with unixODBC

From: Date: Wed, 17 Mar 2021 12:05:23 +0000
Subject: Bug #80876 [NEW]: Compile errors/warnings with unixODBC
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-232811@lists.php.net to get a copy of this message
From:             sergiopaternoster73 at gmail dot com
Operating system: Ubuntu 18.04 Server
PHP version:      8.0.3
Package:          PDO ODBC
Bug Type:         Bug
Bug description:Compile errors/warnings with unixODBC

Description:
------------
Simple configure (and unixODBC 2.3.9 previously compiled in
/usr/local).
The compile ends eventually but I have some instability in using ODBC.

sudo ./configure --prefix=/usr/local/php/8.0.3 \
--disable-cgi \
--enable-debug \
--disable-opcache \
--enable-mbstring \
--with-pdo_odbc=unixODBC,/usr/local \
--with-unixODBC=/usr/local \
--with-iconv  \
--without-pdo-sqlite \
--disable-phar


It generates a list of warnings (which I think are related to my
ODBC/Unicode issues on php8):


/bin/bash /home/edsradmin/software/php/php-8.0.3/libtool --silent
--preserve-dup-deps --mode=compile cc -Iext/pdo_odbc/
-I/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/
-I/home/edsradmin/software/php/php-8.0.3/include
-I/home/edsradmin/software/php/php-8.0.3/main
-I/home/edsradmin/software/php/php-8.0.3
-I/home/edsradmin/software/php/php-8.0.3/ext/date/lib
-I/usr/include/libxml2
-I/home/edsradmin/software/php/php-8.0.3/ext/mbstring/libmbfl
-I/home/edsradmin/software/php/php-8.0.3/ext/mbstring/libmbfl/mbfl
-I/home/edsradmin/software/php/php-8.0.3/TSRM
-I/home/edsradmin/software/php/php-8.0.3/Zend    -Wno-clobbered -Wall
-Wextra -Wno-strict-aliasing -Wno-implicit-fallthrough
-Wno-unused-parameter -Wno-sign-compare -g -fvisibility=hidden -O0
-DZEND_SIGNALS   -I/home/edsradmin/software/php/php-8.0.3/ext 
-I/usr/local/include -DPDO_ODBC_TYPE=\"unixODBC\" -c
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c -o
ext/pdo_odbc/odbc_driver.lo
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c: In
function ‘pdo_odbc_fetch_error_func’:
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c:42:36:
warning: format ‘%ld’ expects argument of type ‘long int’, but
argument 5 has type ‘SDWORD {aka int}’ [-Wformat=]
  message = strpprintf(0, "%s (%s[%ld] at %s:%d)",
                                  ~~^
                                  %d
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c:44:18:
     einfo->what, einfo->last_error,
                  ~~~~~~~~~~~~~~~~~
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c: In
function ‘pdo_odbc_error’:
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c:88:41:
warning: pointer targets in passing argument 4 of ‘SQLGetDiagRec’
differ in signedness [-Wpointer-sign]
  rc = SQLGetDiagRec(htype, eh, recno++, einfo->last_state,
&einfo->last_error,
                                         ^~~~~
In file included from /usr/local/include/sqlext.h:43:0,
                 from /usr/local/include/sqlucode.h:784,
                 from
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/php_pdo_odbc_int.h:51,
                 from
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c:27:
/usr/local/include/sql.h:726:24: note: expected ‘SQLCHAR * {aka
unsigned char *}’ but argument is of type ‘char *’
     SQLRETURN  SQL_API SQLGetDiagRec(SQLSMALLINT HandleType, SQLHANDLE
Handle,
                        ^~~~~~~~~~~~~
/home/edsradmin/software/php/php-8.0.3/ext/pdo_odbc/odbc_driver.c:89:4:
warning: pointer targets in passing argument 6 of ‘SQLGetDiagRec’
differ in signedness [-Wpointer-sign]
    einfo->last_err_msg, sizeof(einfo->last_err_msg)-1, &errmsgsize);
    ^~~~~

Expected result:
----------------
No errors


-- 
Edit bug report at https://bugs.php.net/bug.php?id=80876&edit=1
-- 
Fix committed:                    https://bugs.php.net/fix.php?id=80876&r=fixed
Fixed in release:                 https://bugs.php.net/fix.php?id=80876&r=alreadyfixed
Need backtrace:                   https://bugs.php.net/fix.php?id=80876&r=needtrace
Need Reproduce Script:            https://bugs.php.net/fix.php?id=80876&r=needscript
Try newer version:                https://bugs.php.net/fix.php?id=80876&r=oldversion
Not developer issue:              https://bugs.php.net/fix.php?id=80876&r=support
Expected behavior:                https://bugs.php.net/fix.php?id=80876&r=notwrong
Not enough info:                  https://bugs.php.net/fix.php?id=80876&r=notenoughinfo
Submitted twice:                  https://bugs.php.net/fix.php?id=80876&r=submittedtwice
register_globals:                 https://bugs.php.net/fix.php?id=80876&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80876&r=phptooold
Daylight Savings:                 https://bugs.php.net/fix.php?id=80876&r=dst
IIS Stability:                    https://bugs.php.net/fix.php?id=80876&r=isapi
Install GNU Sed:                  https://bugs.php.net/fix.php?id=80876&r=gnused
Floating point limitations:       https://bugs.php.net/fix.php?id=80876&r=float
No Zend Extensions:               https://bugs.php.net/fix.php?id=80876&r=nozend
MySQL Configuration Error:        https://bugs.php.net/fix.php?id=80876&r=mysqlcfg


Thread (6 messages)

« previous php.bugs (#232811) next »