Thread: BUG #5923: Build problem

BUG #5923: Build problem

From
"charles johnson"
Date:
The following bug has been logged online:

Bug reference:      5923
Logged by:          charles johnson
Email address:      cjohnson@valverdecomputing.com
PostgreSQL version: 9.1 alpha 4
Operating system:   Windows 7
Description:        Build problem
Details:

The build died straightaway in 8 seconds.

It died fatally in flex, taking down the wow64 environment.

Just to check everything out I rebuilt alpha 3 in the same environment, it
built, all the 124 regression, contrib and other tests ran, it installs and
comes up fine with the same flex. It's not my stuff.

I built alpha 4 also on rhel 5.5, it built, ran all 125 regression tests and
installed and runs fine.

Here's the output listing from the build, where it dies:
__________________________________________________

Task "VCBuild" skipped, due to false condition; ( ('$(Configuration)' ==
'Debug') and ('$(Platform)' == 'Win32') ) was evaluated as
 ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
Using "VCBuild" task from assembly "Microsoft.Build.Tasks.v3.5,
Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a".
Task "VCBuild"

  Locating vcbuild.exe: found at "C:\Program Files (x86)\Microsoft Visual
Studio 9.0\Common7\IDE\..\..\vc\vcpackages\vcbuild.exe".
  Command:
  C:\Program Files (x86)\Microsoft Visual Studio
9.0\Common7\IDE\..\..\vc\vcpackages\vcbuild.exe
C:\postgresql-9.1alpha4\postgres.v
  cproj "Release|Win32"
  The "VCBuild" task is using "VCBuild.exe" from "C:\Program Files
(x86)\Microsoft Visual Studio 9.0\Common7\IDE\..\..\vc\vcpackage
  s\vcbuild.exe".
  Microsoft (R) Visual C++ Project Builder - Command Line Version
9.00.30729
  Copyright (C) Microsoft Corporation. All rights reserved.

  Build started: Project: postgres, Configuration: Release|Win32
  Running bison on src\backend\replication\repl_gram.y
          1 file(s) copied.
  Running flex on src\backend\replication\repl_scanner.l
  flex: fatal internal error, exec failed
Project : error PRJ0002: Error result 1 returned from
'C:\Windows\SysWow64\cmd.exe'.
  Build log was saved at
"file://c:\postgresql-9.1alpha4\Release\postgres\BuildLog.htm"
  postgres - 1 error(s), 0 warning(s)
  The command exited with code 1.

Done executing task "VCBuild" -- FAILED.
Done building target "postgres" in project "pgsql.sln" -- FAILED.
Target "ValidateSolutionConfiguration" skipped. Previously built
successfully.
Target "ValidateToolsVersions" skipped. Previously built successfully.
Target "misc\libpgport" in file "C:\postgresql-9.1alpha4\pgsql.sln" from
project "C:\postgresql-9.1alpha4\pgsql.sln":
Task "VCBuild" skipped, due to false condition; ( ('$(Configuration)' ==
'Debug') and ('$(Platform)' == 'Win32') ) was evaluated as
 ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
Task "VCBuild"

  Locating vcbuild.exe: found at "C:\Program Files (x86)\Microsoft Visual
Studio 9.0\Common7\IDE\..\..\vc\vcpackages\vcbuild.exe".
  Command:
  C:\Program Files (x86)\Microsoft Visual Studio
9.0\Common7\IDE\..\..\vc\vcpackages\vcbuild.exe
C:\postgresql-9.1alpha4\libpgport.
  vcproj "Release|Win32"
  The "VCBuild" task is using "VCBuild.exe" from "C:\Program Files
(x86)\Microsoft Visual Studio 9.0\Common7\IDE\..\..\vc\vcpackage
  s\vcbuild.exe".
  Microsoft (R) Visual C++ Project Builder - Command Line Version
9.00.30729
  Copyright (C) Microsoft Corporation. All rights reserved.

  Build started: Project: libpgport, Configuration: Release|Win32
  Compiling...
  chklocale.c
  win32error.c
  win32env.c
  thread.c
  strlcpy.c
  strlcat.c
  srandom.c
  sprompt.c
  snprintf.c
  rint.c
  random.c
  qsort_arg.c
  qsort.c
  pgstrcasecmp.c
  pgsleep.c
  pgmkdirp.c
  pgcheckdir.c
  path.c
  open.c
  noblock.c
  kill.c
  inet_net_ntop.c
  inet_aton.c
  gettimeofday.c
  getrusage.c
  getopt_long.c
  getopt.c
  getaddrinfo.c
  fseeko.c
  exec.c
  erand48.c
  dirmod.c
  dirent.c
  crypt.c
  Creating library...
  Build log was saved at
"file://c:\postgresql-9.1alpha4\Release\libpgport\BuildLog.htm"
  libpgport - 0 error(s), 0 warning(s)

Done executing task "VCBuild".
Done building target "misc\libpgport" in project "pgsql.sln".
Target "ValidateSolutionConfiguration" skipped. Previously built
successfully.
Target "ValidateToolsVersions" skipped. Previously built successfully.
Target "bin\pgevent" in file "C:\postgresql-9.1alpha4\pgsql.sln" from
project "C:\postgresql-9.1alpha4\pgsql.sln":
Task "VCBuild" skipped, due to false condition; ( ('$(Configuration)' ==
'Debug') and ('$(Platform)' == 'Win32') ) was evaluated as
 ( ('Release' == 'Debug') and ('Win32' == 'Win32') ).
Task "VCBuild"

  Locating vcbuild.exe: found at "C:\Program Files (x86)\Microsoft Visual
Studio 9.0\Common7\IDE\..\..\vc\vcpackages\vcbuild.exe".
  Command:
  C:\Program Files (x86)\Microsoft Visual Studio
9.0\Common7\IDE\..\..\vc\vcpackages\vcbuild.exe
C:\postgresql-9.1alpha4\pgevent.vc
  proj "Release|Win32"
  The "VCBuild" task is using "VCBuild.exe" from "C:\Program Files
(x86)\Microsoft Visual Studio 9.0\Common7\IDE\..\..\vc\vcpackage
  s\vcbuild.exe".
  Microsoft (R) Visual C++ Project Builder - Command Line Version
9.00.30729
  Copyright (C) Microsoft Corporation. All rights reserved.

  Build started: Project: pgevent, Configuration: Release|Win32
  Compiling...
  pgevent.c
  Compiling resources...
  Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
  Copyright (C) Microsoft Corporation.  All rights reserved.
  Linking...
     Creating library .\Release\pgevent\pgevent.lib and object
.\Release\pgevent\pgevent.exp
  Embedding manifest...
  Build log was saved at
"file://c:\postgresql-9.1alpha4\Release\pgevent\BuildLog.htm"
  pgevent - 0 error(s), 0 warning(s)

Done executing task "VCBuild".
Done building target "bin\pgevent" in project "pgsql.sln".
Done executing task "CallTarget" -- FAILED.
Done building target "Build" in project "pgsql.sln" -- FAILED.
Done Building Project "C:\postgresql-9.1alpha4\pgsql.sln" (default targets)
-- FAILED.


Build FAILED.

"C:\postgresql-9.1alpha4\pgsql.sln" (default target) (1) ->
(postgres target) ->
  Project : error PRJ0002: Error result 1 returned from
'C:\Windows\SysWow64\cmd.exe'.

    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:08.82
_____________________________________________

I'll be able to ship you the build log and any other information when I get
back to the customer site tomorrow.

Charlie ...

Re: BUG #5923: Build problem

From
Tom Lane
Date:
"charles johnson" <cjohnson@valverdecomputing.com> writes:
>   Build started: Project: postgres, Configuration: Release|Win32
>   Running bison on src\backend\replication\repl_gram.y
>           1 file(s) copied.
>   Running flex on src\backend\replication\repl_scanner.l
>   flex: fatal internal error, exec failed

You seem to have a rather broken version of flex :-(

However, if you were building from a distribution tarball you really
shouldn't have needed flex at all.  [ pokes around... ]  Oh, it looks
like the replication bison/flex output files aren't actually in the
tarballs after all.  Grumble.  I can fix that part at least.  But
you still ought to try to find a non-broken flex.

            regards, tom lane

Re: BUG #5923: Build problem

From
"C.S. Johnson"
Date:
<span style=3D"font-family:Verdana; color:#000000; font-size:10=
pt;">You were right. Although it defies reason that the flex that has =
worked all this time for other versions of pg is broken, the latest Windows=
 version fixed the problem. Hats off.Nice release=
, too. My customer is betting the house on fdw.<di=
v>Charlie ...
<blockquote id=3D"replyBlockquote" webmail=3D"1" style=3D"border-left: 2px =
solid blue; margin-left: 8px; padding-left: 8px; font-size: 10pt; color: bl=
ack; font-family: verdana;">

-------- Original Message --------
Subject: Re: [BUGS] BUG #5923: Build problem
From: Tom Lane <tgl@sss.pgh.pa.us</=
a>>
Date: Wed, March 09, 2011 9:22 pm
To: "charles johnson" <<a href=3D"mailto:cjohnson@valverdecomputing.com"=
>cjohnson@valverdecomputing.com>
Cc: pgsql-bugs@postgresql.org<=
/a>

"charles johnson" <cjo=
hnson@valverdecomputing.com> writes:
>   Build started: Project: postgres, Configuration: Release|Win32
>   Running bison on src\backend\replication\repl_gram.y
>           1 file(s) copied.
>   Running flex on src\backend\replication\repl_scanner.l
>   flex: fatal internal error, exec failed

You seem to have a rather broken version of flex :-(

However, if you were building from a distribution tarball you really
shouldn't have needed flex at all.  [ pokes around... ]  Oh, it looks
like the replication bison/flex output files aren't actually in the
tarballs after all.  Grumble.  I can fix that part at least.  But
you still ought to try to find a non-broken flex.

            regards, tom lane