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 1jaNkK-0002nh-1h for pljava-dev@arkaria.postgresql.org; Sun, 17 May 2020 18:10:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jaNkH-0005bC-Gf for pljava-dev@arkaria.postgresql.org; Sun, 17 May 2020 18:10:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jaNkH-0005b4-0c for pljava-dev@lists.postgresql.org; Sun, 17 May 2020 18:10:41 +0000 Received: from anastigmatix.net ([68.171.219.55]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jaNkA-0000uD-Gp for pljava-dev@lists.postgresql.org; Sun, 17 May 2020 18:10:39 +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: MIME-Version:Date:Message-ID:Subject:From:To:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=0AbUAS7gvQdqVpKt7OrsNFXp7nm7JTMSn6nSyj1aorY=; b=B6h+B5AENFpBd13gDHSY38/Dis 4Uh6Kb3PXYjyLE0buYXASfR71CSwU3frF7kekQa6BIhEJhyMURqWaCXlZ7mUUkP1wVSozC5otAhPu zaugoTosLLwcK8woQTvkkGPu8Zs053/Tf2zzdSLEuh57DaOufqLV3ZXm/FAAWDOUHiQJq8WjW+Szq qjdFgzR2JhWEUPMkePAK5jYBPfahoe8IHGxzQWFgIAam69N8/YfnAe1b6TS1s0ueDZzmRAvagelDa kfIFdcxY9tEWw6+1gizKqiNWPJIhw183Sa/2VrmVR9HQSgmLJQtI1GvaNCP4xOjv9J098yU9f5hgN Y/IN4drg==; Received: from [184.19.31.139] (port=56937) by bay.acenet.us with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1jaNk8-00FLpX-GB for pljava-dev@lists.postgresql.org; Sun, 17 May 2020 14:10:33 -0400 To: pljava-dev@lists.postgresql.org From: Chapman Flack Subject: Starting build-system work (Windows/Mac users please speak up) X-Enigmail-Draft-Status: N1110 Message-ID: <5EC17E17.7070002@anastigmatix.net> Date: Sun, 17 May 2020 14:10:31 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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 This message is largely for Kartik but may be of interest to others; please contribute in case of suggestions, questions, concerns, etc. *In particular, if you use Mac or Windows/MinGW-64 builds of PostgreSQL, please check what I've said below and supply corrections/better ideas as necessary.* Thomas Hallgren, originator of PL/Java, is subscribed on this list, and may have some thoughts on how GitHub Actions might be usable in place of Travis without requiring the same level of repository write access. == Java versions to build for For setting up CI, I suggest basing the work on the 'master' branch, which is where the future 1.6.0 release is taking shape. That branch only supports Java 9 and later, and the build is much simplified compared to the REL1_5_STABLE branch, which still takes extra pains to support building back to Java SE 6. I don't intend to abandon the REL1_5_STABLE branch immediately, so if time permits, testing that branch and with earlier Java versions would be ok, but should not be the focus. == PostgreSQL versions to build for Also, the newer branch targets a narrower range of PostgreSQL versions. The obvious starting point would be the versions currently shown as 'supported' in the PostgreSQL versioning policy: https://www.postgresql.org/support/versioning/ i.e., 12 back to 9.5. The branch may build successfully for a couple of versions before 9.5. I know the 'validator' PR knocked out pre-9.0 versions. When it comes time to announce PL/Java 1.6, we might choose to say it works back to PG 9.4, 9.3, or 9.2, if it works for those releases without extra fuss. 9.2 is a good stopping place, because the REL1_5_STABLE installation docs have an extra section for installing on pre-9.2 versions, and that could go away. The REL1_5_STABLE branch tries to stay buildable back to PG 8.2, but again, I would not focus effort there. == Platforms to build for Platforms should include at least one common Linux distro, Mac, and Windows. Windows should test building both with MSVC and with MinGW-64. (If I remember right, the EnterpriseDB PostgreSQL builds are made with MSVC, and the BigSQL ones are made with MinGW-64.) https://www.enterprisedb.com/software-downloads-postgres https://pgsql.io/ Something may have changed with BigSQL; I see the URL got redirected now to pgsql.io, and they say "Windows 10 Subsystem for Linux", which may not involve a native build for Windows anymore. EnterpriseDB has an installer for Mac. Also, Homebrew has been suggested, and may now be preferred: https://www.enterprisedb.com/downloads/postgresql https://wiki.postgresql.org/wiki/Detailed_installation_guides#MacOS == Extra options When testing PL/Java and running the examples, pljava.vmoptions should additionally contain: -ea:org.postgresql.pljava... -Xcheck:jni The -Xcheck:jni makes big output and big slowdown; it might be ok to include that in a subset of the tested configurations rather than all of them. The PostgreSQL server used for testing will ideally have been built with these configure options: --with-libxml --enable-cassert --enable-debug and (on platforms where gcc is the compiler) CFLAGS='-ggdb -Og -g3 -fno-omit-frame-pointer' Prebuilt PostgreSQL versions available to the CI service might not have been built with those options (pg_config output will show). So it may be necessary to build PostgreSQL from source too. Again, it may be adequate to do this for one platform, say Linux, if it is easiest there.) If a PL/Java test crashes, the JVM may have written an hs_err_pid.log file (with n the PID of the backend process), which should be preserved for review of the failing test. That file is written by HotSpot JVMs (as the hs_ suggests). It is also good to test with OpenJ9 JVMs, but I would focus first on covering the combinations of Java version ✕ PG version ✕ platform, using HotSpot. Regards, -Chap