Menu

#9 Compile problems with gcc 3.4.6

open
nobody
None
5
2006-11-27
2006-11-27
No

First problem: [SOLVED]
[...]
basic_dfa_generator.cc: In member function `BasicDfaSpec& BasicDfaGenerator::createBasicDfa(const LexicalStateSpec&)':
basic_dfa_generator.cc:245: error: array bound forbidden after parenthesized type-id
basic_dfa_generator.cc:245: note: try removing the parentheses around the type-id

Solution:
--- src/basic_dfa_generator.cc 2002-05-27 04:58:12.000000000 +0200
+++ src/basic_dfa_generator.cc.new 2006-11-27 11:16:22.000000000 +0100
@@ -242,7 +242,7 @@

// This vector tells us where leave nodes are. At index i, we have a a pointer
// to leaf node with pos == i
- DfaSourceRe **leaves = new (DfaSourceRe*)[nr.counter];
+ DfaSourceRe **leaves = new DfaSourceRe*[nr.counter];
LeafFinder lf(leaves);
regexp->dfTraverse(lf);

Second problem: [SOLVED]
[...]
scanner_dfa_writer.cc: In member function `void ScannerDfaWriter::writeDfa(BasicDfaSpec&, BasicDfaProfile&)':
scanner_dfa_writer.cc:1136: error: expected primary-expression before "struct"
make[3]: *** [scanner_dfa_writer.o] Error 1

Solution:
--- src/scanner_dfa_writer.cc 2006-11-27 11:29:27.000000000 +0100
+++ src/scanner_dfa_writer.cc.new 2006-11-27 11:29:50.000000000 +0100
@@ -1133,7 +1133,7 @@

stable_sort<vector<Wtrans>::iterator, t_Wgtr>(weightedTrans.begin(),
weightedTrans.end(),
- struct t_Wgtr());
+ t_Wgtr());
}

// dump transitions:

Third problem: [_NOT_ SOLVED]
[...]
vbitset.cc:46: error: too few template-parameter-lists
make[3]: *** [vbitset.o] Error 1

I think it is a problem with the linker:
I just tried making the static field public, but it didn't solve... Browsing on the web let me know there were some syntax problems with the precompiler but I could not get it solved.

Try giving a look at:
http://www.storkyak.com/2006/07/gnu-c-error-too-few-template-parameter.html
and see if you can get some info.

Hoping you'll find a patch,
Regards,
Simone.

Discussion

  • Simone Gammeri

    Simone Gammeri - 2006-12-04

    Logged In: YES
    user_id=1654836
    Originator: YES

    Good news... I can compile it now!!! Here's the last patch:

    --- vbitset.cc 2002-05-01 23:18:37.000000000 +0200
    +++ vbitset.cc.new 2006-12-04 17:05:23.000000000 +0100
    @@ -43,7 +43,7 @@
    #include "vbitset.hh"

    // dont ask...
    -allocator<unsigned long> vBitset_base<unsigned long>::M_alloc =
    +template<> allocator<unsigned long> vBitset_base<unsigned long>::M_alloc =
    allocator<unsigned long>();

    /**

    Hope this helped some one... In attachment the complete patch!!!

    Regards,
    Simone.

     
  • Simone Gammeri

    Simone Gammeri - 2006-12-08

    Logged In: YES
    user_id=1654836
    Originator: YES

    File Added: patch.txt

     
  • Simone Gammeri

    Simone Gammeri - 2006-12-08

    Patch for >=gcc-3.4

     

Log in to post a comment.