compile from git repository
Hi, hackers
I try to compile from git repository and get some errors.
Windows 7 x86
VC Express 2008
perl v5.8.9
flex 2.5.4a-1
bison 2.4.1
git clone git://git.postgresql.org/git/postgresql.git
git checkout REL9_0_4
cd ...\src\tools\msvc
build.bat
Build started: Project: postgres, Configuration: Release|Win32
Running flex on src\backend\parser\scan.l
"src\backend\parser\scan.l", line 112: unrecognized %option: reentrant
"src\backend\parser\scan.l", line 113: unrecognized %option: bison-bridge
"src\backend\parser\scan.l", line 114: unrecognized %option:
bison-locations
"src\backend\parser\scan.l", line 121: unrecognized %option: yyalloc
"src\backend\parser\scan.l", line 122: unrecognized %option: yyrealloc
"src\backend\parser\scan.l", line 123: unrecognized %option: yyfree
Project : error PRJ0002: Error result 1 returned from
'C:\Windows\system32\cmd.exe'.
postgres - 1 error(s), 0 warning(s)
The command exited with code 1.
Help me, please.
--
Quan Zongliang
quanzongliang@gmail.com
On 08/30/2011 07:11 AM, 权宗亮 wrote:
Hi, hackers
I try to compile from git repository and get some errors.
Windows 7 x86
VC Express 2008
perl v5.8.9
flex 2.5.4a-1
bison 2.4.1
Your version of flex is too old. You can try the one at
<http://wwwmaster.postgresql.org/download/mirrors-ftp/misc/winflex/windows-flex-2.5.35.zip>,
or the one that comes with Msysgit should also be suitable if you're
using that.
cheers
andrew
Andrew Dunstan <andrew@dunslane.net> writes:
On 08/30/2011 07:11 AM, 权宗亮 wrote:
I try to compile from git repository and get some errors.
Windows 7 x86
VC Express 2008
perl v5.8.9
flex 2.5.4a-1
bison 2.4.1
Your version of flex is too old.
Hmm ... had the OP been using configure, he'd have been told that by the
build scripts. Should the MSVC build scripts be improved to check the
versions of bison and flex?
regards, tom lane
On Tue, Aug 30, 2011 at 16:30, Tom Lane <tgl@sss.pgh.pa.us> wrote:
Andrew Dunstan <andrew@dunslane.net> writes:
On 08/30/2011 07:11 AM, 权宗亮 wrote:
I try to compile from git repository and get some errors.
Windows 7 x86
VC Express 2008
perl v5.8.9
flex 2.5.4a-1
bison 2.4.1Your version of flex is too old.
Hmm ... had the OP been using configure, he'd have been told that by the
build scripts. Should the MSVC build scripts be improved to check the
versions of bison and flex?
We do it for bison already. It probably shouldn't be too hard to do
the same for flex.
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
On 08/30/2011 10:43 AM, Magnus Hagander wrote:
On Tue, Aug 30, 2011 at 16:30, Tom Lane<tgl@sss.pgh.pa.us> wrote:
Andrew Dunstan<andrew@dunslane.net> writes:
On 08/30/2011 07:11 AM, 权宗亮 wrote:
I try to compile from git repository and get some errors.
Windows 7 x86
VC Express 2008
perl v5.8.9
flex 2.5.4a-1
bison 2.4.1Your version of flex is too old.
Hmm ... had the OP been using configure, he'd have been told that by the
build scripts. Should the MSVC build scripts be improved to check the
versions of bison and flex?We do it for bison already. It probably shouldn't be too hard to do
the same for flex.
Done.
cheers
andrew
Thank you everyone.
Now, there is still one error:
Build started: Project: postgres, Configuration: Release|Win32
Running flex on src\backend\parser\scan.l
VCBUILD : cygwin warning :
MS-DOS style path detected: src\backend\parser\scan.l
Preferred POSIX equivalent is: src/backend/parser/scan.l
CYGWIN environment variable option "nodosfilewarning" turns off this
warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
flex: fatal internal error, exec failed
Project : error PRJ0002: Error result 3328 returned from
'C:\Windows\system32\cmd.exe'.
postgres - 1 error(s), 0 warning(s)
The command exited with code 1.
2011/8/31 Andrew Dunstan <andrew@dunslane.net>
On 08/30/2011 10:43 AM, Magnus Hagander wrote:
On Tue, Aug 30, 2011 at 16:30, Tom Lane<tgl@sss.pgh.pa.us> wrote:
Andrew Dunstan<andrew@dunslane.net> writes:
On 08/30/2011 07:11 AM, 权宗亮 wrote:
I try to compile from git repository and get some errors.
Windows 7 x86
VC Express 2008
perl v5.8.9
flex 2.5.4a-1
bison 2.4.1Your version of flex is too old.
Hmm ... had the OP been using configure, he'd have been told that by the
build scripts. Should the MSVC build scripts be improved to check the
versions of bison and flex?We do it for bison already. It probably shouldn't be too hard to do
the same for flex.Done.
cheers
andrew
--
权 宗亮(Quan Zongliang)
quanzongliang@gmail.com
On 08/30/2011 09:50 PM, 权锟斤拷锟斤拷 wrote:
Thank you everyone.
Now, there is still one error:
Build started: Project: postgres, Configuration: Release|Win32
Running flex on src\backend\parser\scan.l
VCBUILD : cygwin warning :
MS-DOS style path detected: src\backend\parser\scan.l
Preferred POSIX equivalent is: src/backend/parser/scan.l
CYGWIN environment variable option "nodosfilewarning" turns off this
warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
flex: fatal internal error, exec failed
Project : error PRJ0002: Error result 3328 returned from
'C:\Windows\system32\cmd.exe'.
postgres - 1 error(s), 0 warning(s)
The command exited with code 1.
You are probably not setting the M4 environment variable correctly. The
instructions state:
To run this version of flex, you will need to set the M4 environment variable
to point to your installation of m4. You need one of these in order to run
both bison and flex, and it sometimes comes packaged with bison.
If you are using this in a buildfarm member, you can set that environment
variable in its config file, in the build_env stanza, something like:
M4 => 'c:\path\to\bin\m4.exe',
cheers
andrew