Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxHPo-0004pF-6g for pljava-dev@arkaria.postgresql.org; Sun, 19 Jul 2020 22:04:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jxHPl-0002o2-LE for pljava-dev@arkaria.postgresql.org; Sun, 19 Jul 2020 22:04:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxHPl-0002nt-5V for pljava-dev@lists.postgresql.org; Sun, 19 Jul 2020 22:04:09 +0000 Received: from anastigmatix.net ([68.171.219.55]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jxHPf-0003EE-LQ for pljava-dev@lists.postgresql.org; Sun, 19 Jul 2020 22:04:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=anastigmatix.net; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:Cc:References:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=7YFg8e/G1P66vDvl+x02o2qJ5trZU7+9DrgSOWVQ64I=; b=vcIWnkyaNKCg5s6wlTzQZPBkZD TSV5am6MVWmOlFPTupgRrxT0w6yz1nhaIuLsuKm1FuCTRBHr49ky/5TR0/hW6F/0i7O95LbH73JEn Yy+OtdR/Wlqcf+4HwQFhIkl3oYTyyWQdU9abVIq8E8BV0bvr82tV2JglFhxd79LDpLHb4/Ze8LBIC dklLVXd7B0DmSNmkpnP14HKiAt2WNiMjeXy32hLLiPQAGJpl7QMNQP9/YN/UYEYYkakNTqiCNxxVR E25u3MJko1B6IZfad6iHdGHIO/R4bBBaGtMZkl6DaL130nIG3rUGC6w+Lqh1xtU7kwLDGoWiTSIc8 YS3rjnbw==; Received: from [184.19.31.139] (port=49631) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jxHPb-00ERXV-A2; Sun, 19 Jul 2020 18:03:59 -0400 Subject: Re: PL/Java new build plugin To: Kartik Ohri References: <5F0D35BA.30904@anastigmatix.net> <5F0E3972.5070609@anastigmatix.net> <5F0F2DA2.5090603@anastigmatix.net> <5F12FF49.6090906@anastigmatix.net> <5F12FF80.5020208@anastigmatix.net> <5F1338F8.6030506@anastigmatix.net> <5F135B84.8070302@anastigmatix.net> Cc: pljava-dev@lists.postgresql.org From: Chapman Flack X-Enigmail-Draft-Status: N1110 Message-ID: <5F14C34E.4020704@anastigmatix.net> Date: Sun, 19 Jul 2020 18:03:58 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-OutGoing-Spam-Status: No, score=-95.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bay.acenet.us X-AntiAbuse: Original Domain - lists.postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - anastigmatix.net X-Get-Message-Sender-Via: bay.acenet.us: authenticated_id: chap@anastigmatix.net X-Authenticated-Sender: bay.acenet.us: chap@anastigmatix.net X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 07/19/20 04:42, Kartik Ohri wrote: > With using the System Class Loader as a temporary fix, I have been able to > get the build working. I have pushed the changes. How can I test with Graal > or other engines ? I have just made a pull request on amCap1712/plugin that uses the two-parented class loader idea. It turns out the idea wasn't completely broken, but there's only one choice for which parent goes first. I learned a lot more about how the Java 9 module system changed how ServiceLoader works. That turns out to be the issue, and not so much that the application class loader was just being left out. (And it turns out the application class loader isn't needed to find Nashorn anyway; the platform class loader can find it.) To test with Graal, you can (1) do a build with Java 15 and see that it breaks because Nashorn is gone :), and then (2) merge the chore/master/denashorn branch and edit the main (parent) pom.xml, and change the nashorngone profile so the two graal jars are added as dependencies of org.postgresql:pljava-pgxs instead of maven-antrun-plugin. Something isn't quite right about the handling of -Dpljava.libjvmdefault; the C compiler gives syntax errors if I use it (the build succeeds if I don't). Running with -X shows this being passed to the compiler: -DPLJAVA_LIBJVMDEFAULT=${pljava.qlibjvmdefault} so maybe there's a simple problem like one last line in the POM that got overlooked, or something. Of course it's kind of guaranteed not to work right on Windows, for reasons we already know, but it ought to work on Linux. Regards, -Chap