Open kloczek opened 9 months ago
Under Gentoo:
/bin/sh ../../libtool --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1 -I../.. -I/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/include -march=alderlake -mabm -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=12288 -O2 -pthread -c -o md5.lo /var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/md5.c
/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/info.c: In function 'SQLStatistics':
/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/info.c:1868:63: error: passing argument 6 of 'PG_SQLBindCol' from incompatible pointer type [-Wincompatible-pointer-types]
1868 | column_name, MAX_INFO_STRING, &column_name_len);
| ^~~~~~~~~~~~~~~~
| |
| int *
In file included from /var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/statement.h:18,
from /var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/info.c:42:
/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/bind.h:49:39: note: expected 'SQLLEN *' {aka 'long int *'} but argument is of type 'int *'
49 | SQLLEN *pcbValue);
| ~~~~~~~~^~~~~~~~
/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/info.c:1925:54: error: passing argument 6 of 'PG_SQLBindCol' from incompatible pointer type [-Wincompatible-pointer-types]
1925 | index_name, MAX_INFO_STRING, &index_name_len);
| ^~~~~~~~~~~~~~~
| |
| SDWORD * {aka int *}
/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/bind.h:49:39: note: expected 'SQLLEN *' {aka 'long int *'} but argument is of type 'SDWORD *' {aka 'int *'}
49 | SQLLEN *pcbValue);
| ~~~~~~~~^~~~~~~~
/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/info.c:1934:44: error: passing argument 6 of 'PG_SQLBindCol' from incompatible pointer type [-Wincompatible-pointer-types]
1934 | fields_vector, 16, &fields_vector_len);
| ^~~~~~~~~~~~~~~~~~
| |
| SDWORD * {aka int *}
/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/bind.h:49:39: note: expected 'SQLLEN *' {aka 'long int *'} but argument is of type 'SDWORD *' {aka 'int *'}
49 | SQLLEN *pcbValue);
| ~~~~~~~~^~~~~~~~
/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/info.c: In function 'PG_SQLPrimaryKeys':
/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/info.c:2220:51: error: passing argument 6 of 'PG_SQLBindCol' from incompatible pointer type [-Wincompatible-pointer-types]
2220 | attname, MAX_INFO_STRING, &attname_len);
| ^~~~~~~~~~~~
| |
| SDWORD * {aka int *}
/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/bind.h:49:39: note: expected 'SQLLEN *' {aka 'long int *'} but argument is of type 'SDWORD *' {aka 'int *'}
49 | SQLLEN *pcbValue);
| ~~~~~~~~^~~~~~~~
But it's possible to turn on minimal
use flag and all compiles.
Actually this issue has nothing to do with gcc version
It is result of use latest glibc + -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
in $CFLAGS which turns some warnings into errors.
@kloczek All that I've done to have these errors, I've moved from gcc 13 to 14. And I think the same will be with the modern clang:
Clang 15 (it's been reverted in 15.0.1) turns on the following as -Werror-by-default:
On 18/04/2024 15:15, Maxim P. DEMENTIEV wrote:
Under Gentoo:
|/bin/sh ../../libtool --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1 -I../.. -I/var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/include -march=alderlake -mabm -mno-cldemote -mno-kl -mno-pconfig -mno-sgx -mno-widekl -mshstk --param=l1-cache-line-size=64 --param=l1-cache-size=32 --param=l2-cache-size=12288 -O2 -pthread -c -o md5.lo /var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/md5.c /var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/info.c: In function 'SQLStatistics': /var/tmp/portage/dev-db/unixODBC-2.3.12/work/unixODBC-2.3.12/Drivers/Postgre7.1/info.c:1868:63: error: passing argument 6 of 'PG_SQLBindCol' from incompatible pointer type [-Wincompatible-pointer-types] 1868 | column_name, MAX_INFO_STRING, &column_name_len); | ^
~~~| | | int *|
|Checking my source for 2.3.13pre all of those arguments in the unsupported samples have been changed to SQLLEN *|
@lurcher Thanks! Indeed, it was already fixed on master by 45f501e1
Looks like with new gcc is reported
[-Wimplicit-function-declaration]
error