Thread: compile from git repository
Hi, hackers<br /><br />I try to compile from git repository and get some errors.<br clear="all" /><br />Windows 7 x86<br/>VC Express 2008<br />perl v5.8.9<br />flex 2.5.4a-1<br />bison 2.4.1<br /><br />git clone git://<a href="http://git.postgresql.org/git/postgresql.git">git.postgresql.org/git/postgresql.git</a><br/> git checkout REL9_0_4<br/><br />cd ...\src\tools\msvc<br />build.bat<br /><br /><br /> Build started: Project: postgres, Configuration:Release|Win32<br /> Running flex on src\backend\parser\scan.l<br /> "src\backend\parser\scan.l", line 112:unrecognized %option: reentrant<br /> "src\backend\parser\scan.l", line 113: unrecognized %option: bison-bridge<br/> "src\backend\parser\scan.l", line 114: unrecognized %option: bison-locations<br /> "src\backend\parser\scan.l",line 121: unrecognized %option: yyalloc<br /> "src\backend\parser\scan.l", line 122: unrecognized%option: yyrealloc<br /> "src\backend\parser\scan.l", line 123: unrecognized %option: yyfree<br />Project :error PRJ0002: Error result 1 returned from 'C:\Windows\system32\cmd.exe'.<br /> postgres - 1 error(s), 0 warning(s)<br/> The command exited with code 1.<br /><br />Help me, please.<br /><br />-- <br />Quan Zongliang<br /><a href="mailto:quanzongliang@gmail.com">quanzongliang@gmail.com</a><br/>
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.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? 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.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? > 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.<br /><br />Now, there is still one error:<br /><br /> Build started: Project: postgres, Configuration:Release|Win32<br /> Running flex on src\backend\parser\scan.l<br />VCBUILD : cygwin warning :<br /> MS-DOSstyle path detected: src\backend\parser\scan.l<br /> Preferred POSIX equivalent is: src/backend/parser/scan.l<br/> CYGWIN environment variable option "nodosfilewarning" turns off this warning.<br /> Consult the user's guide for more details about POSIX paths:<br /> <a href="http://cygwin.com/cygwin-ug-net/using.html#using-pathnames">http://cygwin.com/cygwin-ug-net/using.html#using-pathnames</a><br /> flex: fatal internal error, exec failed<br />Project : error PRJ0002: Error result 3328 returned from 'C:\Windows\system32\cmd.exe'.<br/> postgres - 1 error(s), 0 warning(s)<br /> The command exited with code 1.<br /><br/><div class="gmail_quote">2011/8/31 Andrew Dunstan <span dir="ltr"><<a href="mailto:andrew@dunslane.net">andrew@dunslane.net</a>></span><br/><blockquote class="gmail_quote" style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im"><br /><br /> On 08/30/2011 10:43 AM,Magnus Hagander wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Aug 30, 2011 at 16:30, Tom Lane<<a href="mailto:tgl@sss.pgh.pa.us" target="_blank">tgl@sss.pgh.pa.us</a>> wrote:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px#ccc solid;padding-left:1ex"> Andrew Dunstan<<a href="mailto:andrew@dunslane.net" target="_blank">andrew@dunslane.net</a>> writes:<br /><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px#ccc solid;padding-left:1ex"> On 08/30/2011 07:11 AM, 权宗亮 wrote:<br /><blockquote class="gmail_quote"style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> I try to compile from git repositoryand get some errors.<br /><br /> Windows 7 x86<br /> VC Express 2008<br /> perl v5.8.9<br /> flex 2.5.4a-1<br />bison 2.4.1<br /></blockquote> Your version of flex is too old.<br /></blockquote> Hmm ... had the OP been using configure,he'd have been told that by the<br /> build scripts. Should the MSVC build scripts be improved to check the<br/> versions of bison and flex?<br /></blockquote> We do it for bison already. It probably shouldn't be too hard todo<br /> the same for flex.<br /><br /></blockquote><br /></div> Done.<br /><br /> cheers<br /><font color="#888888"><br/> andrew<br /></font></blockquote></div><br /><br clear="all" /><br />-- <br />权 宗亮(Quan Zongliang)<br/><a href="mailto:quanzongliang@gmail.com">quanzongliang@gmail.com</a><br />
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. Youneed 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_envstanza, something like: M4 => 'c:\path\to\bin\m4.exe', cheers andrew