Re: Cannot find a working 64-bit integer type on Illumos
Japin Li <japinli@hotmail.com>
From: Japin Li <japinli@hotmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2024-03-25T01:24:58Z
Lists: pgsql-hackers
On Sat, 23 Mar 2024 at 01:22, Japin Li <japinli@hotmail.com> wrote:
> On Sat, 23 Mar 2024 at 01:04, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Japin Li <japinli@hotmail.com> writes:
>>> When I try to configure PostgreSQL 16.2 on Illumos using the following command,
>>> it complains $subject.
>>
>>> ./configure --enable-cassert --enable-debug --enable-nls --with-perl \
>>> --with-python --without-tcl --without-gssapi --with-openssl \
>>> --with-ldap --with-libxml --with-libxslt --without-systemd \
>>> --with-readline --enable-thread-safety --enable-dtrace \
>>> DTRACEFLAGS=-64 CFLAGS=-Werror
>>
>>> However, if I remove the `CFLAGS=-Werror`, it works fine.
>>> I'm not sure what happened here.
>>
>> CFLAGS=-Werror breaks a whole lot of configure's tests, not only that
>> one. (We even have this documented, see [1].) So you can't inject
>> -Werror that way. What I do on my buildfarm animals is the equivalent
>> of
>>
>> export COPT='-Werror'
>>
>> after configure and before build. I think configure pays no attention
>> to COPT, so it'd likely be safe to keep that set all the time, but in
>> the buildfarm client it's just as easy to be conservative.
>>
>> regards, tom lane
>>
>> [1] https://www.postgresql.org/docs/devel/install-make.html#CONFIGURE-ENVVARS
>
> Thank you very much! I didn't notice this part before.
I try to use the following to compile it, however, it cannot compile it.
$ ../configure --enable-cassert --enable-debug --enable-nls --with-perl --with-python --without-tcl --without-gssapi --with-openssl --with-ldap --with-libxml --with-libxslt --without-systemd --with-readline --enable-thread-safety --enable-dtrace DTRACEFLAGS=-64
$ make COPT='-Werror' -s
/home/japin/postgres/debug/../src/bin/pg_dump/pg_dump_sort.c: In function 'repairDependencyLoop':
/home/japin/postgres/debug/../src/bin/pg_dump/pg_dump_sort.c:1276:3: error: format not a string literal and no format arguments [-Werror=format-security]
1276 | pg_log_warning(ngettext("there are circular foreign-key constraints on this table:",
| ^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [<builtin>: pg_dump_sort.o] Error 1
make[2]: *** [Makefile:43: all-pg_dump-recurse] Error 2
make[1]: *** [Makefile:42: all-bin-recurse] Error 2
make: *** [GNUmakefile:11: all-src-recurse] Error 2
Commits
-
Move pg_int64 back to postgres_ext.h
- e56a601e0678 19 (unreleased) landed
- 409543da5411 18.0 landed
-
pgbench: Make set_random_seed() 64-bit everywhere.
- 53a2a1564ae4 18.0 landed
-
Use PRI?64 instead of "ll?" in format strings (continued).
- a0ed19e0a9ef 18.0 landed
-
Fix order of -I switches for building pg_regress.o.
- f186f90e55b7 17.5 landed
- cb36f8ec2124 18.0 landed
-
libpq: Deprecate pg_int64.
- 3c86223c9982 18.0 landed
-
Use PRI*64 instead of "ll*" in format strings (minimal trial)
- 15a79c73111f 18.0 landed
-
Fix header inclusion order in c.h.
- 71cb352904c1 18.0 landed
-
Use <stdint.h> and <inttypes.h> for c.h integers.
- 962da900ac8f 18.0 landed
-
Remove traces of BeOS.
- a2d9a9b95ad9 18.0 landed
-
More correct way to check for existence of types, which allows to specify
- 15abc7788e66 7.2.1 cited