pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA
6+ messages / 4 participants
[nested] [flat]
* BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA
@ 2020-12-14 20:47 PG Bug reporting form <noreply@postgresql.org>
2021-01-04 18:00 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Alexander Lakhin <exclusion@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: PG Bug reporting form @ 2020-12-14 20:47 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: mats.stenfeldt@gmail.com
The following bug has been logged on the website:
Bug reference: 16774
Logged by: Mats Stenfeldt
Email address: mats.stenfeldt@gmail.com
PostgreSQL version: 13.0
Operating system: Windows 7 64-bit
Description:
Build environment: MINGW64, GCC (Rev6, Built by MSYS2 project) 10.2.0
REL=REL_13_STABLE
Build Steps:
1. git clone git://git.postgresql.org/git/postgresql.git source
2. rel=REL_13_STABLE
3. git checkout $rel
4. source=/y/builds/postgres/source/
5. dist=/y/builds/postgres/dist/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?
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA
2020-12-14 20:47 BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA PG Bug reporting form <noreply@postgresql.org>
@ 2021-01-04 18:00 ` Alexander Lakhin <exclusion@gmail.com>
2021-03-08 15:57 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Yaco312 <yannick.collette@ultra-ft.com>
2021-03-08 16:54 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Yannick Collette <yannickcollette@gmail.com>
0 siblings, 2 replies; 6+ messages in thread
From: Alexander Lakhin @ 2021-01-04 18:00 UTC (permalink / raw)
To: mats.stenfeldt@gmail.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
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
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA
2020-12-14 20:47 BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA PG Bug reporting form <noreply@postgresql.org>
2021-01-04 18:00 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Alexander Lakhin <exclusion@gmail.com>
@ 2021-03-08 15:57 ` Yaco312 <yannick.collette@ultra-ft.com>
1 sibling, 0 replies; 6+ messages in thread
From: Yaco312 @ 2021-03-08 15:57 UTC (permalink / raw)
To: pgsql-bugs
Hello,
I have the exact same problem with REL_11_STABLE using the following
configuration. No errors at compilation. Tried your work around and still
having same problem.
# gcc --version
gcc.exe (Rev6, Built by MSYS2 project) 10.2.0
./configure --host=x86_64-w64-mingw32 --prefix=/c/postgresql/pg11/
--with-openssl --with-libxml
make (no errors)
make install (no errors)
initdb.exe error
The procedure entry point CreateProcessAsUserA could not be located in
dynamic link library...
Applied solution below without any success.
CFLAGS="-D WINVER=0x0600 -D _WIN32_WINNT=0x0600" LIBS="-ladvapi32"
./configure --host=x86_64-w64-mingw32 --prefix=/c/postgresql/pg11/
--with-openssl --with-libxml
Thanks in advance for your help.
Yannick
--
Sent from: https://www.postgresql-archive.org/PostgreSQL-bugs-f2117394.html
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA
2020-12-14 20:47 BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA PG Bug reporting form <noreply@postgresql.org>
2021-01-04 18:00 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Alexander Lakhin <exclusion@gmail.com>
@ 2021-03-08 16:54 ` Yannick Collette <yannickcollette@gmail.com>
2021-03-10 08:01 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Alexander Lakhin <exclusion@gmail.com>
1 sibling, 1 reply; 6+ messages in thread
From: Yannick Collette @ 2021-03-08 16:54 UTC (permalink / raw)
To: Alexander Lakhin <exclusion@gmail.com>; +Cc: mats.stenfeldt@gmail.com; pgsql-bugs@lists.postgresql.org
Hello,
I have the exact same problem with source code 11.11 using the following
configuration. No errors at compilation. Tried your work around and still
having same problem.
# gcc --version
gcc.exe (Rev6, Built by MSYS2 project) 10.2.0
./configure --host=x86_64-w64-mingw32 --prefix=/c/postgresql/pg11/
--with-openssl --with-libxml
make (no errors)
make install (no errors)
initdb.exe error
The procedure entry point CreateProcessAsUserA could not be located in
dynamic link library...
Applied solution below without any success.
CFLAGS="-D WINVER=0x0600 -D _WIN32_WINNT=0x0600" LIBS="-ladvapi32"
./configure --host=x86_64-w64-mingw32 --prefix=/c/postgresql/pg11/
--with-openssl --with-libxml
Thanks in advance for your help.
Yannick
On Mon, 8 Mar 2021 at 11:46, Alexander Lakhin <exclusion@gmail.com> wrote:
> 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
>
>
>
>
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA
2020-12-14 20:47 BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA PG Bug reporting form <noreply@postgresql.org>
2021-01-04 18:00 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Alexander Lakhin <exclusion@gmail.com>
2021-03-08 16:54 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Yannick Collette <yannickcollette@gmail.com>
@ 2021-03-10 08:01 ` Alexander Lakhin <exclusion@gmail.com>
2021-03-16 19:10 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Yannick Collette <yannickcollette@gmail.com>
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Lakhin @ 2021-03-10 08:01 UTC (permalink / raw)
To: Yannick Collette <yannickcollette@gmail.com>; +Cc: mats.stenfeldt@gmail.com; pgsql-bugs@lists.postgresql.org
Hello Yannick,
08.03.2021 19:54, Yannick Collette wrote:
>
>
> Hello,
>
> I have the exact same problem with source code 11.11 using the
> following configuration. No errors at compilation. Tried your work
> around and still having same problem.
>
Please try the attached script. If it doesn't work for you, please
specify which Windows version you are using and I'll try to reproduce
your problem on my side. (Your complete script would be useful too.)
Best regards,
Alexander
Attachments:
make_check11.txt (text/plain, 2.0K) download
SET bitness=64& SET platform=x86_64
SET MD=c:\test\msys64
cd /D c:\
mkdir %MD%
mkdir %MD%\var\src
@REM Prepare 7-zip for expanding msys
powershell -Command "((new-object net.webclient).DownloadFile('https://www.7-zip.org/a/7za920.zip', '%TEMP%\7z.zip'))"
powershell -Command "$shell = New-Object -ComObject Shell.Application; $zip_src = $shell.NameSpace('%TEMP%\7z.zip'); $zip_dest = $shell.NameSpace('%TEMP%'); $zip_dest.CopyHere($zip_src.Items(), 1044)"
@REM Download and extract msys
powershell -Command "((new-object net.webclient).DownloadFile('http://repo.msys2.org/distrib/msys2-%platform%-latest.tar.xz', '%TEMP%\msys.tar.xz'))"
%TEMP%\7za.exe x %TEMP%\msys.tar.xz -so | %TEMP%\7za.exe x -oc:\test\ -aoa -si -ttar >%TEMP%/7z-msys.log
@REM Output bash script contained in this CMD
@for /f "delims=:" %%a in ('findstr -n "^___" %0') do @set "DELIMLINE=%%a"
@for /f "skip=%DELIMLINE% tokens=* eol=_" %%a in ('type %0') do @echo %%a>> %MD%\var\src\make_check.sh
@REM First run is performed to setup the environment
%MD%\usr\bin\bash --login -i -c exit >%TEMP%\msys-setup.log 2>&1
%MD%\usr\bin\bash --login -i -c ^" ^
pacman --noconfirm -Sy ^" >>%TEMP%\msys-update.log 2>&1
%MD%\usr\bin\bash --login -i /var/src/make_check.sh
SET LEVEL=%ERRORLEVEL%
exit /b %LEVEL%
___BASH_SCRIPT___
set -e
echo "`date -Iseconds`: Starting shell... ";
pacman --noconfirm -S tar make diffutils patch perl git flex bison mingw-w64-x86_64-libxml2 mingw-w64-x86_64-openssl mingw-w64-x86_64-gcc
export PATH="/mingw64/bin:/usr/bin/core_perl:$PATH"
cd /var/src
git clone https://git.postgresql.org/git/postgresql.git
cd postgresql
git checkout REL_11_STABLE
gcc --version
CFLAGS="-D WINVER=0x0600 -D _WIN32_WINNT=0x0600" LIBS="-ladvapi32" ./configure --host=x86_64-w64-mingw32 --without-zlib --with-openssl --with-libxml --prefix=/c/postgresql/pg11/ >configure.log
make -j4 >make.log
make install >install.log
# make check
/c/postgresql/pg11/bin/initdb.exe -D /c/postgresql/db
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA
2020-12-14 20:47 BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA PG Bug reporting form <noreply@postgresql.org>
2021-01-04 18:00 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Alexander Lakhin <exclusion@gmail.com>
2021-03-08 16:54 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Yannick Collette <yannickcollette@gmail.com>
2021-03-10 08:01 ` Re: BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA Alexander Lakhin <exclusion@gmail.com>
@ 2021-03-16 19:10 ` Yannick Collette <yannickcollette@gmail.com>
0 siblings, 0 replies; 6+ messages in thread
From: Yannick Collette @ 2021-03-16 19:10 UTC (permalink / raw)
To: Alexander Lakhin <exclusion@gmail.com>; +Cc: mats.stenfeldt@gmail.com; pgsql-bugs@lists.postgresql.org
Hello Alexander,
sorry for the late reply just got back to this problem and your solution
works.
FYI, I am compiling on Windows 2012 platform.
select version();
version
------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 11.11 on x86_64-w64-mingw32, compiled by
x86_64-w64-mingw32-gcc.exe (Rev8, Built by MSYS2 project) 10.2.0, 64-bit
Thanks again for your help!
Yannick
On Wed, 10 Mar 2021 at 03:01, Alexander Lakhin <exclusion@gmail.com> wrote:
> Hello Yannick,
> 08.03.2021 19:54, Yannick Collette wrote:
>
> Hello,
>
> I have the exact same problem with source code 11.11 using the following
> configuration. No errors at compilation. Tried your work around and still
> having same problem.
>
> Please try the attached script. If it doesn't work for you, please specify
> which Windows version you are using and I'll try to reproduce your problem
> on my side. (Your complete script would be useful too.)
>
> Best regards,
> Alexander
>
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2021-03-16 19:10 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-14 20:47 BUG #16774: PostgreSQL clean build MINGW64 gcc but initdb fails, cannot find startadress CreateProcessAsUserA PG Bug reporting form <noreply@postgresql.org>
2021-01-04 18:00 ` Alexander Lakhin <exclusion@gmail.com>
2021-03-08 15:57 ` Yaco312 <yannick.collette@ultra-ft.com>
2021-03-08 16:54 ` Yannick Collette <yannickcollette@gmail.com>
2021-03-10 08:01 ` Alexander Lakhin <exclusion@gmail.com>
2021-03-16 19:10 ` Yannick Collette <yannickcollette@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox