[Xorp-hackers] [PATCH 00/10] Automatically generate lex and yacc files

Ben Greear greearb at candelatech.com
Tue Mar 13 13:59:46 PDT 2012


On 03/13/2012 12:20 PM, Ben Greear wrote:
> On 03/13/2012 10:39 AM, Ben Greear wrote:
>> On 03/13/2012 03:39 AM, igorm at etf.rs wrote:
>>> From: Igor Maravic<igorm at etf.rs>
>>>
>>> Hi,
>>> I removed files in individual patches.
>>> 10th patch is where I introduced auto generation of lex and yacc files
>>> BR
>>> Igor
>>
>> Applied and pushed.  I see this error on the 32-bit FC8 build-bot machine:
>>
>> gcc -o obj/i686-pc-linux-gnu/rtrmgr/glob_win32.o -c -std=gnu99 -O2 -g3 -Werror -W -Wall -Wwrite-strings -Wbad-function-cast -Wmissing-prototypes -Wcast-qual
>> -Wmissing-declarations -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -pipe -DXRL_PF=120 -DXORP_VERSION=1.8.5 -Iobj/i686-pc-linux-gnu -I.
>> -Iobj/i686-pc-linux-gnu/rtrmgr -Irtrmgr -I. rtrmgr/glob_win32.c
>> flex -Ptplt -t rtrmgr/template.ll>   obj/i686-pc-linux-gnu/rtrmgr/lex.tplt.cc
>> bison -d -ptplt -o obj/i686-pc-linux-gnu/rtrmgr/y.tplt_tab.cc rtrmgr/template.yy
>> g++ -o obj/i686-pc-linux-gnu/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/i686-pc-linux-gnu -I. -Iobj/i686-pc-linux-gnu/rtrmgr -Irtrmgr -I.
>> obj/i686-pc-linux-gnu/rtrmgr/lex.tplt.cc
>> cc1plus: warnings being treated as errors
>> <stdout>: In function ‘int yy_get_next_buffer()’:
>> <stdout>:9666: warning: comparison between signed and unsigned integer expressions
>> scons: *** [obj/i686-pc-linux-gnu/rtrmgr/lex.tplt.o] Error 1
>> scons: building terminated because of errors.
>> program finished with exit code 2
>> elapsedTime=811.975911
>>
>> Any ideas on how to fix that?
>
> I can just disable -Werror on FC8 systems...but there is also this error on FreeBSD:
>
> http://dmz2.candelatech.com:8010/builders/v-freebsd-32/builds/88/steps/shell_1/logs/stdio
>
> This looks a bit harder to fix...
>
> g++ -o obj/i386-unknown-freebsd8.1/rtrmgr/config_operators.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. rtrmgr/config_operators.cc
> g++ -o obj/i386-unknown-freebsd8.1/rtrmgr/generic_module_manager.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. rtrmgr/generic_module_manager.cc
> gcc -o obj/i386-unknown-freebsd8.1/rtrmgr/glob_win32.o -c -O2 -g3 -Werror -W -Wall -Wwrite-strings -Wbad-function-cast -Wmissing-prototypes -Wcast-qual
> -Wmissing-declarations -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -pipe -DXRL_PF=120 -DXORP_VERSION=1.8.5 -Iobj/i386-unknown-freebsd8.1
> -I. -Iobj/i386-unknown-freebsd8.1/rtrmgr -Irtrmgr -I. rtrmgr/glob_win32.c
> flex -Ptplt -t rtrmgr/template.ll>  obj/i386-unknown-freebsd8.1/rtrmgr/lex.tplt.cc
> yacc -d -ptplt -o obj/i386-unknown-freebsd8.1/rtrmgr/y.tplt_tab.cc rtrmgr/template.yy
> 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:14:25: error: y.tplt_tab.hh: No such file or directory
> rtrmgr/template.ll: In function 'int tpltlex()':
> rtrmgr/template.ll:233: error: 'UPLEVEL' was not declared in this scope
> rtrmgr/template.ll:237: error: 'DOWNLEVEL' was not declared in this scope
> rtrmgr/template.ll:248: error: 'END' was not declared in this scope
> rtrmgr/template.ll:252: error: 'COLON' was not declared in this scope
>
>
> We need to get a fix for this so we can compile on BSD or I'm going to have
> to revert the changes...

Ok, seems that yacc on BSD generates .h files instead of .hh,
so that is likely the issue.  I'm not sure about the proper
way to go about fixing that.  Maybe could get scons to create
a soft-link on BSD platforms?

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