Обсуждение: Compiler warnings on Debian 10
HI,
I was wondering if someone already has seen these warnings on Debian 10 (PostgreSQL 13.1):
../../../../src/include/port.h:176:70: warning: 'format' attribute argument not supported: gnu_printf
[-Wignored-attributes]
extern int pg_snprintf(char *str, size_t count, const char *fmt,...) pg_attribute_printf(3, 4);
^
../../../../src/include/c.h:127:49: note: expanded from macro 'pg_attribute_printf'
#define pg_attribute_printf(f,a) __attribute__((format(PG_PRINTF_ATTRIBUTE, f, a)))
^
In file included from llvmjit_error.cpp:19:
In file included from ../../../../src/include/postgres.h:46:
In file included from ../../../../src/include/c.h:1318:
../../../../src/include/port.h:178:55: warning: 'format' attribute argument not supported: gnu_printf
[-Wignored-attributes]
extern int pg_sprintf(char *str, const char *fmt,...) pg_attribute_printf(2, 3);
^
../../../../src/include/c.h:127:49: note: expanded from macro 'pg_attribute_printf'
#define pg_attribute_printf(f,a) __attribute__((format(PG_PRINTF_ATTRIBUTE, f, a)))
^
In file included from llvmjit_error.cpp:19:
In file included from ../../../../src/include/postgres.h:46:
In file included from ../../../../src/include/c.h:1318:
../../../../src/include/port.h:180:58: warning: 'format' attribute argument not supported: gnu_printf
[-Wignored-attributes]
extern int pg_fprintf(FILE *stream, const char *fmt,...) pg_attribute_printf(2, 3);
^
Configure was successful:
...
configure: creating ./config.status
config.status: creating GNUmakefile
config.status: creating src/Makefile.global
config.status: creating src/include/pg_config.h
config.status: creating src/include/pg_config_ext.h
config.status: creating src/interfaces/ecpg/include/ecpg_config.h
config.status: linking src/backend/port/tas/dummy.s to src/backend/port/tas.s
config.status: linking src/backend/port/posix_sema.c to src/backend/port/pg_sema.c
config.status: linking src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
config.status: linking src/include/port/linux.h to src/include/pg_config_os.h
config.status: linking src/makefiles/Makefile.linux to src/Makefile.port
This is the official Debian AMI on AWS:
postgres@pg13:~/postgresql-13.1$ cat /etc/debian_version
10.8
Regards
Daniel
"Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com> writes:
> I was wondering if someone already has seen these warnings on Debian 10 (PostgreSQL 13.1):
> ../../../../src/include/port.h:176:70: warning: 'format' attribute argument not supported: gnu_printf
> [-Wignored-attributes]
Huh. What compiler are you using, exactly? Perhaps you used a different
compiler when running configure (or are trying to re-use configure results
from some other machine)?
regards, tom lane
"Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com> writes: > I was wondering if someone already has seen these warnings on Debian 10 (PostgreSQL 13.1): > ../../../../src/include/port.h:176:70: warning: 'format' attribute argument not supported: gnu_printf > [-Wignored-attributes] >Huh. What compiler are you using, exactly? Nothing special. Configure and make log attached. The same procedure works fine on my local Debian 10.7. postgres@pg13:/home/postgres/postgresql-13.1/ [pg131] gcc --version gcc (Debian 8.3.0-6) 8.3.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. >Perhaps you used a different >compiler when running configure (or are trying to re-use configure results >from some other machine)? No, definitely not, that was a fresh configure/make. Regards Daniel
Вложения
"Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com> writes:
> "Daniel Westermann (DWE)" <daniel.westermann@dbi-services.com> writes:
>>> I was wondering if someone already has seen these warnings on Debian 10 (PostgreSQL 13.1):
>>> ../../../../src/include/port.h:176:70: warning: 'format' attribute argument not supported: gnu_printf
>>> [-Wignored-attributes]
>> Huh. What compiler are you using, exactly?
> Nothing special. Configure and make log attached. The same procedure works fine on my local Debian 10.7.
Quite odd. The configure output clearly shows that it thought gnu_printf
is fine:
checking for printf format archetype... gnu_printf
Possibly the corresponding section of config.log would provide more
insight.
regards, tom lane
>> Nothing special. Configure and make log attached. The same procedure works fine on my local Debian 10.7. >Quite odd. The configure output clearly shows that it thought gnu_printf >is fine: >checking for printf format archetype... gnu_printf >Possibly the corresponding section of config.log would provide more >insight. Please find it attached. Regards Daniel
Вложения
Looking at things more closely, I realize that the warnings are not
showing up in most compiles (if they were, you'd have many more of
them). They are only showing up in the llvmjit_*.cpp files, which
need to be built with a C++ compiler not gcc. I can see in your
make log that those are getting built with "c++", so now I wonder
exactly which compiler that is.
You could probably suppress these complaints by passing "CXX=g++"
to configure. Or at least, you could if g++ was installed, but
I think configure will default to that if it can find it...
regards, tom lane