Re: [Mingw-w64-public] basic question
2009/7/2 McWilliams, Steven steven_mcwilli...@bmc.com: Attached is the config.log file from the postgres configuration attempt. The accept() function is a socket library function. The config.log file shows it trying to compile a bunch of different test programs using accept with different function signatures. Note that when I configure postgres for compilation on a 32 bit windows platform using mingw (not mingw-w64) it uses the signature extern unsigned int PASCAL accept (unsigned int, struct sockaddr *, int *);. From: JonY [10wa...@gmail.com] Sent: Thursday, July 02, 2009 9:54 AM To: mingw-w64-public@lists.sourceforge.net Cc: McWilliams, Steven Subject: Re: [Mingw-w64-public] basic question On 7/2/2009 21:40, McWilliams, Steven wrote: If I have the msys /etc/fstab setting /c/mingw_64 /mingw and I try to compile a little hello-world type C program via gcc.exe hello.c I get the error sh: gcc exe: command not found, which makes sense since c:\mingw_64\bin does not have a gcc.exe file. If I have the msys /etc/fstab setting /c/mingw_64/mingw /mingw and I try to compile via gcc.exe hello.c I get the error gcc.exe: CreateProcess: No such file or directory. The only way I can get the compilation to work is if I have the msys /etc/fstab setting /c/mingw_64 /mingw and I try to compile via x86_64-w64-mingw32-gcc.exe hello.c, since x86_64-w64-mingw32-gcc.exe is present in c:\mingw_64\bin. That works ok for compiling a little hello-world type C program, however it fails when I try to compile postgres. If I try to configure postgres for compilation using CC=x86_64-w64-mingw32-gcc.exe ./configure --without-zlib --prefix=/c/postgresql it generates the following error: ... checking types of arguments for accespt()... configure: error: could not determine argument types Hi, You are using the correct x86_64-w64-mingw32-gcc.exe frontend. The issue is accespt(), where is it supposed to come from? Its not on MSDN. Please post the config.log file, the more details, the better. Thanks. -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public Well the issue is here configure:15432: x86_64-w64-mingw32-gcc.exe -c -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I./src/include/port/win32 -DEXEC_BACKEND conftest.c 5 conftest.c:50: error: conflicting types for 'accept' c:/mingw_64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1291: note: previous declaration of 'accept' was here This configure test fails, as it uses a wrong function definition of accept. This configure test needs to be fixed, then it will continue build. Btw be sure that it uses ws2_32 as library and not wsock32 as the later doesn't exists on x64 platforms. Cheers, Kai -- | (\_/) This is Bunny. Copy and paste | (='.'=) Bunny into your signature to help | ()_() him gain world domination -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] basic question
On 7/2/2009 21:40, McWilliams, Steven wrote: If I have the msys /etc/fstab setting /c/mingw_64 /mingw and I try to compile a little hello-world type C program via gcc.exe hello.c I get the error sh: gcc exe: command not found, which makes sense since c:\mingw_64\bin does not have a gcc.exe file. If I have the msys /etc/fstab setting /c/mingw_64/mingw /mingw and I try to compile via gcc.exe hello.c I get the error gcc.exe: CreateProcess: No such file or directory. The only way I can get the compilation to work is if I have the msys /etc/fstab setting /c/mingw_64 /mingw and I try to compile via x86_64-w64-mingw32-gcc.exe hello.c, since x86_64-w64-mingw32-gcc.exe is present in c:\mingw_64\bin. That works ok for compiling a little hello-world type C program, however it fails when I try to compile postgres. If I try to configure postgres for compilation using CC=x86_64-w64-mingw32-gcc.exe ./configure --without-zlib --prefix=/c/postgresql it generates the following error: ... checking types of arguments for accespt()... configure: error: could not determine argument types Hi, You are using the correct x86_64-w64-mingw32-gcc.exe frontend. The issue is accespt(), where is it supposed to come from? Its not on MSDN. Please post the config.log file, the more details, the better. Thanks. -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] basic question
Hmm. So the SOCKET typedef in winsock2.h has changed from 'unsigned int' in mingw to 'int *' in mingw64, and the postgres configure tool is confused by this. I had been assuming that postgres builds on 64 bit windows using mingw64 was something that was already working, however this may not be the case. I will ask on the postgres mailing list and see if anyone has done it yet. Thanks, Steve From: Kai Tietz [ktiet...@googlemail.com] Sent: Thursday, July 02, 2009 10:40 AM To: McWilliams, Steven Cc: JonY; mingw-w64-public@lists.sourceforge.net Subject: Re: [Mingw-w64-public] basic question 2009/7/2 McWilliams, Steven steven_mcwilli...@bmc.com: Attached is the config.log file from the postgres configuration attempt. The accept() function is a socket library function. The config.log file shows it trying to compile a bunch of different test programs using accept with different function signatures. Note that when I configure postgres for compilation on a 32 bit windows platform using mingw (not mingw-w64) it uses the signature extern unsigned int PASCAL accept (unsigned int, struct sockaddr *, int *);. From: JonY [10wa...@gmail.com] Sent: Thursday, July 02, 2009 9:54 AM To: mingw-w64-public@lists.sourceforge.net Cc: McWilliams, Steven Subject: Re: [Mingw-w64-public] basic question On 7/2/2009 21:40, McWilliams, Steven wrote: If I have the msys /etc/fstab setting /c/mingw_64 /mingw and I try to compile a little hello-world type C program via gcc.exe hello.c I get the error sh: gcc exe: command not found, which makes sense since c:\mingw_64\bin does not have a gcc.exe file. If I have the msys /etc/fstab setting /c/mingw_64/mingw /mingw and I try to compile via gcc.exe hello.c I get the error gcc.exe: CreateProcess: No such file or directory. The only way I can get the compilation to work is if I have the msys /etc/fstab setting /c/mingw_64 /mingw and I try to compile via x86_64-w64-mingw32-gcc.exe hello.c, since x86_64-w64-mingw32-gcc.exe is present in c:\mingw_64\bin. That works ok for compiling a little hello-world type C program, however it fails when I try to compile postgres. If I try to configure postgres for compilation using CC=x86_64-w64-mingw32-gcc.exe ./configure --without-zlib --prefix=/c/postgresql it generates the following error: ... checking types of arguments for accespt()... configure: error: could not determine argument types Hi, You are using the correct x86_64-w64-mingw32-gcc.exe frontend. The issue is accespt(), where is it supposed to come from? Its not on MSDN. Please post the config.log file, the more details, the better. Thanks. -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public Well the issue is here configure:15432: x86_64-w64-mingw32-gcc.exe -c -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I./src/include/port/win32 -DEXEC_BACKEND conftest.c 5 conftest.c:50: error: conflicting types for 'accept' c:/mingw_64/lib/gcc/../../x86_64-w64-mingw32/include/winsock2.h:1291: note: previous declaration of 'accept' was here This configure test fails, as it uses a wrong function definition of accept. This configure test needs to be fixed, then it will continue build. Btw be sure that it uses ws2_32 as library and not wsock32 as the later doesn't exists on x64 platforms. Cheers, Kai -- | (\_/) This is Bunny. Copy and paste | (='.'=) Bunny into your signature to help | ()_() him gain world domination -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] basic question
It might be easier to use the win32 hosted toolchain (this will easily run on win32 or win64). Put it anywhere in your system, like /opt/win64. Then, just put /opt/win64/bin in your path, and use the binaries that are in there. On Wed, Jul 1, 2009 at 6:46 PM, McWilliams, Stevensteven_mcwilli...@bmc.com wrote: I have a basic question about mingw-w64 that I need help with please. In the past I have used msys+mingw to compile postgres to run on 32 bit windows platforms. Now I would like to be able to compile postgres to run on 64 bit windows platforms, for which I am trying to use msys+mingw-w64. I downloaded the mingw-w64_x86-64_mingw32_4.4.0-1.zip file and unzipped it into c:\mingw_64 on my 64 bit windows platform. How do I hook it up for use with msys however? Normally I edit the msys /etc/fstab file and add the entry /c/mingw /mingw to do so, so my first assumption was to change the entry to /c/mingw_64 /mingw in this case, or perhaps c/mingw_64/mingw /mingw, however neither approach ends up with a version of gcc.exe in the msys path which works. Seems like I am missing something fundamental about how to use mingw-w64. Thanks in advance, Steve -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public -- ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public