Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIyeQ-0001Hs-5p for pgsql-hackers@arkaria.postgresql.org; Sat, 03 Nov 2018 16:19:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gIyeN-0001ni-6C for pgsql-hackers@arkaria.postgresql.org; Sat, 03 Nov 2018 16:19:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIyeM-0001nb-S8 for pgsql-hackers@lists.postgresql.org; Sat, 03 Nov 2018 16:19:51 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gIyeI-0001kO-7d for pgsql-hackers@postgresql.org; Sat, 03 Nov 2018 16:19:49 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 675BA37E80; Sat, 3 Nov 2018 16:19:44 +0000 (UTC) Received: from nb.usersys.redhat.com (ovpn-200-18.brq.redhat.com [10.40.200.18]) by smtp.corp.redhat.com (Postfix) with ESMTP id 48C5057BC; Sat, 3 Nov 2018 16:19:42 +0000 (UTC) From: Pavel Raiskup To: PostgreSQL Hacker Cc: devrim@gunduz.org Subject: plruby: rb_iterate symbol clash with libruby.so Date: Sat, 03 Nov 2018 17:19:40 +0100 Message-ID: <4738198.8KVIIDhgEB@nb.usersys.redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sat, 03 Nov 2018 16:19:44 +0000 (UTC) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, I'm curious how it worked before (seems like the function is defined in both PostgreSQL and Ruby projects for quite some time) - but I recently came across this situation: - /bin/postgres is build-time linked with 'ld -E' - /bin/postgres dlopen()s plruby.so - plruby.so calls rb_iterate, but linker prefers rb_iterate defined in /bin/postgres, instead of (the wanted one) rb_iterate from libruby.so This means an ugly PG server crash. I'm curious what to do with this; ideally it would be solvable from plruby.so itself, but there doesn't seem to be nice solution (one could do some hacks with dlopen('libruby.so')). Is it realistic we could rename red-black tree methods from 'rb_*' to e.g. 'rbt_*' to avoid this clash? Pavel