Thread: WIP - MSVC build script replacements
Here after much tedious testing are some perl replacements for src/tools/msvc/build.bat and src/tools/msvc/vcregress.bat, as previouslty discussed on -hackers. They do not exhibit the error reporting problems I have had on XP, and they work nicely with a slightly modified buildfarm script. There is one failure - the ECPG checks fail to build. The error I get is shown below - not sure why on earth it can't find MSVCRT.lib. There are also a few things to tidy up before I commit this, but I'm happy because it has proved much less fragile than the existing scripts in cooperating with the buildfarm. I am also turning my attention to fixing the use of "dir" in Install.pm. cheers andrew -------------------------------------------------------------------------------------------------- Build started 9/7/2007 1:26:18 PM. __________________________________________________ Project "c:\prog\bf\test\pgsql\src\tools\msvc\ecpg_regression.proj" (default targets): Target all: ..\..\..\..\..\Release\ecpg\ecpg -I ../../include --regression -C INFORMIX -o charfuncs.c charfuncs.pgc cl /nologo charfuncs.c /TC /MD /DENABLE_THREAD_SAFETY /DWIN32 /DWIN32_ONLY_COMPILER /I. /I..\..\include /I..\..\..\libpq /I..\..\..\..\include /link /defaultlib:..\..\..\..\..\Release\libecpg\libecpg.lib /defaultlib:..\..\..\..\..\Release\libecpg_compat\libecpg_compat.lib /defaultlib:..\..\..\..\..\Release\libpgtypes\libpgtypes.lib charfuncs.c LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib' c:\prog\bf\test\pgsql\src\tools\msvc\ecpg_regression.proj(39,3): error MSB3073: The command "cl /nologo charfuncs.c /TC /MD /DENABLE_THREAD_SAFETY /DWIN32 /DWIN32_ONLY_COMPILER /I. /I..\..\include /I..\..\..\libpq /I..\..\..\..\include /link /defaultlib:..\..\..\..\..\Release\libecpg\libecpg.lib /defaultlib:..\..\..\..\..\Release\libecpg_compat\libecpg_compat.lib /defaultlib:..\..\..\..\..\Release\libpgtypes\libpgtypes.lib" exited with code 2. Done building target "all" in project "ecpg_regression.proj" -- FAILED.
Attachment
Andrew Dunstan wrote: > > Here after much tedious testing are some perl replacements for > src/tools/msvc/build.bat and src/tools/msvc/vcregress.bat, as > previouslty discussed on -hackers. They do not exhibit the error > reporting problems I have had on XP, and they work nicely with a > slightly modified buildfarm script. There is one failure - the ECPG > checks fail to build. The error I get is shown below - not sure why on > earth it can't find MSVCRT.lib. Does it work on the same machine with the .bat file? > There are also a few things to tidy up before I commit this, but I'm > happy because it has proved much less fragile than the existing scripts > in cooperating with the buildfarm. I am also turning my attention to > fixing the use of "dir" in Install.pm. Not having tested it yet, but looked over. Does the #!c:/perl/bin/perl actually make any sense? Does it even work? Should it system("mkvcbuild")? Shouldn't it rather use Mkvcbuild; and go from there? Seems a whole lot cleaner, and that's why we nade Mkvcbuild a module in the first place. As for vcregress, code like: my $schedule = shift ||(($what eq 'CHECK' || $what =~ /PARALLEL/) ? "parallel" : "serial" ); is quite hard for me to read, but that could be because I'm not fluent in advanced perl :P Perhaps simplify a bit for those of us? ;) (I perfectly understand what it does after thinking about it a bit, but I have to think and not just read. And since this is a very simple piece of code after all.) Not sure I like the getTests vs GetTests. Sure, it's case sensitive, but again with the easy-to-read. (and usage: foo, but I'm sure you knew that) Other than that, looks fine to me. //Magnus
Here are the latest versions. ECPG regression still isn't working, but then it isn't on my machine with the .bat file either. I don't know yet if that's my fault or the script's or something else. I'm inclined to commit these without changing the .bat files in the first instance, so people can get them easily to try out. cheers andrew Magnus Hagander wrote: > Andrew Dunstan wrote: > >> Here after much tedious testing are some perl replacements for >> src/tools/msvc/build.bat and src/tools/msvc/vcregress.bat, as >> previouslty discussed on -hackers. They do not exhibit the error >> reporting problems I have had on XP, and they work nicely with a >> slightly modified buildfarm script. There is one failure - the ECPG >> checks fail to build. The error I get is shown below - not sure why on >> earth it can't find MSVCRT.lib. >> > > Does it work on the same machine with the .bat file? > > > >> There are also a few things to tidy up before I commit this, but I'm >> happy because it has proved much less fragile than the existing scripts >> in cooperating with the buildfarm. I am also turning my attention to >> fixing the use of "dir" in Install.pm. >> > > Not having tested it yet, but looked over. > > Does the > #!c:/perl/bin/perl > actually make any sense? Does it even work? > > > Should it system("mkvcbuild")? Shouldn't it rather use Mkvcbuild; and go > from there? Seems a whole lot cleaner, and that's why we nade Mkvcbuild > a module in the first place. > > > > As for vcregress, code like: > my $schedule = shift > ||(($what eq 'CHECK' || $what =~ /PARALLEL/) ? "parallel" : "serial" ); > > is quite hard for me to read, but that could be because I'm not fluent > in advanced perl :P Perhaps simplify a bit for those of us? ;) (I > perfectly understand what it does after thinking about it a bit, but I > have to think and not just read. And since this is a very simple piece > of code after all.) > > Not sure I like the getTests vs GetTests. Sure, it's case sensitive, but > again with the easy-to-read. > > (and usage: foo, but I'm sure you knew that) > > > Other than that, looks fine to me. > > //Magnus > >
Attachment
I've tested this now. Build seems to work, at least in the basic sense. A regression: In buildenv.bat i have "set CONFIG=Debug", there appears tobe no way to do that anymore? Also, vcregress doesn't work for me. I put in buildenv.pl: $ENV{PATH}="d:\prog\pgsql\depend\krb5\bin\i386;d:\prog\pgsql\depend\iconv\bin;d:\prog\pgsql\depend\libxml2\bin;d:\prog\pgsql\depend\zlib;$ENV{PATH};c:\win32app\gnuwin32\bin"; But it still complains that it can't find my kerberos binaries when running the regression test. (fails to launch initdb because of missing krb5_32.dll) (The actual path is a copy from my old buildenv.bat) //Magnus On Tue, Sep 18, 2007 at 10:31:10PM -0400, Andrew Dunstan wrote: > > Here are the latest versions. ECPG regression still isn't working, but > then it isn't on my machine with the .bat file either. I don't know yet > if that's my fault or the script's or something else. > > I'm inclined to commit these without changing the .bat files in the > first instance, so people can get them easily to try out. > > cheers > > andrew > > > Magnus Hagander wrote: > >Andrew Dunstan wrote: > > > >>Here after much tedious testing are some perl replacements for > >>src/tools/msvc/build.bat and src/tools/msvc/vcregress.bat, as > >>previouslty discussed on -hackers. They do not exhibit the error > >>reporting problems I have had on XP, and they work nicely with a > >>slightly modified buildfarm script. There is one failure - the ECPG > >>checks fail to build. The error I get is shown below - not sure why on > >>earth it can't find MSVCRT.lib. > >> > > > >Does it work on the same machine with the .bat file? > > > > > > > >>There are also a few things to tidy up before I commit this, but I'm > >>happy because it has proved much less fragile than the existing scripts > >>in cooperating with the buildfarm. I am also turning my attention to > >>fixing the use of "dir" in Install.pm. > >> > > > >Not having tested it yet, but looked over. > > > >Does the > >#!c:/perl/bin/perl > >actually make any sense? Does it even work? > > > > > >Should it system("mkvcbuild")? Shouldn't it rather use Mkvcbuild; and go > >from there? Seems a whole lot cleaner, and that's why we nade Mkvcbuild > >a module in the first place. > > > > > > > >As for vcregress, code like: > >my $schedule = shift > > ||(($what eq 'CHECK' || $what =~ /PARALLEL/) ? "parallel" : "serial" ); > > > >is quite hard for me to read, but that could be because I'm not fluent > >in advanced perl :P Perhaps simplify a bit for those of us? ;) (I > >perfectly understand what it does after thinking about it a bit, but I > >have to think and not just read. And since this is a very simple piece > >of code after all.) > > > >Not sure I like the getTests vs GetTests. Sure, it's case sensitive, but > >again with the easy-to-read. > > > >(and usage: foo, but I'm sure you knew that) > > > > > >Other than that, looks fine to me. > > > >//Magnus > > > >
Magnus Hagander wrote: > I've tested this now. Build seems to work, at least in the basic sense. > > A regression: > In buildenv.bat i have "set CONFIG=Debug", there appears tobe no way to > do that anymore? > updated build.pl attached that should pick that up. > Also, vcregress doesn't work for me. I put in buildenv.pl: > $ENV{PATH}="d:\prog\pgsql\depend\krb5\bin\i386;d:\prog\pgsql\depend\iconv\bin;d:\prog\pgsql\depend\libxml2\bin;d:\prog\pgsql\depend\zlib;$ENV{PATH};c:\win32app\gnuwin32\bin"; > > But it still complains that it can't find my kerberos binaries when > running the regression test. (fails to launch initdb because of missing > krb5_32.dll) > > In perl double quotes, you need to double backslashes. Instead, I would do something like: $ENV{PATH} = join (/;/, 'd:\prog\pgsql\depend\krb5\bin\i386', 'd:\prog\pgsql\depend\iconv\bin', 'd:\prog\pgsql\depend\libxml2\bin', 'd:\prog\pgsql\depend\zlib', $ENV{PATH}, 'c:\win32app\gnuwin32\bin' ); cheers andrew