Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g6JkK-0003hk-IN for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Sep 2018 18:13:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g6JkI-00042q-D2 for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Sep 2018 18:13:38 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g6JkH-00042j-WA for pgsql-hackers@lists.postgresql.org; Sat, 29 Sep 2018 18:13:38 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g6JkB-0004CU-1j for pgsql-hackers@lists.postgresql.org; Sat, 29 Sep 2018 18:13:36 +0000 Received: by mail-wr1-x443.google.com with SMTP id u12-v6so9553221wrr.4 for ; Sat, 29 Sep 2018 11:13:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to; bh=c/mwJGVN9PVme92j6W88qnlnq9mc91xCtVTWJnsANp4=; b=Kjsl5qAbf1mGRv7Z/Ss0Ufox887q11WZyA06EvQ7bQ8aDcKjXT9B3i5vpLFhopLYDi voxhfm01oxXYePoW29sIQJfWekfKJJ6VeHlts0c67IFidTKAZSxvJbjc09Z+MWXIRGK8 /nbOVG01TerCytAUXC1kHzNazV5a6pUlp4xr0H25TEf2E/r1chimcWlqZL5Srenq8Vwy 0zhFk3TstxCVymgRsAXWbNGSamoWLym9gv/dBB3IsyXr2JYGatwQeBfEcniHznUrGkxk VbixIJH5yJrb5Vp5wAfAecyCiP3yQATIX3zjy7X//1IskGUAtEfJZm/vxGE4NdF454Ay xA6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to; bh=c/mwJGVN9PVme92j6W88qnlnq9mc91xCtVTWJnsANp4=; b=RYYM+ryJI/e6gf0a8etpks7FnDNtHEqaue9+W3o8i+p7xPMsGGBYvM4HNAsr0YO5Rq w5LwoxMpuToQ6BPoVBHhYAa8Q+DheqaPJ1GfV/aYF0K/Gu1oyGdOyam2SzYzHUchKR4z FUiBg8DvjsqepC1LnDmTDJ0cjWSCGHZo2Bqz4md8aknOcEsHxFdzAEDF1zktPz8W6wh+ mue9g4guAHKRJuJmmYfuodNfgptyKAlfzoK1nrcqX9IbAk2OSF8TIdmPyDkaTQbeql1i YCRuf/Wmle1z0vmgl5Am7av+xHVE4lWOT9lVXcdgfzekhF+0eVVM1S4xCJUxhlRB56Ej ElSQ== X-Gm-Message-State: ABuFfoglwkRZS2X35k55lmHNUkymLs2DM1ghGRjuIWi0eaMqTzNgyZOa 00CDr9adHqbNtD6LHxb1Xz6cUkb6 X-Google-Smtp-Source: ACcGV63UesNKZjVH/TwBME1UurfGL12HETvRaTaRegzsb45mvCTGg0qT93kJLhGWzXNFt+rRlg6lZw== X-Received: by 2002:a5d:548e:: with SMTP id h14-v6mr2555746wrv.316.1538244808320; Sat, 29 Sep 2018 11:13:28 -0700 (PDT) Received: from ?IPv6:::1? (p200300EE63D12701ED2E5B5273F7299D.dip0.t-ipconnect.de. [2003:ee:63d1:2701:ed2e:5b52:73f7:299d]) by smtp.gmail.com with ESMTPSA id h17-v6sm8065805wrq.73.2018.09.29.11.13.27 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Sep 2018 11:13:27 -0700 (PDT) Subject: Re: Cygwin linking rules To: pgsql-hackers@lists.postgresql.org References: <1056.1538235347@sss.pgh.pa.us> <86419508-9d36-36a9-93ff-2a051af7d2e4@2ndQuadrant.com> From: Marco Atzeri Message-ID: <257c24fc-effb-871d-4529-e3ff2ea0d436@gmail.com> Date: Sat, 29 Sep 2018 20:13:25 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------D2F1A1B8A214AB8C36C1EB58" X-Antivirus: Avast (VPS 180929-2, 29.09.2018), Outbound message X-Antivirus-Status: Clean List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------D2F1A1B8A214AB8C36C1EB58 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Am 29.09.2018 um 19:03 schrieb Andrew Dunstan: > > > On 09/29/2018 12:09 PM, Andrew Dunstan wrote: >> >> >> On 09/29/2018 11:35 AM, Tom Lane wrote: >>> Most of the buildfarm is now happy with the changes I made to have >>> libpq + ecpg get src/port and src/common files via libraries ... >>> but lorikeet isn't.  It gets through the core regression tests fine >>> (so libpq, per se, works), but contrib/dblink fails: >>> >>> ! ERROR:  could not establish connection >>> ! DETAIL:  libpq is incorrectly linked to backend functions >>> >>> What this means is that libpq is calling the backend version of >>> src/common/link-canary.c rather than the frontend version. >>> Why would it do the right thing normally and the wrong thing in dblink? >>> >>> I can think of a few theories but I lack the ability to investigate: >>> >>> 1. Maybe the dblink.dll build is pulling in libpq.a rather than >>> establishing a reference to libpq.dll.  If so, the wrong things would >>> happen because libpq.a won't contain the src/common/ files that >>> libpq needs.  (It seems like libpq.a is an active hazard given >>> this.  Why are we building it at all?) >>> >>> 2. Maybe we need a --version-script option or something equivalent >>> to get libpq.dll's references to be preferentially resolved internally >>> rather than to the backend.  But this doesn't really explain why it >>> worked properly before. >>> >>> >> >> >> >> I will see if I can determine if 1) is the cause. I don't know enough, >> or in fact anything, about 2), so don;t know that I can help there >> without advice. >> >> > > > > It certainly looks like it's not linked to libpq.dll: > >    Microsoft (R) COFF/PE Dumper Version 14.15.26726.0 >    Copyright (C) Microsoft Corporation.  All rights reserved. > > >    Dump of file >    \cygwin64\home\andrew\\bf64\root\HEAD\inst\lib\postgresql\dblink.dll > >    File Type: DLL > >       Image has the following dependencies: > >         postgres.exe >         cygcrypto-1.0.0.dll >         cygwin1.dll >         cygssl-1.0.0.dll >         KERNEL32.dll > > > I'll build an earlier version to do a comparison just to make sure we're > seeing the right thing. > > > cheers > > andrew building from git and using the attached patch that is used for all cygwin packages on latest cygwin $ uname -svrm CYGWIN_NT-10.0 2.11.1(0.329/5/3) 2018-09-05 10:24 x86_64 I do not see the problem ============== creating database "contrib_regression" ============== CREATE DATABASE ALTER DATABASE ============== running regression test queries ============== test paths ... ok test dblink ... ok ============== shutting down postmaster ============== $ objdump -x usr/lib/postgresql/dblink.dll |grep "DLL Name:" DLL Name: postgres.exe DLL Name: cygpq-5.dll DLL Name: cygwin1.dll DLL Name: KERNEL32.dll I am wondering if I am testing the same ----------------------------------------------- $ git log |head commit 8bddc864000f56d396621d4ad0f13e8e1872ddf5 Author: Stephen Frost Date: Fri Sep 28 19:04:50 2018 -0400 Add application_name to connection authorized msg The connection authorized message has quite a bit of useful information in it, but didn't include the application_name (when provided), so let's add that as it can be very useful. --------------------------------------------------- --- Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft. https://www.avast.com/antivirus --------------D2F1A1B8A214AB8C36C1EB58 Content-Type: text/plain; charset=UTF-8; name="cygwin-soversion.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="cygwin-soversion.diff" LS0tIG9yaWdzcmMvcG9zdGdyZXNxbC05LjQuMi9zcmMvTWFrZWZpbGUuc2hsaWIJMjAxNS0w NS0yMCAwMDozMzo1OC4wMDAwMDAwMDAgKzAyMDAKKysrIHNyYy9NYWtlZmlsZ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