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 1i07QW-0006eF-Qg for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Aug 2019 16:56:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i07QV-0004XC-0Z for pgsql-bugs@arkaria.postgresql.org; Tue, 20 Aug 2019 16:56:07 +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 1i07QU-0004X5-MQ for pgsql-bugs@lists.postgresql.org; Tue, 20 Aug 2019 16:56:06 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i07QP-0007vr-NW for pgsql-bugs@lists.postgresql.org; Tue, 20 Aug 2019 16:56:05 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 42E1B22303; Tue, 20 Aug 2019 12:56:00 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 20 Aug 2019 12:56:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm2; bh=SatBW+fbG0QF2sgQdAJKkxhz6jj /tlQaLJoRYApeHgM=; b=gMkZe1Gkm2F9voipr2wZ8PpJ2TgYAUM4w1yB/t0fEGY IrnOuvnfIf9yCS60r4nmVhGBMkq23HoToHtiGz5QfXqc/+T7QfX66lHD8ugbf83G HQ/KT/oMPX7H0DAjwSni1mH4AnBaYxRlWWdu7kp5i+tNvgAiuWZeOtg8wgb2amCo u3TdJeRssnnD2fNKlbXs8F6D7OXSNUdt8/eyLtq3tt8S+tz/tUb+SLlU6iR1Om2n ZLA+jA07hKal6IpCh7jc4qzhjhx2KrJz57zulfrPTNlTov4r8hKbkzNssrU66aK7 WeK/jI3I6fVieTLRvl+9HZPYc3u8WJ/tPUqtHOLOaKw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=SatBW+ fbG0QF2sgQdAJKkxhz6jj/tlQaLJoRYApeHgM=; b=V/A+NDkRAdHTwe6zRib/ak 67964XA35UK/P5aJe/UVUE6TwRK2w8PFZQ/lKBnrd6ksmHovkczzngATb2/x/dji U4BJPPM91n1YZE3rv6bWdhreRmUjj4jpcmZq7eulEQbuKwc/uy4rwFCsvM6oqElj Z8FEFkxbn1+KWlwPT3hdOHBy9I3RXNQsvkROiv3Or6i03ldL9tJU42Dyg/PEdguM +wwRJnVogY3Os1i/woPbvlXs+nKWC0aTg59QEBr7ZPCeOPwvtoi3n9relJJiEPJ2 SW1J+9UlGrWHepMkc6W2M0xO60/mLxB6v5MUDmvqmH3B8kyGMHFpMbqKn/O5nriA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrudeguddguddtgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtuggjsehttd ertddttddvnecuhfhrohhmpeetnhgurhgvshcuhfhrvghunhguuceorghnughrvghssegr nhgrrhgriigvlhdruggvqeenucfkphepieejrdduiedtrddvudekrddvfeejnecurfgrrh grmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdguvgenucevlhhu shhtvghrufhiiigvpedt X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-218-237.hsd1.ca.comcast.net [67.160.218.237]) by mail.messagingengine.com (Postfix) with ESMTPA id 442DF380079; Tue, 20 Aug 2019 12:55:59 -0400 (EDT) Date: Tue, 20 Aug 2019 09:55:57 -0700 From: Andres Freund To: sylvie.empereur-mot@bull.net, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15969: PG12 b3 with LLVM JIT can't load library llvmjit.so: unresolvd symbol llvm::fatal_error_handler Message-ID: <20190820165557.t3up7shskue7sblk@alap3.anarazel.de> References: <15969-aced8b41fc355163@postgresql.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <15969-aced8b41fc355163@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-08-20 16:41:06 +0000, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 15969 > Logged by: Sylvie Empereur > Email address: sylvie.empereur-mot@bull.net > PostgreSQL version: 12beta3 > Operating system: Linux RedHat 7.6 > Description: > > SW and HW Environment: > - LINUX RedHat Entreprise 7.6 (ppc64le on Power9 processors) > - GCC 4.8.5 (included in RHEL7.6) > - make 3.8.2 > - LLVM8 and CLANG8 > - PostgreSQL 12 beta3 built with support for LLVM JIT based compilation > - Doc PostgreSQL (chap31 JIT Compilation) indicates script configure, to be > run with parameter LLVM_CONFIG. > - PG12 script configure requires parameter CLANG also. > configure --without-readline --with-llvm > LLVM_CONFIG='/home/postgres/clang+llvm-8.0.1-powerpc64le-linux-rhel-7.4/bin/llvm-config' > CLANG='/home/postgres/clang+llvm-8.0.1-powerpc64le-linux-rhel-7.4/bin/clang' > make clean > make -j40 world > make check I suspect the problem here might be that you're building against an LLVM version which is not in dynamic linker's path. So when postgres loads llvmjit.so the dynamic linker will find the globally installed version of the llvm libraries, which is not compatible with the self installed version. If that's indeed the problem, you can either 1) adapt your dynamic linker configuration to look for shared libraries inside the appropriate directory, e.g. by setting LD_LIBRARY_PATH, or by configuring things more permanently in /etc/ld.so.conf[.d] (don't forget to run ldconfig in that case) 2) Add a flag to postgres compilation changing the library lookups, using rpath. E.g. I'm using something like LDFLAGS='-Wl,-rpath,/home/andres/build/llvm/opt/install/lib' > Error Symptom: > - make check step, shows 26 identical failures from total of 193 autotests > : > ERROR: could not load library > "/nvme/postgresql-12beta3/tmp_install/usr/local/pgsql/lib/llvmjit.so": > /nvme/postgresql-12beta3/tmp_install/usr/local/pgsql/lib/llvmjit.so: > undefined symbol: _ZNSt3_V214error_categoryD2Ev > - The symbol C++ library llvm::fatal_error_handler is defined in CLANG > library libclang.so I don't think libclang should play any role here, because postgres's jit doesn't use libclang at runtime (you can argue it uses it via the clang binary at compile time, but that wouldn't cause errors like this). Greetings, Andres Freund