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 1mXX8q-0001Ck-BR for psycopg@arkaria.postgresql.org; Mon, 04 Oct 2021 23:13:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mXX8o-0007bn-9v for psycopg@arkaria.postgresql.org; Mon, 04 Oct 2021 23:13:02 +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 1mXX8o-0007bf-2B for psycopg@lists.postgresql.org; Mon, 04 Oct 2021 23:13:02 +0000 Received: from mail-vs1-xe2e.google.com ([2607:f8b0:4864:20::e2e]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mXX8l-0004Ic-60 for psycopg@lists.postgresql.org; Mon, 04 Oct 2021 23:13:01 +0000 Received: by mail-vs1-xe2e.google.com with SMTP id w13so3560380vsa.2 for ; Mon, 04 Oct 2021 16:12:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jYe/pg4L3THKabSiR/1qPV1V/bhThOiCOqos5W4+QN8=; b=qwir9UH/NlNWjvIQFo4ZbIY2c/U3m1fMOVQ2mWwDCcu5OX13uH6NfsRI+lHj0esubR 3NahGMC3+3EK4x88KzUhd/nlbRPM8Zw7hQnHqlY+i+Eq+k/5W36gwUdNSrY1X7PPS23/ 1RgtGuEgZleEV54r3DiNiGMGczkAVpZzbWJJnXwKFFSiDNH9V31dcKHe+yygcvLYXZFA sFnb48bWND1blsFhjqgiE9JOY+Hr7d3n8ym/13o4PRG4JpqxFsSqBea14B4W7NlNARAQ 1nkKC8UL6ldAtc2A/EGnm0SuFDwNsRFa9CoBrw0598Str9fuLoxD9ijsurlfqNO6ceWW 2uiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jYe/pg4L3THKabSiR/1qPV1V/bhThOiCOqos5W4+QN8=; b=Pr99qBeFad7ziXf251d5Ju4d3DbhghzL2Dxf7kvnMxUrrBeFBP5A6x/iSdcdpGFnnP RpaQrIJOmgFcUelIpZriAT8WE+gordDZZWXWleX661eSvaXGvF8nfP+AoWB4W+gxNnDV 4GeKrQgmlE5jzoGoOQSJB7DYnGw1aCXzyd4W31pw+3TEsCDgnWq008PV8qMD5LOtZSv8 u2ly/wqiL3zR4df1JklnXjjjM1/xKH5ESBlaFH4gq1E/2SjmUtYsOhWG4BnZc0k2rVyk lAoLlN5zg2zansDx8cl/k38RB/JgPVKK8yefd5oUFF0O6eX6oyXVHgddFlkq9uQP2ZEM dEXA== X-Gm-Message-State: AOAM532uOyvs0aWIXpBdhXySWLGOSVjCEoBNICqUE3y/ik9DGF40p7hH P6Nx0s7bXCuAEHqq46ULjXw/GR+Eoed1QSYFanc= X-Google-Smtp-Source: ABdhPJzcWiyjNEMNA/IAS6S2/XiweglZgo+QbRobwfp9Kl7mi5nNymxpu173VkPDl7nIcXAWl4/7b3OFCJdxcnD0LVo= X-Received: by 2002:a05:6102:3bc1:: with SMTP id a1mr6915744vsv.16.1633389178134; Mon, 04 Oct 2021 16:12:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Daniele Varrazzo Date: Tue, 5 Oct 2021 01:12:47 +0200 Message-ID: Subject: Re: How to build statically on Windows To: Dan Davis Cc: psycopg@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Dan, On Tue, 5 Oct 2021 at 01:01, Dan Davis wrote: > > Can anyone give me a solution to build psycopg2 statically on Windows? > > I have succeeded in building it, but when I run dumpbin /dependents on the generated file (the PYD file), it still depends on libpq.dll even when I pass --static-libpq. I haven't personally used --static-libpq in a long time, and neither have I used windows for a while. As far as I know that part of the set up might have bitrotten. If anyone can help Dan it would be appreciated. Dan, there is a ticket/MR in the tracker of which I've never been able to make completely sense: https://github.com/psycopg/psycopg2/pull/758 Would you like to check if that's the issue that doesn't allow building the lib statically and if so can you propose a MR or just acknowledge that the proposed one works as expected? Thank you everyone -- Daniele