compiling Fiasco trunk, Bison trouble

View: New views
6 Messages — Rating Filter:   Alert me  

compiling Fiasco trunk, Bison trouble

by Roman Beslik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello.
I'm trying to compile Fiasco trunk using this manual:
http://os.inf.tu-dresden.de/fiasco/use.html . When I compile tudos/l4
tree, many errors appear in tudos/dice/src/parser/idl :
{{{
g++ -DHAVE_CONFIG_H -I. -I. -I../../..  -I../../../src -Wall
-I../../../src  -g -O2 -MT idl-scanner.o -MD -MP -MF
.deps/idl-scanner.Tpo -c -o idl-scanner.o idl-scanner.cc
In file included from ../../../src/parser/idl/location.hh:44,
                 from idl-parser.tab.hh:65,
                 from idl-parser-driver.hh:35,
                 from idl-scanner.ll:6:
position.hh: In function ‘bool yy::operator==(const yy::position&, const
yy::position&)’:
position.hh:136: warning: suggest parentheses around ‘&&’ within ‘||’
In file included from idl-parser-driver.hh:35,
                 from idl-scanner.ll:6:
idl-parser.yy: At global scope:
idl-parser.yy:76: error: use of enum ‘EXPT_OPERATOR’ without previous
declaration
idl-parser.yy:78: error: ISO C++ forbids declaration of ‘CFETypeSpec’
with no type
idl-parser.yy:78: error: expected ‘;’ before ‘*’ token
idl-parser.yy:79: error: ISO C++ forbids declaration of ‘CFEAttribute’
with no type
idl-parser.yy:79: error: expected ‘;’ before ‘*’ token
idl-parser.yy:80: error: ISO C++ forbids declaration of ‘CFEExpression’
with no type
idl-parser.yy:80: error: expected ‘;’ before ‘*’ token
{{{many errors skipped}}}
make[6]: *** [idl-scanner.o] Error 1
make[6]: Leaving directory `/tudos/dice/src/parser/idl'
}}}

It seems that tudos/dice/src/fe/*.h files is not included with
"#include" in tudos/dice/src/parser/idl/idl-parser.tab.hh, because when
I include them by hand, "g++ ..." works out without an error.

 >yacc --version
bison (GNU Bison) 2.4.1
 >g++ --version
g++ (GCC) 4.4.0 20090630 (prerelease)
 >ls -l /usr/local/bin/byacc
lrwxrwxrwx 1 root root 13 2009-07-14 04:24 /usr/local/bin/byacc ->
/usr/bin/yacc

-- Best regards, Roman Beslik.


_______________________________________________
l4-hackers mailing list
l4-hackers@...
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Re: compiling Fiasco trunk, Bison trouble

by Adam Lackorzynski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Tue Jul 14, 2009 at 09:04:46 +0300, Roman Beslik wrote:
> It seems that tudos/dice/src/fe/*.h files is not included with
> "#include" in tudos/dice/src/parser/idl/idl-parser.tab.hh, because
> when I include them by hand, "g++ ..." works out without an error.
>
> >yacc --version
> bison (GNU Bison) 2.4.1

it's the bison version which is a bit too recent for the source files. I
don't know how easy the fix would be...



Adam
--
Adam                 adam@...
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/

_______________________________________________
l4-hackers mailing list
l4-hackers@...
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Re: compiling Fiasco trunk, Bison trouble

by Roman Beslik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, though I already fixed those errors. Need to replace "{% ... }%"
with "%code ...". I also fixed some minor errors in other parts of
Fiasco's trunk source code, but did not dare to run Fiasco after
compilation. Here is a list of files that contain errors:
$ svn status
M       l4/pkg/dietlibc/lib/contrib/dietlibc/include/stdarg.h
M       l4/pkg/dde/fbsd/lib/include/bsd/contrib/i386/include/stdarg.h
M       l4/pkg/bootstrap/server/src/ARCH-amd64/libc32/include/stdarg.h
M       l4/pkg/roottask/server/src/trampoline.c
?       l4/doc/dev-overview/_Makefile
!       l4/doc/dev-overview/Makefile
M       kernel/fiasco/src/kern/genchecksum.cc
M       dice/configure
M       dice/configure.in
M       dice/src/parser/c-c++/c-parser.yy
M       dice/src/parser/idl/idl-parser.yy

Adam Lackorzynski wrote:

> Hi,
> On Tue Jul 14, 2009 at 09:04:46 +0300, Roman Beslik wrote:
>  
>> It seems that tudos/dice/src/fe/*.h files is not included with
>> "#include" in tudos/dice/src/parser/idl/idl-parser.tab.hh, because
>> when I include them by hand, "g++ ..." works out without an error.
>>    
>>> yacc --version
>>>      
>> bison (GNU Bison) 2.4.1
>>    
> it's the bison version which is a bit too recent for the source files. I
> don't know how easy the fix would be...
>
> Adam
>  


_______________________________________________
l4-hackers mailing list
l4-hackers@...
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Re: compiling Fiasco trunk, Bison trouble

by Björn Döbel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

> Here is a list of files that contain errors:
> $ svn status
> M       l4/pkg/dietlibc/lib/contrib/dietlibc/include/stdarg.h
> M       l4/pkg/dde/fbsd/lib/include/bsd/contrib/i386/include/stdarg.h
> M       l4/pkg/bootstrap/server/src/ARCH-amd64/libc32/include/stdarg.h
> M       l4/pkg/roottask/server/src/trampoline.c
> ?       l4/doc/dev-overview/_Makefile
> !       l4/doc/dev-overview/Makefile
> M       kernel/fiasco/src/kern/genchecksum.cc
> M       dice/configure
> M       dice/configure.in
> M       dice/src/parser/c-c++/c-parser.yy
> M       dice/src/parser/idl/idl-parser.yy
Cool. Would you mind sharing the output of "svn diff" with us as well?

Thanks in advance.
Bjoern


_______________________________________________
l4-hackers mailing list
l4-hackers@...
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

signature.asc (204 bytes) Download Attachment

Re: compiling Fiasco trunk, Bison trouble

by Roman Beslik :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello -- see the attachment.
Bjoern Doebel wrote:
> Hi,
> Cool. Would you mind sharing the output of "svn diff" with us as well?
>  


Index: l4/pkg/dietlibc/lib/contrib/dietlibc/include/stdarg.h
===================================================================
--- l4/pkg/dietlibc/lib/contrib/dietlibc/include/stdarg.h (revision 459)
+++ l4/pkg/dietlibc/lib/contrib/dietlibc/include/stdarg.h (working copy)
@@ -9,7 +9,7 @@
 #if (__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 96))
 
 typedef __builtin_va_list va_list;
-#define va_start(v,l) __builtin_stdarg_start((v),l)
+#define va_start(v,l)  __builtin_va_start((v),l)
 #define va_end __builtin_va_end
 #define va_arg __builtin_va_arg
 #define __va_copy(d,s) __builtin_va_copy((d),(s))
Index: l4/pkg/dde/fbsd/lib/include/bsd/contrib/i386/include/stdarg.h
===================================================================
--- l4/pkg/dde/fbsd/lib/include/bsd/contrib/i386/include/stdarg.h (revision 459)
+++ l4/pkg/dde/fbsd/lib/include/bsd/contrib/i386/include/stdarg.h (working copy)
@@ -48,8 +48,7 @@
 
 #if (defined(__GNUC__) && (__GNUC__ == 2 && __GNUC_MINOR__ > 95 || __GNUC__ >= 3) && !defined(__INTEL_COMPILER))
 
-#define va_start(ap, last) \
- __builtin_stdarg_start((ap), (last))
+#define va_start(v,l)  __builtin_va_start((v),(l))
 
 #define va_arg(ap, type) \
  __builtin_va_arg((ap), type)
Index: l4/pkg/bootstrap/server/src/ARCH-amd64/libc32/include/stdarg.h
===================================================================
--- l4/pkg/bootstrap/server/src/ARCH-amd64/libc32/include/stdarg.h (revision 459)
+++ l4/pkg/bootstrap/server/src/ARCH-amd64/libc32/include/stdarg.h (working copy)
@@ -7,7 +7,7 @@
 #if (__GNUC__ > 2) || (__GNUC__ == 2) && (__GNUC_MINOR__ > 96)
 
 typedef __builtin_va_list va_list;
-#define va_start(v,l) __builtin_stdarg_start((v),l)
+#define va_start(v,l)  __builtin_va_start((v),l)
 #define va_end __builtin_va_end
 #define va_arg __builtin_va_arg
 #define __va_copy(d,s) __builtin_va_copy((d),(s))
Index: l4/pkg/roottask/server/src/trampoline.c
===================================================================
--- l4/pkg/roottask/server/src/trampoline.c (revision 459)
+++ l4/pkg/roottask/server/src/trampoline.c (working copy)
@@ -77,7 +77,7 @@
   /* NORETURN */
 }
 
-#elif
+#else
 
 #error Unknown architecture!
 
Index: kernel/fiasco/src/kern/genchecksum.cc
===================================================================
--- kernel/fiasco/src/kern/genchecksum.cc (revision 459)
+++ kernel/fiasco/src/kern/genchecksum.cc (working copy)
@@ -99,7 +99,8 @@
   
   for (i=0; i<2; i++)
     {
-      char c, *idx;
+      char c;
+      const char *idx;
       
       if (! this_char(fd, &c))
  return 0;
Index: dice/configure
===================================================================
--- dice/configure (revision 459)
+++ dice/configure (working copy)
@@ -20624,7 +20624,7 @@
 else
 
   set `$YACC --version|grep 'GNU Bison'|cut -d ' ' -f 4|sed -e 's/\./ /'`
- if test "(" "${1}" = "2" -a "(" "${2}" = "1a" -o "${2}" = "1b" -o "${2}" = "2" -o "${2}" = "3" ")" ")"; then
+ if test "(" "${1}" = "2" -a "(" "${2}" = "1a" -o "${2}" = "1b" -o "${2}" = "2" -o "${2}" = "4.1" ")" ")"; then
     dice_bison_version="${1}.${2} (ok)"
   else
     dice_bison_version=invalid
Index: dice/src/parser/c-c++/c-parser.yy
===================================================================
--- dice/src/parser/c-c++/c-parser.yy (revision 459)
+++ dice/src/parser/c-c++/c-parser.yy (working copy)
@@ -3,7 +3,7 @@
 %defines
 %define "parser_class_name" "c_parser"
 
-%{
+%code requires {
 #include "fe/FEFunctionDeclarator.h"
 #include "fe/FEArrayDeclarator.h"
 #include "fe/FEEnumDeclarator.h"
@@ -29,7 +29,7 @@
 #if defined(HAVE_CONFIG_H)
 #include "config.h"
 #endif
-%}
+}
 
 // The parsing context.
 %parse-param { c_parser_driver& driver }
@@ -82,9 +82,9 @@
   std::vector<CFETypeSpec*>* vecType;
 };
 
-%{
+%code {
 #include "c-parser-driver.hh"
-%}
+}
 
 %token EOF_TOKEN 0 "end of file"
 %token INVALID 1 "invalid token"
Index: dice/src/parser/idl/idl-parser.yy
===================================================================
--- dice/src/parser/idl/idl-parser.yy (revision 459)
+++ dice/src/parser/idl/idl-parser.yy (working copy)
@@ -3,7 +3,7 @@
 %defines
 %define "parser_class_name" "idl_parser"
 
-%{
+%code requires {
 #include "fe/FESimpleType.h"
 #include "fe/FEIdentifier.h"
 #include "fe/FEInterface.h"
@@ -43,7 +43,7 @@
 #if defined(HAVE_CONFIG_H)
 #include "config.h"
 #endif
-%}
+}
 
 // The parsing context.
 %parse-param { idl_parser_driver& driver }
@@ -105,9 +105,9 @@
   vector<PortSpec>* pSpecs;
 };
 
-%{
+%code {
 #include "idl-parser-driver.hh"
-%}
+}
 
 %token EOF_TOKEN 0 "end of file"
 %token INVALID 1 "invalid token"
Index: dice/configure.in
===================================================================
--- dice/configure.in (revision 459)
+++ dice/configure.in (working copy)
@@ -49,7 +49,7 @@
 fi
 AC_CACHE_CHECK([for bison version], dice_bison_version, [
   set `$YACC --version|grep 'GNU Bison'|cut -d ' ' -f 4|sed -e 's/\./ /g'`
-  if test "(" "${1}" = "2" -a "(" "${2}" = "1a" -o "${2}" = "1b" -o "${2}" = "2" -o "${2}" = "3" ")" ")"; then
+  if test "(" "${1}" = "2" -a "(" "${2}" = "1a" -o "${2}" = "1b" -o "${2}" = "2" -o "${2}" = "4" ")" ")"; then
     dice_bison_version="${1}.${2} (ok)"
   else
     dice_bison_version=invalid

_______________________________________________
l4-hackers mailing list
l4-hackers@...
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers

Re: compiling Fiasco trunk, Bison trouble

by Adam Lackorzynski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Wed Jul 29, 2009 at 13:03:57 +0300, Roman Beslik wrote:
> Hello -- see the attachment.

Just for the diff of .yy files. The change is fine per se but
unfortunately breaks with older versions of bison which are still used.
One way could be to include the generated files in the distribution.



Adam
--
Adam                 adam@...
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/

_______________________________________________
l4-hackers mailing list
l4-hackers@...
http://os.inf.tu-dresden.de/mailman/listinfo/l4-hackers