[ofa-general] OFED 1.3 OpenSM and QoS Annex Building

Hal Rosenstock hrosenstock at xsigo.com
Tue Mar 4 11:34:13 PST 2008


Hi,

When I configure OFED 1.3 OpenSM, I get:
checking for bison... no
checking for byacc... byacc
checking for flex... flex
checking for yywrap in -lfl... yes
checking lex output file root... lex.yy
checking whether yytext is a pointer... yes

When I make, I get the following error:
byacc -d -o ./osm_qos_parser_y.c -p__qos_parser_ ./osm_qos_parser.y
usage: byacc [-dlrtv] [-b file_prefix] [-p symbol_prefix] filename
make[2]: *** [osm_qos_parser_y.c] Error 1

Apparently, my version does not support -o and it is preferred not to be change yacc if possible.

So I tried to change opensm/Makefile.am as follows:

diff --git a/opensm/opensm/Makefile.am b/opensm/opensm/Makefile.am
index 50fdae1..f85a6d6 100644
--- a/opensm/opensm/Makefile.am
+++ b/opensm/opensm/Makefile.am
@@ -63,8 +63,11 @@ opensm_SOURCES = main.c osm_console.c osm_db_files.c \
                 osm_qos_parser_y.c osm_qos_parser_l.c osm_qos_policy.c
 
 osm_qos_parser_y.c: $(srcdir)/osm_qos_parser.y $(srcdir)/../include/opensm/osm_
-       $(YACC) -d -o $(srcdir)/osm_qos_parser_y.c -p__qos_parser_ $(srcdir)/osm
-       mv -f $(srcdir)/osm_qos_parser_y.h $(srcdir)/../include/opensm/osm_qos_p
+       $(YACC) -d -b osm_qos_parser -p__qos_parser_ $(srcdir)/osm_qos_parser.y
+       mv -f $(srcdir)/osm_qos_parser.tab.c $(srcdir)/osm_qos_parser_y.c
+       mv -f $(srcdir)/osm_qos_parser.tab.h $(srcdir)/../include/opensm/osm_qos
+#      $(YACC) -d -o $(srcdir)/osm_qos_parser_y.c -p__qos_parser_ $(srcdir)/osm
+#      mv -f $(srcdir)/osm_qos_parser_y.h $(srcdir)/../include/opensm/osm_qos_p
 
 osm_qos_parser_l.c: $(srcdir)/osm_qos_parser.l $(srcdir)/../include/opensm/osm_

but get:

if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I./../include -I./../../libibcommon/include -I./../../libibumad/include -I/opt/ofed/include   -Wall -DOSM_VENDOR_INTF_OPENIB -fno-strict-aliasing -DVENDOR_RMPP_SUPPORT -DDUAL_SIDED_RMPP -g -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 -I/opt/ofed/include -MT opensm-osm_qos_parser_y.o -MD -MP -MF ".deps/opensm-osm_qos_parser_y.Tpo" \
  -c -o opensm-osm_qos_parser_y.o `test -f 'osm_qos_parser_y.c' || echo './'`osm_qos_parser_y.c; \
then mv -f ".deps/opensm-osm_qos_parser_y.Tpo" ".deps/opensm-osm_qos_parser_y.Po"; \
else rm -f ".deps/opensm-osm_qos_parser_y.Tpo"; exit 1; \
fi
./osm_qos_parser.y: In function `osm_qos_parse_policy_file':
./osm_qos_parser.y:2324: warning: implicit declaration of function `__qos_parser_parse'
osm_qos_parser.tab.c: In function `__qos_parser_parse':
osm_qos_parser.tab.c:1722: warning: suggest parentheses around assignment used as truth value
osm_qos_parser.tab.c:1770: warning: label `yyerrlab' defined but not used
osm_qos_parser.tab.c:1765: warning: label `yynewerror' defined but not used
../include/complib/cl_qcomppool.h: At top level:
osm_qos_parser_y.c:2: warning: `yysccsid' defined but not used
flex -P__qos_parser_ -o./osm_qos_parser_l.c ./osm_qos_parser.l
if gcc -DHAVE_CONFIG_H -I. -I. -I../include -I./../include -I./../../libibcommon/include -I./../../libibumad/include -I/opt/ofed/include   -Wall -DOSM_VENDOR_INTF_OPENIB -fno-strict-aliasing -DVENDOR_RMPP_SUPPORT -DDUAL_SIDED_RMPP -g -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 -I/opt/ofed/include -MT opensm-osm_qos_parser_l.o -MD -MP -MF ".deps/opensm-osm_qos_parser_l.Tpo" \
  -c -o opensm-osm_qos_parser_l.o `test -f 'osm_qos_parser_l.c' || echo './'`osm_qos_parser_l.c; \
then mv -f ".deps/opensm-osm_qos_parser_l.Tpo" ".deps/opensm-osm_qos_parser_l.Po"; \
else rm -f ".deps/opensm-osm_qos_parser_l.Tpo"; exit 1; \
fi
./osm_qos_parser.l: In function `__qos_parser_lex':
./osm_qos_parser.l:205: `__qos_parser_lval' undeclared (first use in this function)
./osm_qos_parser.l:205: (Each undeclared identifier is reported only once
./osm_qos_parser.l:205: for each function it appears in.)
make[2]: *** [opensm-osm_qos_parser_l.o] Error 1

Is there a way around this without updating yacc ?

-- Hal



More information about the general mailing list