|
From: Xiaobo Gu <gux...@gm...> - 2011-01-25 14:25:13
|
Hi, I am new to GCC and MinGW, these days I am trying to build the 64bit PostgreSQL for Windows platform. People suggest using the popular MinGW toolchain, and because PostgresQL source code is only compatible with only a few versions of GCC, so I must using the only 4.5.0 and 3.4.4 versions, these got me more confused, I think I won't get the work done before I clearly understand GCC MinGW and MSYS. There are my questions: 1. MinGW provides header, lib and dll runtime files to build Windows applications, GCC is just a compiler(just for C), what's the relationship between them? Does GCC must use the header/lib/dll files provided by MinGW. 2. Do they must be used togather, and with the same version? 3. Where can I download the 4.5.0 or 3.4.4 64bit versions of them. 4. I installed TDM's GCC for Win64, but there are same files in the bin and x86_64-w64-mingw32\bin directory, such as ar.exe, as.exe etc, are they same, what's the difference between them if not. Many thanks. Xiaobo Gu |
|
From: JonY <jo...@us...> - 2011-01-25 14:47:48
Attachments:
0xED74C077.asc
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 1/25/2011 22:25, Xiaobo Gu wrote: > Hi, > I am new to GCC and MinGW, these days I am trying to build the 64bit > PostgreSQL for Windows platform. People suggest using the popular > MinGW toolchain, and because PostgresQL source code is only compatible > with only a few versions of GCC, so I must using the only 4.5.0 and > 3.4.4 versions, these got me more confused, I think I won't get the > work done before I clearly understand GCC MinGW and MSYS. There are my > questions: > > 1. MinGW provides header, lib and dll runtime files to build Windows > applications, GCC is just a compiler(just for C), what's the > relationship between them? Does GCC must use the header/lib/dll files > provided by MinGW. GCC the compiler needs to know about the C functions that you use, so it uses the headers for those information. The libraries are there for the linker to produce executables. There are also dlls such as mingwm10.dll, they are not used directly by gcc, but used to support programs built by gcc. > 2. Do they must be used togather, and with the same version? > Yes, but versions are not tightly bound, usually, the more recent, the better. > 3. Where can I download the 4.5.0 or 3.4.4 64bit versions of them. > There is no 3.x for win64, see mingw-w64 project for 64bit target support. > 4. I installed TDM's GCC for Win64, but there are same files in the > bin and x86_64-w64-mingw32\bin directory, such as ar.exe, as.exe etc, > are they same, what's the difference between them if not. Use only those in the top level directory, the others are there to support GCC, not for the user. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) iEYEARECAAYFAk0+3e8ACgkQp56AKe10wHevVgCeMAA37GT8mroLbsj2zW6Zve9H G2wAoIaeCAaswRj8KfkFW6Njtt3hboAO =oG17 -----END PGP SIGNATURE----- |
|
From: Xiaobo Gu <gux...@gm...> - 2011-01-27 01:56:44
|
Hi, Thanks for your explanation, and there are a few others, 1. Where to download specific versions of GCC for 64bit Windows, because the packaged PostgreSQL source is only compatible of 4.5.0 and 3.4.4 GCC. 2. Is there a compatibility list telling which version of GCC is compatible with which versions of MinGW64 3. Can you help with this :http://archives.postgresql.org/pgsql-hackers/2011-01/msg01959.php Thanks a lot On Tue, Jan 25, 2011 at 10:27 PM, JonY <jo...@us...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 1/25/2011 22:25, Xiaobo Gu wrote: >> Hi, >> I am new to GCC and MinGW, these days I am trying to build the 64bit >> PostgreSQL for Windows platform. People suggest using the popular >> MinGW toolchain, and because PostgresQL source code is only compatible >> with only a few versions of GCC, so I must using the only 4.5.0 and >> 3.4.4 versions, these got me more confused, I think I won't get the >> work done before I clearly understand GCC MinGW and MSYS. There are my >> questions: >> >> 1. MinGW provides header, lib and dll runtime files to build Windows >> applications, GCC is just a compiler(just for C), what's the >> relationship between them? Does GCC must use the header/lib/dll files >> provided by MinGW. > > GCC the compiler needs to know about the C functions that you use, so it > uses the headers for those information. The libraries are there for the > linker to produce executables. There are also dlls such as mingwm10.dll, > they are not used directly by gcc, but used to support programs built by > gcc. > >> 2. Do they must be used togather, and with the same version? >> > > Yes, but versions are not tightly bound, usually, the more recent, the > better. > >> 3. Where can I download the 4.5.0 or 3.4.4 64bit versions of them. >> > > There is no 3.x for win64, see mingw-w64 project for 64bit target support. > >> 4. I installed TDM's GCC for Win64, but there are same files in the >> bin and x86_64-w64-mingw32\bin directory, such as ar.exe, as.exe etc, >> are they same, what's the difference between them if not. > > Use only those in the top level directory, the others are there to > support GCC, not for the user. > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.16 (MingW32) > > iEYEARECAAYFAk0+3e8ACgkQp56AKe10wHevVgCeMAA37GT8mroLbsj2zW6Zve9H > G2wAoIaeCAaswRj8KfkFW6Njtt3hboAO > =oG17 > -----END PGP SIGNATURE----- > |
|
From: JonY <jo...@us...> - 2011-01-27 02:17:14
Attachments:
0xED74C077.asc
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 1/27/2011 09:56, Xiaobo Gu wrote: > Hi, > Thanks for your explanation, and there are a few others, > 1. Where to download specific versions of GCC for 64bit Windows, > because the packaged PostgreSQL source is only compatible of 4.5.0 and > 3.4.4 GCC. > Go see the mingw-w64 wiki for download and install instructions. > 2. Is there a compatibility list telling which version of GCC is > compatible with which versions of MinGW64 > mingw-w64 requires at least 4.5.1, older releases for 64bit uses a different ABI, so using the new version saves you the trouble of recompiling all your libraries. > 3. Can you help with this > :http://archives.postgresql.org/pgsql-hackers/2011-01/msg01959.php > In <http://archives.postgresql.org/pgsql-hackers/2011-01/msg02308.php>, You used the MSYS compiler for MSYS development, wrong compiler. I really wonder why you were able to get it. Yes mingw-w64 can produce 64bit executables, but its a separate project from mingw32. See <http://mingw-w64.sourceforge.net/>. PS. Please don't top post, it breaks threading. Thanks. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) iEYEARECAAYFAk1A0R4ACgkQp56AKe10wHcjHgCdHHfFN8vfijC3iFYIAedSR+Aa 3EAAniWZ+OJ2GaH9bJYVbGUQosEnxICB =90Sr -----END PGP SIGNATURE----- |
|
From: Xiaobo Gu <gux...@gm...> - 2011-01-27 03:02:36
|
MSYS does not provide GCC, it only provides some UNIX like tools on Windows to emulate the *NIX environment. By the way, what does "top post" mean? On Thu, Jan 27, 2011 at 9:57 AM, JonY <jo...@us...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 1/27/2011 09:56, Xiaobo Gu wrote: >> Hi, >> Thanks for your explanation, and there are a few others, >> 1. Where to download specific versions of GCC for 64bit Windows, >> because the packaged PostgreSQL source is only compatible of 4.5.0 and >> 3.4.4 GCC. >> > > Go see the mingw-w64 wiki for download and install instructions. > >> 2. Is there a compatibility list telling which version of GCC is >> compatible with which versions of MinGW64 >> > > mingw-w64 requires at least 4.5.1, older releases for 64bit uses a > different ABI, so using the new version saves you the trouble of > recompiling all your libraries. > >> 3. Can you help with this >> :http://archives.postgresql.org/pgsql-hackers/2011-01/msg01959.php >> > > In <http://archives.postgresql.org/pgsql-hackers/2011-01/msg02308.php>, > You used the MSYS compiler for MSYS development, wrong compiler. I > really wonder why you were able to get it. > > Yes mingw-w64 can produce 64bit executables, but its a separate project > from mingw32. See <http://mingw-w64.sourceforge.net/>. > > PS. > Please don't top post, it breaks threading. Thanks. > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.16 (MingW32) > > iEYEARECAAYFAk1A0R4ACgkQp56AKe10wHcjHgCdHHfFN8vfijC3iFYIAedSR+Aa > 3EAAniWZ+OJ2GaH9bJYVbGUQosEnxICB > =90Sr > -----END PGP SIGNATURE----- > |
|
From: JonY <jo...@us...> - 2011-01-27 03:31:18
Attachments:
0xED74C077.asc
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 1/27/2011 11:02, Xiaobo Gu wrote: > MSYS does not provide GCC, it only provides some UNIX like tools on > Windows to emulate the *NIX environment. > Yes it does, you are using it. > D:\devproj\postgresql-9.0.2>gcc -v > Reading specs from /usr/lib/gcc/i686-pc-msys/3.4.4/specs - From your post on the psgl ML, notice the "i686-pc-msys" part, you are using MSYS GCC instead of MinGW GCC, wrong compiler. > By the way, what does "top post" mean? > You are top-posting again. See <https://secure.wikimedia.org/wikipedia/en/wiki/Posting_style#Top-posting> for examples. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) iEYEARECAAYFAk1A5vQACgkQp56AKe10wHdzrQCfR3/CLxyuB0KXWEMip/7DPGYr ruIAn3r++7jssEO+I3cxHp0N/1bm8jy+ =pHoB -----END PGP SIGNATURE----- |
|
From: JonY <jo...@us...> - 2011-01-27 10:19:58
Attachments:
0xED74C077.asc
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 1/27/2011 14:43, Xiaobo Gu wrote: >> On 1/27/2011 11:02, Xiaobo Gu wrote: >>> MSYS does not provide GCC, it only provides some UNIX like tools on >>> Windows to emulate the *NIX environment. >>> >> >> Yes it does, you are using it. > > OK, my fault, I now adjust the environments of my two computers(one is > 32bit Windows XP SP3, the other one is 64bit Windows 7 Home basic) to > the same setup layout: > 1.MinGW64 is installed into D:\Amber\Devtool\MinGW64-1.0-20100913; > 2.MSYS in installed into D:\Amber\Devtool\msys > 3.Add D:/Amber/Devtool/MinGW64-1.0-20100913 /mingw to > D:\Amber\Devtool\msys\etc\fstab > 4. PostgreSQL source code is in D:\Amber\devproj\postgresql-9.0.2 > >>From the MSYS sh prompt(D:\Amber\Devtool\msys\msys.bat), I do the following: > 1. gcc -v > sh: gcc: command not found > 2. configure --without-zlib --host=x86_64-w64-mingw32 > --with-system-tzdata=/usr/share/zoneinfo > The content of config.log file is as following: Next time, please post your giant file as an attachment instead of inline. Looks like accept() detection doesn't work. You'll have to compare accept() declaration to the list of prototypes configure attempts to test. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) iEYEARECAAYFAk1BRrkACgkQp56AKe10wHcrQACfZiHJjF1qfccF3Va83wrW+gJ4 dPcAn2amjoamy2mcDSpoRzpJzjXS/na3 =n6Mt -----END PGP SIGNATURE----- |
|
From: Charles W. <cwi...@us...> - 2011-01-27 16:00:14
|
On 1/26/2011 10:31 PM, JonY wrote: > On 1/27/2011 11:02, Xiaobo Gu wrote: >> MSYS does not provide GCC, it only provides some UNIX like tools on >> Windows to emulate the *NIX environment. > > > Yes it does, you are using it. Right. Here's the story: MSYS, as normally used by end users like Xiaobo Gu, only provides unix-like tools to emulate the *NIX environment, as he says. However, those tools have to be compiled somehow, right? So, there IS an MSYS gcc -- that's what we use to create the MSYS tools. Since this is open source, we don't hide that compiler -- anybody can install it by selecting "mingw-get install msys-system-builder" (or "mingw-get install msys-gcc msys-g++" but then you'd be missing some other bits). However, MOST of our end users should NOT install the msys-system-builder or the msys-gcc packages -- because MOST end users don't want to build msys apps; they want to build MinGW ones. So, instead, they should install the mingw gcc (which is always installed, by mingw-get, as currently distributed). (FWIW, you can install the "regular" (non msys-system-builder) msys stuff and use it with the mingw64 project's gcc if you like) -- Chuck |
|
From: JonY <jo...@us...> - 2011-01-27 16:20:56
Attachments:
0xED74C077.asc
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 1/28/2011 00:00, Charles Wilson wrote: > On 1/26/2011 10:31 PM, JonY wrote: >> On 1/27/2011 11:02, Xiaobo Gu wrote: >>> MSYS does not provide GCC, it only provides some UNIX like tools on >>> Windows to emulate the *NIX environment. >> >> >> Yes it does, you are using it. > > Right. Here's the story: > > MSYS, as normally used by end users like Xiaobo Gu, only provides > unix-like tools to emulate the *NIX environment, as he says. However, > those tools have to be compiled somehow, right? So, there IS an MSYS > gcc -- that's what we use to create the MSYS tools. > > Since this is open source, we don't hide that compiler -- anybody can > install it by selecting "mingw-get install msys-system-builder" (or > "mingw-get install msys-gcc msys-g++" but then you'd be missing some > other bits). > > However, MOST of our end users should NOT install the > msys-system-builder or the msys-gcc packages -- because MOST end users > don't want to build msys apps; they want to build MinGW ones. > Is there a good way to inform the user what they might be getting into, so to avoid such accidents? A warning might be a bit overkill. I guess its hard to deal with actual users. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) iEYEARECAAYFAk1Bm1UACgkQp56AKe10wHdBpACghIC4OrI8nHwvvc26sV1NdrJF nn0An3NvMefjp+ari6HnKjMfXvpmXgTO =hThs -----END PGP SIGNATURE----- |
|
From: Charles W. <cwi...@us...> - 2011-01-27 16:27:53
|
On 1/27/2011 11:20 AM, JonY wrote: > On 1/28/2011 00:00, Charles Wilson wrote: >> However, MOST of our end users should NOT install the >> msys-system-builder or the msys-gcc packages -- because MOST end users >> don't want to build msys apps; they want to build MinGW ones. > > > Is there a good way to inform the user what they might be getting into, > so to avoid such accidents? A warning might be a bit overkill. I guess > its hard to deal with actual users. Well, maybe we could remove the 'MSYS System Builder' option from the GUI wrapper; that way newbies won't see it and click by mistake (or "I want everything!"). You could then only get it if you manually executed mingw-get install msys-system-builder That's probably fair, for now. The "real" GUI installer, once it is created, will probably have a mechanism (mouseover popups?) to display the <description> tags in the xml -- which currently contains a pretty good explanation that "you probably don't want this" already, IIRC. -- Chuck |
|
From: Keith M. <kei...@nt...> - 2011-01-27 18:58:22
|
On 27/01/11 16:27, Charles Wilson wrote: > Well, maybe we could remove the 'MSYS System Builder' option from > the GUI wrapper; that way newbies won't see it and click by mistake > (or "I want everything!"). You could then only get it if you > manually executed > > mingw-get install msys-system-builder > > That's probably fair, for now. I think so. With the benefit of hindsight, perhaps offering it as the current Q&D wrapper does, wasn't such a smart move. > The "real" GUI installer, once it is created, will probably have a > mechanism (mouseover popups?) to display the<description> ... My vision is modelled on synaptic/apt-get; selecting the package in the GUI list brings the description into a text pane below the list. Also available to the CLI version; with a build from CVS head -- which isn't accessible during the current SF outage mingw-get show msys-system-builder will display it on stdout. > tags in the xml -- which currently contains a pretty good explanation > that "you probably don't want this" already, IIRC. Actually, although some of the MSYS package descriptions do include such warnings, this particular one doesn't; perhaps we should add it. -- Regards, Keith. |
|
From: Jean-François B. <jea...@be...> - 2011-01-27 21:14:46
|
Am 27/01/2011 17:27, schrieb Charles Wilson: > On 1/27/2011 11:20 AM, JonY wrote: >> On 1/28/2011 00:00, Charles Wilson wrote: >>> However, MOST of our end users should NOT install the >>> msys-system-builder or the msys-gcc packages -- because MOST end users >>> don't want to build msys apps; they want to build MinGW ones. >> >> Is there a good way to inform the user what they might be getting into, >> so to avoid such accidents? A warning might be a bit overkill. I guess >> its hard to deal with actual users. > Well, maybe we could remove the 'MSYS System Builder' option from the > GUI wrapper; that way newbies won't see it and click by mistake (or "I > want everything!"). You could then only get it if you manually executed > > mingw-get install msys-system-builder > > That's probably fair, for now. The "real" GUI installer, once it is > created, will probably have a mechanism (mouseover popups?) to display > the<description> tags in the xml -- which currently contains a pretty > good explanation that "you probably don't want this" already, IIRC. As a newbie needing an openSSL lib to build openLDAP on mingw, I found msys-openssl and linked it. The msys-openssl objects call the msys dll and the executable I get starts immediately ìn segmentation violation. Now it is obvious to me why this happened, but it was not before Chuck told me. It could be useful to newbies to say from the beginning that msys-* are unsuitable to build mingw binaries, perhaps in the release notes ? JF |
|
From: Xiaobo Gu <gux...@gm...> - 2011-01-27 06:49:52
|
On Thu, Jan 27, 2011 at 9:57 AM, JonY <jo...@us...> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 1/27/2011 09:56, Xiaobo Gu wrote: >> Hi, >> Thanks for your explanation, and there are a few others, >> 1. Where to download specific versions of GCC for 64bit Windows, >> because the packaged PostgreSQL source is only compatible of 4.5.0 and >> 3.4.4 GCC. >> > > Go see the mingw-w64 wiki for download and install instructions. > Can you please tell the direct URL for downloading 4.5.0 version of 64bit GCC |