[Xorp-hackers] [PATCH] xorp: rtrmgr: Fix compiling of lex and yacc on BSD OSs

Ben Greear greearb at candelatech.com
Wed Mar 14 10:05:21 PDT 2012


On 03/14/2012 09:35 AM, Ben Greear wrote:
> On 03/14/2012 03:01 AM, igorm at etf.rs wrote:
>> From: Igor Maravic<igorm at etf.rs>
>>
>> On BSD bison generates header files with .h suffix.
>> On other OSs it generates header files with .hh suffix.
>>
>> Check which OS we use and include appropriate files.
>
> This still does not work.  On my BSD box, the .h file is:
>
> y.tplt_tab.cc.h
>
> But, I fixed that.
>
> Now it complains because it doesn't know about some variable:
>
> scons: `obj/i386-unknown-freebsd8.1/rib/tools/rib_show_routes' is up to date.
> scons: `obj/i386-unknown-freebsd8.1/rib/xorp_rib' is up to date.
> flex -Ptplt -t rtrmgr/template.ll>  obj/i386-unknown-freebsd8.1/rtrmgr/lex.tplt.cc
> g++ -o obj/i386-unknown-freebsd8.1/rtrmgr/lex.tplt.o -c -O2 -g3 -Werror -W -Wall -Wwrite-strings -Wcast-qual -Wpointer-arith -Wcast-align -Woverloaded-virtual
> -ftemplate-depth-25 -pipe -DXORP_BUILDINFO -DXRL_PF=120 -DXORP_VERSION=1.8.5 -Iobj/i386-unknown-freebsd8.1 -I. -Iobj/i386-unknown-freebsd8.1/rtrmgr -Irtrmgr -I.
> obj/i386-unknown-freebsd8.1/rtrmgr/lex.tplt.cc
> rtrmgr/template.ll: In function 'int tpltlex()':
> rtrmgr/template.ll:269: error: 'tpltlval' was not declared in this scope
> rtrmgr/template.ll:274: error: 'tpltlval' was not declared in this scope
> rtrmgr/template.ll:279: error: 'tpltlval' was not declared in this scope

I committed a patch that lets it compile on my freeBSD system.

Please take a look and see if it looks sane to you.

Thanks,
Ben

>
> Thanks,
> Ben
>


-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list