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 1j3Z3k-0004kU-Cl for pgsql-interfaces@arkaria.postgresql.org; Mon, 17 Feb 2020 05:35: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 1j3Z3i-0003cS-Uv for pgsql-interfaces@arkaria.postgresql.org; Mon, 17 Feb 2020 05:35:06 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j3Z0g-0000Q0-Vu for pgsql-interfaces@lists.postgresql.org; Mon, 17 Feb 2020 05:31:59 +0000 Received: from mail-il1-x141.google.com ([2607:f8b0:4864:20::141]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1j3Z0d-0002XH-SE for pgsql-interfaces@lists.postgresql.org; Mon, 17 Feb 2020 05:31:58 +0000 Received: by mail-il1-x141.google.com with SMTP id t17so13146975ilm.13 for ; Sun, 16 Feb 2020 21:31:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=drasa-eu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=8ciKrP9V3lsxbDGJnz91hu7iY6P/b6U2+g82f4hiJnM=; b=QmnL57veNCFJ5QgbiZXpC/6Yd5CsuDjAmfw28qEZnzQ3/1ngctmZxCbBFq5iEeEUgc 3JinBWEqENzLWj1NwSq+nChXOfesDqW6lOckz/sHaUqCVyoKCY22dznq96s02zTlw0i7 uVFOy7W6RVNzyWnf95StMOBS5t1mC6ANPIMl+XEK9ETefW1o3AhpYogOOQYpvieZ3p0c /dXiSlciCPVkwyrDD5GaduSbkqh7droHSD3BCqR0EjMGbJUBkG5Prf7BMkoEQoED/q6E 6Tf0vfUZXTdJ1gWZf0uPFEr0VWQNGA9WzrVfEXkS1Rf0MlbaV/W3qgfFQi2xH9pDRLV5 iHUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=8ciKrP9V3lsxbDGJnz91hu7iY6P/b6U2+g82f4hiJnM=; b=SP5d/ccZtZVThX7nyIksoI+QXTvmz/JWnkXjsYBT7gtAsUGy87ZYWhNqsrNkInpVU1 22Muvf0z8dVoBdIaRSA7o3GfNvIVbvjnRc86A6IcqIzwAzSW+R5tEQFgJESNong0dBue WMZmh7+OwtdNO9rZo8jQIbQv1eDnmicuO+yhFTsz0FxIQzgDmPIjSy+BoH3ybaK0VBdf PsEOaxi2rJZkrtgWSlZZf3Mxx/fS24f2ZwdhZj5FEgLNHqT38W4T3wiF8+jOFCcqNyQB vyW4cgtk7wyjTCX/Jeako4HeK2V9zbDod46FAGHqhe/cEL+gb4xCHZnERmGu+qNrBTLr rysg== X-Gm-Message-State: APjAAAUVQglu3i53cSe2xqkI2U/FJCi5+L9frnpQluYamKUV+fatNkCu pbYfjajijl4jeuMbJlTetHFYCECzEf41Sb+eNVaPTy8Kr9Y= X-Google-Smtp-Source: APXvYqwlBpVMjDR4MH+szBzVSDiUo2Z6oYvXomjMyozgu4BM3BhTT9UsJy6Lp5fqQj0i9la4qcsa/E5PWti2VybzUMU= X-Received: by 2002:a92:d151:: with SMTP id t17mr13514476ilg.175.1581917514033; Sun, 16 Feb 2020 21:31:54 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Pyry Kontio Date: Mon, 17 Feb 2020 14:31:42 +0900 Message-ID: Subject: Re: Problems with statically linking libpq of Postgres 12.0 + musl To: pgsql-interfaces@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk After posting the last post, I got an helpful answer on the #postgres@freenode.net, so I'm sharing that here. It seems that in 12.0 branch, the following change was made: https://github.com/postgres/postgres/commit/ea53100d5 Some needed source files from libpgcommon and libpqport used to be directly symlinked to libpq and ecpg sources. This practice was eschewed to improve maintainability, so linking libpgcommon and libpqport separatelybecame a necessity. I was also pointed out that especially libpgcommon defines some common names without the pg prefix, and if those collide with names defined elsewhere, funny things will happen. Nevertheless, the way to link libpq statically from Postgres 12.0 and on is to include libpgcommon and libpqport. Thanks for the help to all! Pyry Kontio