Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j3dxZ-0005hi-3q for pgsql-general@arkaria.postgresql.org; Mon, 17 Feb 2020 10:49:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j3dxW-0002Cx-C7 for pgsql-general@arkaria.postgresql.org; Mon, 17 Feb 2020 10:49:02 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j3dxV-00028J-VC for pgsql-general@lists.postgresql.org; Mon, 17 Feb 2020 10:49:02 +0000 Received: from n3.nabble.com ([162.255.23.22]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1j3dxT-0003Ve-6N for pgsql-general@postgresql.org; Mon, 17 Feb 2020 10:49:00 +0000 Received: from n3.nabble.com (localhost [127.0.0.1]) by n3.nabble.com (Postfix) with ESMTP id 8C6FC1B092D74 for ; Mon, 17 Feb 2020 03:48:57 -0700 (MST) Date: Mon, 17 Feb 2020 03:48:57 -0700 (MST) From: Sapd To: pgsql-general@postgresql.org Message-ID: <1581936537572-0.post@n3.nabble.com> Subject: Compiling via LLVM and active LTO MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello, I want to do some performance measures and have problems compiling postgres with LTO activated. I tried it with postgresql 12.0 and 12.2, yielding both the same result. The errors seem to relate to languages and encoding-functions. The linker simply seems unable to find them. Also it does not matter, wether I use the thin LTO or the full LLVM LTO. Normal compilation (without any additional CFLAGS) works. -------- System data Mac OS X Catalina llvm 8 Apple clang version 11.0.0 (clang-1100.0.33.17) Target: x86_64-apple-darwin19.3.0 -------- Configuration ./configure --prefix=../dist CFLAGS="-flto=thin -O3" -------- Error message (created by linker) undef: _pg_mic2ascii undef: _check_encoding_conversion_args undef: _pg_ascii2mic Undefined symbols for architecture x86_64: "_pg_mic2ascii", referenced from: _mic_to_ascii in lto.o "_check_encoding_conversion_args", referenced from: _ascii_to_mic in lto.o _mic_to_ascii in lto.o "_pg_ascii2mic", referenced from: _ascii_to_mic in lto.o ---- undef: _LocalToUtf undef: _check_encoding_conversion_args undef: _UtfToLocal Undefined symbols for architecture x86_64: "_LocalToUtf", referenced from: _koi8r_to_utf8 in lto.o _koi8u_to_utf8 in lto.o "_check_encoding_conversion_args", referenced from: _utf8_to_koi8r in lto.o _koi8r_to_utf8 in lto.o _utf8_to_koi8u in lto.o _koi8u_to_utf8 in lto.o "_UtfToLocal", referenced from: _utf8_to_koi8r in lto.o _utf8_to_koi8u in lto.o -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html