Thread: pgsql: Use --disable-auto-import linker switch in Mingw builds, too.
Use --disable-auto-import linker switch in Mingw builds, too. This is evidently the default on buildfarm member narwhal, but that is a pretty ancient Mingw version, and there is reason to think that more recent versions of GNU ld have this feature turned on by default. Since we are trying to achieve consistency of link behavior across all Windows toolchains, let's just make sure here. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/1c9acd5c86a71b8ab73bc139eb5e0ad292b9a7d4 Modified Files -------------- src/template/win32 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
On 02/12/2014 12:04 PM, Tom Lane wrote: > Use --disable-auto-import linker switch in Mingw builds, too. > > This is evidently the default on buildfarm member narwhal, but that > is a pretty ancient Mingw version, and there is reason to think that > more recent versions of GNU ld have this feature turned on by default. > Since we are trying to achieve consistency of link behavior across > all Windows toolchains, let's just make sure here. This appears to have broken configure on jacana (probably the most modern Mingw animal we have). cheers andrew
On 2014-02-14 19:44:11 -0500, Andrew Dunstan wrote: > > On 02/12/2014 12:04 PM, Tom Lane wrote: > >Use --disable-auto-import linker switch in Mingw builds, too. > > > >This is evidently the default on buildfarm member narwhal, but that > >is a pretty ancient Mingw version, and there is reason to think that > >more recent versions of GNU ld have this feature turned on by default. > >Since we are trying to achieve consistency of link behavior across > >all Windows toolchains, let's just make sure here. > > > This appears to have broken configure on jacana (probably the most modern > Mingw animal we have). According to a quick search that's caused by a bug in mingw... http://sourceforge.net/p/mingw/bugs/2020/ and some others. Any chance you could update to a slighly newer version? Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On 02/14/2014 08:18 PM, Andres Freund wrote: > On 2014-02-14 19:44:11 -0500, Andrew Dunstan wrote: >> On 02/12/2014 12:04 PM, Tom Lane wrote: >>> Use --disable-auto-import linker switch in Mingw builds, too. >>> >>> This is evidently the default on buildfarm member narwhal, but that >>> is a pretty ancient Mingw version, and there is reason to think that >>> more recent versions of GNU ld have this feature turned on by default. >>> Since we are trying to achieve consistency of link behavior across >>> all Windows toolchains, let's just make sure here. >> >> This appears to have broken configure on jacana (probably the most modern >> Mingw animal we have). > According to a quick search that's caused by a bug in mingw... > > http://sourceforge.net/p/mingw/bugs/2020/ and some others. > > Any chance you could update to a slighly newer version? This is not the mingw compiler, it's the mingw-w64 compiler, a subtle difference. I installed the compiler from <http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/rubenvb/gcc-4.8-release> and it got over this hurdle. Interestingly it says it's gcc 4.8.0, while the failing version claimed to be 4.8.1, even though this one is dated quite a lot later. However, the build now fails like this: make[1]: Entering directory `/home/pgrunner/bf/root/HEAD/pgsql.6024/contrib/pg_buffercache' x86_64-w64-mingw32-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -I. -I/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache -I../../src/include -I/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/src/include -I../pgsql/src/include/port/win32 -DEXEC_BACKEND -I/c/prog/3p64/include/libxml2 -I/c/prog/3p64/include -I/c/prog/3p64/openssl/include "-I/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/src/include/port/win32" -c -o pg_buffercache_pages.o /home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache/pg_buffercache_pages.c x86_64-w64-mingw32-gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -shared -o pg_buffercache.dll pg_buffercache_pages.o -L../../src/port -L../../src/common -Wl,--allow-multiple-definition -Wl,--disable-auto-import -L/c/prog/3p64/lib -L/c/prog/3p64/lib -L/c/prog/3p64/openssl/lib/VC -Wl,--as-needed -L../../src/backend -lpostgres -lpgcommon -lpgport -lintl -lxslt -lxml2 -lz -lwsock32 -lm -lws2_32 -lshfolder -Wl,--export-all-symbols -Wl,--out-implib=libpg_buffercache.a pg_buffercache_pages.o: In function `pg_buffercache_pages': c:/MinGW/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache/pg_buffercache_pages.c:119: undefined reference to `MainLWLockArray' c:/MinGW/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache/pg_buffercache_pages.c:160: undefined reference to `MainLWLockArray' collect2.exe: error: ld returned 1 exit status make[1]: *** [pg_buffercache.dll] Error 1 make[1]: Leaving directory `/home/pgrunner/bf/root/HEAD/pgsql.6024/contrib/pg_buffercache' Note that by this time "make check" has already passed. cheers andrew > > Greetings, > > Andres Freund >
On 2014-02-15 09:47:08 -0500, Andrew Dunstan wrote: > However, the build now fails like this: > pg_buffercache_pages.o: In function `pg_buffercache_pages': > c:/MinGW/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache/pg_buffercache_pages.c:119: > undefined reference to `MainLWLockArray' > c:/MinGW/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache/pg_buffercache_pages.c:160: > undefined reference to `MainLWLockArray' > collect2.exe: error: ld returned 1 exit status > make[1]: *** [pg_buffercache.dll] Error 1 > make[1]: Leaving directory > `/home/pgrunner/bf/root/HEAD/pgsql.6024/contrib/pg_buffercache' > > > Note that by this time "make check" has already passed. That's expected atm, that's breaking all the windows builds right now. Now that brolga is alive again, it should be able to progress past this... How often does it build master? Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On 02/15/2014 09:49 AM, Andres Freund wrote: > On 2014-02-15 09:47:08 -0500, Andrew Dunstan wrote: >> However, the build now fails like this: >> pg_buffercache_pages.o: In function `pg_buffercache_pages': >> c:/MinGW/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache/pg_buffercache_pages.c:119: >> undefined reference to `MainLWLockArray' >> c:/MinGW/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache/pg_buffercache_pages.c:160: >> undefined reference to `MainLWLockArray' >> collect2.exe: error: ld returned 1 exit status >> make[1]: *** [pg_buffercache.dll] Error 1 >> make[1]: Leaving directory >> `/home/pgrunner/bf/root/HEAD/pgsql.6024/contrib/pg_buffercache' >> >> >> Note that by this time "make check" has already passed. > That's expected atm, that's breaking all the windows builds right > now. Now that brolga is alive again, it should be able to progress past > this... How often does it build master? Twice a day as long as currawong and frogmouth aren't running. But it failed a few hours ago: gcc-4 -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute-Wformat-security -fno-strict-aliasing -fwrapv -g zic.o ialloc.o scheck.o localtime.o -L../../src/port-L../../src/common -Wl,--allow-multiple-definition -Wl,--disable-auto-import -L/usr/lib -L/usr/local/lib-Wl,--as-needed -lpgcommon -lpgport -lxslt -lxml2 -lz -lreadline -lcrypt -o zic.exe zic.o: In function `main': /cygdrive/d/cygwin-bf/root/HEAD/pgsql.3216/src/timezone/zic.c:511: undefined reference to `_optarg' /cygdrive/d/cygwin-bf/root/HEAD/pgsql.3216/src/timezone/zic.c:544: undefined reference to `_optarg' /cygdrive/d/cygwin-bf/root/HEAD/pgsql.3216/src/timezone/zic.c:533: undefined reference to `_optarg' /cygdrive/d/cygwin-bf/root/HEAD/pgsql.3216/src/timezone/zic.c:522: undefined reference to `_optarg' /cygdrive/d/cygwin-bf/root/HEAD/pgsql.3216/src/timezone/zic.c:555: undefined reference to `_optarg' /cygdrive/d/cygwin-bf/root/HEAD/pgsql.3216/src/timezone/zic.c:575: undefined reference to `_optind' /cygdrive/d/cygwin-bf/root/HEAD/pgsql.3216/src/timezone/zic.c:584: undefined reference to `_optind' /cygdrive/d/cygwin-bf/root/HEAD/pgsql.3216/src/timezone/zic.c:590: undefined reference to `_optind' collect2: ld returned 1 exit status cheers andrew cheers andrew
On 2014-02-15 10:02:39 -0500, Andrew Dunstan wrote: > > On 02/15/2014 09:49 AM, Andres Freund wrote: > >On 2014-02-15 09:47:08 -0500, Andrew Dunstan wrote: > >>However, the build now fails like this: > >> pg_buffercache_pages.o: In function `pg_buffercache_pages': > >> c:/MinGW/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache/pg_buffercache_pages.c:119: > >> undefined reference to `MainLWLockArray' > >> c:/MinGW/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache/pg_buffercache_pages.c:160: > >> undefined reference to `MainLWLockArray' > >> collect2.exe: error: ld returned 1 exit status > >> make[1]: *** [pg_buffercache.dll] Error 1 > >> make[1]: Leaving directory > >> `/home/pgrunner/bf/root/HEAD/pgsql.6024/contrib/pg_buffercache' > >> > >> > >>Note that by this time "make check" has already passed. > >That's expected atm, that's breaking all the windows builds right > >now. Now that brolga is alive again, it should be able to progress past > >this... How often does it build master? > > Twice a day as long as currawong and frogmouth aren't running. > > But it failed a few hours ago: > /cygdrive/d/cygwin-bf/root/HEAD/pgsql.3216/src/timezone/zic.c:511: undefined reference to `_optarg' Yes, there's some different fixes required: http://archives.postgresql.org/message-id/20140215131209.GG20973%40alap3.anarazel.de Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Andrew Dunstan <andrew@dunslane.net> writes: > However, the build now fails like this: > pg_buffercache_pages.o: In function `pg_buffercache_pages': > c:/MinGW/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache/pg_buffercache_pages.c:119: > undefined reference to `MainLWLockArray' Yes, this is what we're expecting in HEAD. As soon as all the Windows critters are doing that, I'll commit PGDLLIMPORT additions to fix it. We're leaving it deliberately unfixed in the short term until we confirm that all the toolchains are detecting this type of error now. regards, tom lane
On 02/15/2014 10:12 AM, Tom Lane wrote: > Andrew Dunstan <andrew@dunslane.net> writes: >> However, the build now fails like this: >> pg_buffercache_pages.o: In function `pg_buffercache_pages': >> c:/MinGW/msys/1.0/home/pgrunner/bf/root/HEAD/pgsql.6024/../pgsql/contrib/pg_buffercache/pg_buffercache_pages.c:119: >> undefined reference to `MainLWLockArray' > Yes, this is what we're expecting in HEAD. As soon as all the Windows > critters are doing that, I'll commit PGDLLIMPORT additions to fix it. > We're leaving it deliberately unfixed in the short term until we > confirm that all the toolchains are detecting this type of error now. > > OK. Running jacana now. cheers andrew