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 1kwU9G-0004nu-Ot for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Jan 2021 18:00:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kwU9F-0008UJ-HP for pgsql-bugs@arkaria.postgresql.org; Mon, 04 Jan 2021 18:00:05 +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 1kwU9F-0008UC-Ag for pgsql-bugs@lists.postgresql.org; Mon, 04 Jan 2021 18:00:05 +0000 Received: from mail-lf1-x12a.google.com ([2a00:1450:4864:20::12a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kwU9D-0006XH-HW for pgsql-bugs@lists.postgresql.org; Mon, 04 Jan 2021 18:00:04 +0000 Received: by mail-lf1-x12a.google.com with SMTP id s26so66367109lfc.8 for ; Mon, 04 Jan 2021 10:00:03 -0800 (PST) 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:content-transfer-encoding:content-language; bh=yqS0Tt6hj8qwZLAQ7Yor3O1OKLpiHvxz31/0WTgXre8=; b=G4aym521t0Pw1kuGRlZXxKN058xfvc4pwzZZypf7LrZ5iQ0Owaemzn9TBo0yGlbkNq fumX+mkIngILoE2ELp9C/VnRQMJ5kHRhs4MGq5gDN1k9zwBOHf9a0wmmKA7B5JFTnzkp XYxj+RCT38KrBkLMUFm+lQw7IW8nRXoa/kPS1hUQ5oOqi2cxjVVkcWjDTS7TL6gtGZ3l 1QH54bzkGvFOuvTtMWKy1FEBJdfbelVsp19ibFMJTIMRdNShs0ULMoxa93awaZ5PSZjB lZ9J7GQ8NT7qOVoj71M9acfUWQy6tHvQlbWOMsh6kyApghzUjH+uOCtK9cqUrQDniuvw gzSg== 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:content-transfer-encoding :content-language; bh=yqS0Tt6hj8qwZLAQ7Yor3O1OKLpiHvxz31/0WTgXre8=; b=TT1EPU3ywOe1NCcRz+dCIwyB/k7rJKGbwP7CopfHKIhJHGo+QT6uAhmNVvQATtr7nX icsGS1o0Z9dapN2DKzO6nat5X1rYUBr6yyeJa+8RBUchPEQgeeMJfn/HyR+VLobs9gsv Z4IuGd1UqdlporioOFSx2CWMbaEirOKfVvRCvXQlkLkfrTQH1yIBMUfTQj/JUpUj4jSS sWJIaKy4R9Ab5E5yX9AUZZ+Z8R3Jkp9r3PZiBsbrE/qVjYcVxApU+OXgmFZMl27mr4qb 26M/kuBtg0ix5or2uzEZ349nHbs/pqwCB7ZKq7THE7Bl9rxVu0A9E8fu1cEAJZzIcy0Y 2sTg== X-Gm-Message-State: AOAM5322KoBAC17+f4kYOupQs9U2r8rGniVTmW7ljmb469zVJFDGpp97 yuB/OVr9K50twG0dWMIqJug= X-Google-Smtp-Source: ABdhPJxEp0lWz+EpXC4pB7Gn1DtfoDs9es7tPA+qteQuAO3eHjB1HM5Dn8V9EG4dwquZjIzypEV+nQ== X-Received: by 2002:a05:651c:29c:: with SMTP id b28mr13469800ljo.330.1609783202940; Mon, 04 Jan 2021 10:00:02 -0800 (PST) Received: from [1.0.0.7] ([178.155.6.1]) by smtp.gmail.com with ESMTPSA id m7sm7372283lfb.146.2021.01.04.10.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 04 Jan 2021 10:00:02 -0800 (PST) Subject: Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA To: mats.stenfeldt@gmail.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form References: <16774-5fc947628f64c057@postgresql.org> From: Alexander Lakhin Message-ID: Date: Mon, 4 Jan 2021 21:00:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <16774-5fc947628f64c057@postgresql.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hello Mats, 14.12.2020 23:47, PG Bug reporting form wrote: > The following bug has been logged on the website: > > Bug reference: 16774 > ... > > Build environment: MINGW64, GCC (Rev6, Built by MSYS2 project) 10.2.0 > REL=REL_13_STABLE > ... > 6. $source/configure --host=x86_64-w64-mingw32 --prefix=$dist && make && > make install > > Clean build without errors. But when i try to run the following command: > initdb --pgdata=Y:\data\pgsqlgw --username=postgres --auth=trust > A messagebox pops up (translated from Swedish), Cannot find > procedurestartadress CreateProcessAsUserA in DLL-file KERNEL32.DLL. > and the program exits. > I have checked INITDB.EXE with Dependency Walker there is a call for: > CreateProcessAsUserA in KERNEL32.DLL [hint 235 (0x00EB)]. > Maybe the call should be for CreateProcessWithLogonW instead of > CreateProcessAsUserA? The CreateProcessAsUserA function is located in advapi32 now, so you should link with that library. For example: CFLAGS="-D WINVER=0x0600 -D _WIN32_WINNT=0x0600" LIBS="-ladvapi32" ./configure --host=x86_64-w64-mingw32 ... Best regards, Alexander