public inbox for [email protected]  
help / color / mirror / Atom feed
Warning while compiling 19beta1
4+ messages / 2 participants
[nested] [flat]

* Warning while compiling 19beta1
@ 2026-06-04 14:35  hubert depesz lubaczewski <[email protected]>
  0 siblings, 1 reply; 4+ messages in thread

From: hubert depesz lubaczewski @ 2026-06-04 14:35 UTC (permalink / raw)
  To: PostgreSQL mailing lists <[email protected]>

Hi,
fetched newest git head (commit
f0aedc7cb0ed82d4cca48332dc0852c767514558), and compiled it.
When doing so I got:

llvmjit.c: In function ‘llvm_split_symbol_name’:
llvmjit.c:1065:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
 1065 |                 *funcname = strrchr(name, '.');
      |                           ^

Generally I wouldn't care, but pg normally compiles without warnings, so this one stuck out :)


My system is Linux/Ubuntu 26.04. Interesting (?) packages:
=$ dpkg -l | awk '$2 ~ /gcc|llvm/'
ii  gcc                                                      4:15.2.0-5ubuntu1                                    amd64        GNU C compiler
ii  gcc-15                                                   15.2.0-16ubuntu1                                     amd64        GNU C compiler
ii  gcc-15-base:amd64                                        15.2.0-16ubuntu1                                     amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-15-x86-64-linux-gnu                                  15.2.0-16ubuntu1                                     amd64        GNU C compiler for the x86_64-linux-gnu architecture
ii  gcc-16-base:amd64                                        16-20260322-1ubuntu1                                 amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-x86-64-linux-gnu                                     4:15.2.0-5ubuntu1                                    amd64        GNU C compiler for the amd64 architecture
ii  lib32gcc-s1                                              16-20260322-1ubuntu1                                 amd64        GCC support library (32 bit Version)
ii  libgcc-15-dev:amd64                                      15.2.0-16ubuntu1                                     amd64        GCC support library (development files)
ii  libgcc-s1:amd64                                          16-20260322-1ubuntu1                                 amd64        GCC support library
ii  libllvm20:amd64                                          1:20.1.8-2ubuntu8                                    amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm21:amd64                                          1:21.1.8-6ubuntu1                                    amd64        Modular compiler and toolchain technologies, runtime library
ii  libuno-cppuhelpergcc3-3t64                               4:26.2.3.2-0ubuntu0.26.04.1                          amd64        LibreOffice UNO runtime environment -- CPPU helper library
ii  libuno-purpenvhelpergcc3-3t64                            4:26.2.3.2-0ubuntu0.26.04.1                          amd64        LibreOffice UNO runtime environment -- "purpose environment" helper
ii  libuno-salhelpergcc3-3t64                                4:26.2.3.2-0ubuntu0.26.04.1                          amd64        LibreOffice UNO runtime environment -- SAL helpers for C++ library
ii  llvm                                                     1:21.1.6-71                                          amd64        Modular compiler and toolchain technologies
ii  llvm-20                                                  1:20.1.8-2ubuntu8                                    amd64        Modular compiler and toolchain technologies
ii  llvm-20-dev                                              1:20.1.8-2ubuntu8                                    amd64        Modular compiler and toolchain technologies, libraries and headers
ii  llvm-20-linker-tools                                     1:20.1.8-2ubuntu8                                    amd64        Modular compiler and toolchain technologies - Plugins
ii  llvm-20-runtime                                          1:20.1.8-2ubuntu8                                    amd64        Modular compiler and toolchain technologies, IR interpreter
ii  llvm-20-tools                                            1:20.1.8-2ubuntu8                                    amd64        Modular compiler and toolchain technologies, tools
ii  llvm-21                                                  1:21.1.8-6ubuntu1                                    amd64        Modular compiler and toolchain technologies
ii  llvm-21-dev                                              1:21.1.8-6ubuntu1                                    amd64        Modular compiler and toolchain technologies, libraries and headers
ii  llvm-21-linker-tools                                     1:21.1.8-6ubuntu1                                    amd64        Modular compiler and toolchain technologies - Plugins
ii  llvm-21-runtime                                          1:21.1.8-6ubuntu1                                    amd64        Modular compiler and toolchain technologies, IR interpreter
ii  llvm-21-tools                                            1:21.1.8-6ubuntu1                                    amd64        Modular compiler and toolchain technologies, tools
ii  llvm-dev                                                 1:21.1.6-71                                          amd64        Modular compiler and toolchain technologies, libraries and headers
ii  llvm-runtime:amd64                                       1:21.1.6-71                                          amd64        Modular compiler and toolchain technologies, bytecode interpreter

Configure was called:
./configure \
    --quiet \
    --prefix=/home/pgdba/work \
    --enable-debug \
    --with-pgport=$use_port \
    --with-tcl \
    --with-perl \
    --with-python \
    --enable-integer-datetimes \
    --without-pam \
    --without-bonjour \
    --with-openssl \
    --with-uuid=ossp \
    --with-readline \
    --with-libxml \
    --with-systemd \
    --with-zlib \
    --with-lz4 \
    --with-zstd \
    --with-llvm \
    --enable-debug --enable-depend --enable-cassert

Best regards,

depesz






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Warning while compiling 19beta1
@ 2026-06-04 14:43  Tom Lane <[email protected]>
  parent: hubert depesz lubaczewski <[email protected]>
  0 siblings, 2 replies; 4+ messages in thread

From: Tom Lane @ 2026-06-04 14:43 UTC (permalink / raw)
  To: [email protected]; +Cc: PostgreSQL mailing lists <[email protected]>

hubert depesz lubaczewski <[email protected]> writes:
> When doing so I got:

> llvmjit.c: In function ‘llvm_split_symbol_name’:
> llvmjit.c:1065:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>  1065 |                 *funcname = strrchr(name, '.');
>       |                           ^

Yeah, some of the buildfarm animals have been showing this for awhile.
I suppose it's from using a bleeding-edge LLVM version, because most
of them don't show it.  Which LLVM are you actually compiling against?

			regards, tom lane






^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Warning while compiling 19beta1
@ 2026-06-04 15:11  Tom Lane <[email protected]>
  parent: Tom Lane <[email protected]>
  1 sibling, 0 replies; 4+ messages in thread

From: Tom Lane @ 2026-06-04 15:11 UTC (permalink / raw)
  To: [email protected]; +Cc: PostgreSQL mailing lists <[email protected]>

I wrote:
> hubert depesz lubaczewski <[email protected]> writes:
>> llvmjit.c: In function ‘llvm_split_symbol_name’:
>> llvmjit.c:1065:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
>> 1065 |                 *funcname = strrchr(name, '.');
>> |                           ^

> Yeah, some of the buildfarm animals have been showing this for awhile.

Actually, after looking closer, the LLVM version isn't relevant.
What you need is a gcc new enough to know that the result of
strrchr() applied to a const char * should be considered const.

This function is ugly in some other ways too.  Will fix.

			regards, tom lane





^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Warning while compiling 19beta1
@ 2026-06-04 15:12  hubert depesz lubaczewski <[email protected]>
  parent: Tom Lane <[email protected]>
  1 sibling, 0 replies; 4+ messages in thread

From: hubert depesz lubaczewski @ 2026-06-04 15:12 UTC (permalink / raw)
  To: Tom Lane <[email protected]>; +Cc: PostgreSQL mailing lists <[email protected]>

On Thu, Jun 04, 2026 at 10:43:00AM -0400, Tom Lane wrote:
> hubert depesz lubaczewski <[email protected]> writes:
> > When doing so I got:
> 
> > llvmjit.c: In function ‘llvm_split_symbol_name’:
> > llvmjit.c:1065:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
> >  1065 |                 *funcname = strrchr(name, '.');
> >       |                           ^
> 
> Yeah, some of the buildfarm animals have been showing this for awhile.
> I suppose it's from using a bleeding-edge LLVM version, because most
> of them don't show it.  Which LLVM are you actually compiling against?

configure output contained:
checking for llvm-config... /usr/bin/llvm-config
configure: using llvm 21.1.8

Best regards,

depesz







^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2026-06-04 15:12 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-06-04 14:35 Warning while compiling 19beta1 hubert depesz lubaczewski <[email protected]>
2026-06-04 14:43 ` Tom Lane <[email protected]>
2026-06-04 15:11   ` Tom Lane <[email protected]>
2026-06-04 15:12   ` hubert depesz lubaczewski <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox