Re: Build with meson + clang + sanitizer resulted in undefined reference - Mailing list pgsql-hackers

From Dmitry Dolgov
Subject Re: Build with meson + clang + sanitizer resulted in undefined reference
Date
Msg-id 20240430211112.cs6bqgjndhrz45ih@erthalion.local
Whole thread Raw
In response to Build with meson + clang + sanitizer resulted in undefined reference  (Maxim Orlov <orlovmg@gmail.com>)
Responses Re: Build with meson + clang + sanitizer resulted in undefined reference
List pgsql-hackers
> On Thu, Apr 25, 2024 at 06:38:58PM +0300, Maxim Orlov wrote:
>
> And then upon build I've got overwhelmed by thousands of undefined
> reference errors.
>
> fe-auth-scram.c:(.text+0x17a): undefined reference to
> `__ubsan_handle_builtin_unreachable'
> /usr/bin/ld: fe-auth-scram.c:(.text+0x189): undefined reference to
> `__ubsan_handle_type_mismatch_v1_abort'
> /usr/bin/ld: fe-auth-scram.c:(.text+0x195): undefined reference to
> `__ubsan_handle_type_mismatch_v1_abort'
> /usr/bin/ld: fe-auth-scram.c:(.text+0x1a1): undefined reference to
> `__ubsan_handle_type_mismatch_v1_abort'
> /usr/bin/ld: fe-auth-scram.c:(.text+0x1ad): undefined reference to
> `__ubsan_handle_type_mismatch_v1_abort'
> /usr/bin/ld: fe-auth-scram.c:(.text+0x1b9): undefined reference to
> `__ubsan_handle_type_mismatch_v1_abort'

Seems to be a meson quirk [1]. I could reproduce this, and adding
-Db_lundef=false on top of your configuration solved the issue.

[1]: https://github.com/mesonbuild/meson/issues/3853



pgsql-hackers by date:

Previous
From: Justin Pryzby
Date:
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands
Next
From: Dmitry Koval
Date:
Subject: Re: Add SPLIT PARTITION/MERGE PARTITIONS commands