www.digitalmars.com         C & C++   DMDScript  

D.gnu - Build fails

reply "John Colvin" <john.loughran.colvin gmail.com> writes:
I haven't been able to get GDC to build for a while, the same 
errors come up on for me on ubuntu and fedora.

In file included from ../../gcc-4.8-20121118/gcc/d/d-lang.cc:28:0:
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:24: error: ‘gc’ 
has not been declared
    VEC(constructor_elt, gc) *head;
                         ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:26: error: ISO C++ 
forbids declaration of ‘VEC’ with no type [-fpermissive]
    VEC(constructor_elt, gc) *head;
                           ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:26: error: expected 
‘;’ at end of member declaration
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:29: error: ISO C++ 
forbids declaration of ‘head’ with no type [-fpermissive]
    VEC(constructor_elt, gc) *head;
                              ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h: In member function 
‘void CtorEltMaker::reserve(int)’:
../../gcc-4.8-20121118/gcc/d/d-codegen.h:560:33: error: expected 
primary-expression before ‘,’ token
    { VEC_reserve (constructor_elt, gc, this->head, i); }
                                  ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:560:35: error: ‘gc’ 
was not declared in this scope
    { VEC_reserve (constructor_elt, gc, this->head, i); }
                                    ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:560:52: error: 
‘VEC_reserve’ was not declared in this scope
    { VEC_reserve (constructor_elt, gc, this->head, i); }
                                                     ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h: In member function 
‘void CtorEltMaker::cons(tree, tree)’:
../../gcc-4.8-20121118/gcc/d/d-codegen.h:565:35: error: expected 
primary-expression before ‘,’ token
      VEC_safe_push (constructor_elt, gc, this->head, ce);
                                    ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:565:37: error: ‘gc’ 
was not declared in this scope
      VEC_safe_push (constructor_elt, gc, this->head, ce);
                                      ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:565:55: error: 
‘VEC_safe_push’ was not declared in this scope
      VEC_safe_push (constructor_elt, gc, this->head, ce);
                                                        ^
make[3]: *** [d/d-lang.glue.o] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from 
../../gcc-4.8-20121118/gcc/d/d-decls.cc:32:0:
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:24: error: ‘gc’ 
has not been declared
    VEC(constructor_elt, gc) *head;
                         ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:26: error: ISO C++ 
forbids declaration of ‘VEC’ with no type [-fpermissive]
    VEC(constructor_elt, gc) *head;
                           ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:26: error: expected 
‘;’ at end of member declaration
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:29: error: ISO C++ 
forbids declaration of ‘head’ with no type [-fpermissive]
    VEC(constructor_elt, gc) *head;
                              ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h: In member function 
‘void CtorEltMaker::reserve(int)’:
../../gcc-4.8-20121118/gcc/d/d-codegen.h:560:33: error: expected 
primary-expression before ‘,’ token
    { VEC_reserve (constructor_elt, gc, this->head, i); }
                                  ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:560:35: error: ‘gc’ 
was not declared in this scope
    { VEC_reserve (constructor_elt, gc, this->head, i); }
                                    ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:560:52: error: 
‘VEC_reserve’ was not declared in this scope
    { VEC_reserve (constructor_elt, gc, this->head, i); }
                                                     ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h: In member function 
‘void CtorEltMaker::cons(tree, tree)’:
../../gcc-4.8-20121118/gcc/d/d-codegen.h:565:35: error: expected 
primary-expression before ‘,’ token
      VEC_safe_push (constructor_elt, gc, this->head, ce);
                                    ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:565:37: error: ‘gc’ 
was not declared in this scope
      VEC_safe_push (constructor_elt, gc, this->head, ce);
                                      ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:565:55: error: 
‘VEC_safe_push’ was not declared in this scope
      VEC_safe_push (constructor_elt, gc, this->head, ce);
                                                        ^
make[3]: *** [d/d-decls.glue.o] Error 1


gcc snapshot gcc-4.8-20121118
gdc master from git

I got the same when using the latest gcc from svn

Any ideas?
Nov 26 2012
next sibling parent "John Colvin" <john.loughran.colvin gmail.com> writes:
Sorry, that was a bit of a mess from using -j5
Here it is again, cleaner, including the compilation that has the 
problem:

/home/john/Git/GDC/objdir/./prev-gcc/g++ 
-B/home/john/Git/GDC/objdir/./prev-gcc/ 
-B/opt/gdc/x86_64-unknown-linux-gnu/bin/ -nostdinc++ 
-B/home/john/Git/GDC/objdir/prev-x86_64-unknown-linux-gnu/li
stdc++-v3/src/.libs 
-B/home/john/Git/GDC/objdir/prev-x86_64-unknown-linux-gnu/libstdc+
-v3/libsupc++/.libs 
-I/home/john/Git/GDC/objdir/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_
4-unknown-linux-gnu 
-I/home/john/Git/GDC/objdir/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include 
-I/home/john/Git/GDC/gcc-4.8-20121118/libstdc++-v3/libsupc++ 
-L/home/john/Git/GDC/objdir/prev-x86_64-unknown-linux-gnu/li
stdc++-v3/src/.libs 
-L/home/john/Git/GDC/objdir/prev-x86_64-unknown-linux-gnu/libstdc+
-v3/libsupc++/.libs 
  -DIN_GCC_FRONTEND -g -O2 -gtoggle -DIN_GCC   -fno-exceptions 
-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing 
-Wwrite-strings -Wcast-qual    -DHAVE_CONFIG_H -I. -Id 
-I../../gcc-4.8-20121118/gcc -I../../gcc-4.8-20121118/gcc/d 
-I../../gcc-4.8-20121118/gcc/../include 
-I../../gcc-4.8-20121118/gcc/../libcpp/include  
-I../../gcc-4.8-20121118/gcc/../libdecnumber 
-I../../gcc-4.8-20121118/gcc/../libdecnumber/bid 
-I../libdecnumber -I../../gcc-4.8-20121118/gcc/../libbacktrace    
-I. -Id -I../../gcc-4.8-20121118/gcc 
-I../../gcc-4.8-20121118/gcc/d 
-I../../gcc-4.8-20121118/gcc/../include 
-I../../gcc-4.8-20121118/gcc/../libcpp/include  
-I../../gcc-4.8-20121118/gcc/../libdecnumber 
-I../../gcc-4.8-20121118/gcc/../libdecnumber/bid 
-I../libdecnumber -I../../gcc-4.8-20121118/gcc/../libbacktrace   
-I../../gcc-4.8-20121118/gcc/d 
-I../../gcc-4.8-20121118/gcc/d/dfrontend -Id  -o d/d-lang.glue.o 
-c ../../gcc-4.8-20121118/gcc/d/d-lang.cc
In file included from ../../gcc-4.8-20121118/gcc/d/d-lang.cc:28:0:
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:24: error: ‘gc’ 
has not been declared
    VEC(constructor_elt, gc) *head;
                         ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:26: error: ISO C++ 
forbids declaration of ‘VEC’ with no type [-fpermissive]
    VEC(constructor_elt, gc) *head;
                           ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:26: error: expected 
‘;’ at end of member declaration
../../gcc-4.8-20121118/gcc/d/d-codegen.h:553:29: error: ISO C++ 
forbids declaration of ‘head’ with no type [-fpermissive]
    VEC(constructor_elt, gc) *head;
                              ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h: In member function 
‘void CtorEltMaker::reserve(int)’:
../../gcc-4.8-20121118/gcc/d/d-codegen.h:560:33: error: expected 
primary-expression before ‘,’ token
    { VEC_reserve (constructor_elt, gc, this->head, i); }
                                  ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:560:35: error: ‘gc’ 
was not declared in this scope
    { VEC_reserve (constructor_elt, gc, this->head, i); }
                                    ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:560:52: error: 
‘VEC_reserve’ was not declared in this scope
    { VEC_reserve (constructor_elt, gc, this->head, i); }
                                                     ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h: In member function 
‘void CtorEltMaker::cons(tree, tree)’:
../../gcc-4.8-20121118/gcc/d/d-codegen.h:565:35: error: expected 
primary-expression before ‘,’ token
      VEC_safe_push (constructor_elt, gc, this->head, ce);
                                    ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:565:37: error: ‘gc’ 
was not declared in this scope
      VEC_safe_push (constructor_elt, gc, this->head, ce);
                                      ^
../../gcc-4.8-20121118/gcc/d/d-codegen.h:565:55: error: 
‘VEC_safe_push’ was not declared in this scope
      VEC_safe_push (constructor_elt, gc, this->head, ce);
                                                        ^
make[3]: *** [d/d-lang.glue.o] Error 1
Nov 26 2012
prev sibling parent "lomereiter" <lomereiter gmail.com> writes:
This is because of recent change in vector API in GCC (they are 
moving from old C macros to C++ templates): 
http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec
Dec 07 2012