[Asterisk-Users] festival and gcc 3.3.2 (Fedora Core 1)

Reed Wade reed at cadre5.com
Sun May 2 00:13:51 MST 2004


That did it.

thank you, thank you, thank you,
-reed


Marc Sutter wrote:
> Hi,
> 
> had the same problem... and we wrote a patch.
> 
> This patch's are for speech_tools 1.2.3 and festival 1.4.3.
> 
> to use in the corresponding directory with:
> 
> #patch -p1 <patch...... 
> 
> Hope this help. If so let it know.
> 
> Have fun !!!
> 
> 
> On Sat, 2004-05-01 at 02:35, Reed Wade wrote:
> 
>>Can someone tell me how to build festival on a machine with gcc 3.3.2?
>>
>>I've searched all around and even found a reference or two that the 
>>problem exists but I'm not seeing the fix.
>>
>>thanks!
>>-reed
>>
>>
>>Symtoms are --
>>
>>./configure, then....
>>
>>[root at telephone speech_tools]# make
>>Check system type
>>Remake modincludes.inc
>>         NATIVE_AUDIO
>>                 ok
>>         EDITLINE
>>                 config/modules/editline.mak
>>         SIOD
>>                 siod/siod.mak
>>         WAGON
>>                 stats/wagon/wagon.mak
>>         SCFG
>>                 grammar/scfg/scfg.mak
>>         WFST
>>                 grammar/wfst/wfst.mak
>>         OLS
>>                 stats/ols.mak
>>         RXP
>>                 rxp/rxp.mak
>>         LINUX16_AUDIO
>>                 config/modules/linux16_audio.mak
>>Making in directory ./siod ...
>>making dependencies -- siodeditline.c cc1: warning: 
>>"-Wno-non-template-friend" is valid for C++ but not for C/ObjC
>>cc1: warning: "-Wno-deprecated" is valid for C++ but not for C/ObjC
>>el_complete.c cc1: warning: "-Wno-non-template-friend" is valid for C++ 
>>but not for C/ObjC
>>cc1: warning: "-Wno-deprecated" is valid for C++ but not for C/ObjC
>>editline.c cc1: warning: "-Wno-non-template-friend" is valid for C++ but 
>>not for C/ObjC
>>cc1: warning: "-Wno-deprecated" is valid for C++ but not for C/ObjC
>>el_sys_unix.c cc1: warning: "-Wno-non-template-friend" is valid for C++ 
>>but not for C/ObjC
>>cc1: warning: "-Wno-deprecated" is valid for C++ but not for C/ObjC
>>slib.cc slib_core.cc slib_doc.cc slib_file.cc slib_format.cc 
>>slib_list.cc slib_math.cc slib_sys.cc slib_server.cc slib_str.cc 
>>slib_xtr.cc slib_repl.cc siod_fringe.cc siod_server.cc io.cc trace.cc 
>>EST_SiodServer.cc siod.cc siod_est.cc
>>g++ -c -fno-implicit-templates -O3 -Wall -Wno-non-template-friend 
>>-Wno-deprecated -DSUPPORT_EDITLINE -I../include slib.cc
>>In file included from ../include/EST_String.h:50,
>>                  from ../include/siod.h:17,
>>                  from slib.cc:88:
>>../include/EST_iostream.h:54:26: strstream.h: No such file or directory
>>make[1]: *** [slib.o] Error 1
>>make: *** [siod] Error 2
>>[root at telephone speech_tools]#
>>
>>
>>
>>_______________________________________________
>>Asterisk-Users mailing list
>>Asterisk-Users at lists.digium.com
>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>
>>------------------------------------------------------------------------
>>
>>diff -ur festival.bad/src/modules/base/phrasify.cc festival/src/modules/base/phrasify.cc
>>--- festival.bad/src/modules/base/phrasify.cc	2001-04-04 13:55:20.000000000 +0200
>>+++ festival/src/modules/base/phrasify.cc	2004-04-25 15:57:52.000000000 +0200
>>@@ -218,7 +218,7 @@
>> 	    EST_Val npbreak = wagon_predict(w,phrase_type_tree);
>> 	    w->set("pbreak",npbreak.string());  // may reset to BB
>> 	}
>>-	pbreak = w->f("pbreak");
>>+	pbreak = w->f("pbreak").string();
>> 	if (pbreak == "B")
>> 	    w->set("blevel",3);
>> 	else if (pbreak == "mB")
>>diff -ur festival.bad/src/modules/base/word.cc festival/src/modules/base/word.cc
>>--- festival.bad/src/modules/base/word.cc	2001-04-04 13:55:20.000000000 +0200
>>+++ festival/src/modules/base/word.cc	2004-04-25 15:59:55.000000000 +0200
>>@@ -64,10 +64,10 @@
>>     for (w=u->relation("Word")->first(); w != 0; w = next(w))
>>     {
>> 	lpos = NIL;
>>-	pos = ffeature(w,"hg_pos");
>>+	pos = ffeature(w,"hg_pos").string();
>>                         // explicit homograph pos disambiguation
>> 	if (pos == "0")
>>-	    pos = ffeature(w,"pos");
>>+	    pos = ffeature(w,"pos").string();
>> 	if (pos != "0")
>> 	    lpos = rintern(pos);
>> 
>>@@ -100,8 +100,8 @@
>>     //  from which a list can be read.
>>     EST_String p;
>> 
>>-    if (((p = ffeature(w,"phonemes")) != "0") ||
>>-	((p = ffeature(w,"R:Token.parent.phonemes")) != "0"))
>>+    if (((p = ffeature(w,"phonemes").string()) != "0") ||
>>+	((p = ffeature(w,"R:Token.parent.phonemes").string()) != "0"))
>>     {
>> 	LISP phones = read_from_lstring(strintern(p));
>> 
>>diff -ur festival.bad/src/modules/Intonation/int_tree.cc festival/src/modules/Intonation/int_tree.cc
>>--- festival.bad/src/modules/Intonation/int_tree.cc	2001-04-04 13:55:20.000000000 +0200
>>+++ festival/src/modules/Intonation/int_tree.cc	2004-04-25 15:58:42.000000000 +0200
>>@@ -87,11 +87,11 @@
>>     for (s=u->relation("Syllable")->first(); s != 0; s=next(s))
>>     {
>> 	if ((paccent = accent_specified(s)) == "0") // check if pre-specified
>>-	    paccent = wagon_predict(s,accent_tree);
>>+	    paccent = wagon_predict(s,accent_tree).string();
>> 	if (paccent != "NONE")
>> 	    add_IntEvent(u,s,paccent);
>> 	if ((ptone = tone_specified(s)) == "0")
>>-	    ptone = wagon_predict(s,endtone_tree);
>>+	    ptone = wagon_predict(s,endtone_tree).string();
>> 	if (ptone != "NONE")
>> 	    add_IntEvent(u,s,ptone);
>>     }
>>@@ -107,11 +107,11 @@
>>     EST_Item *token = parent(word,"Token");
>>     EST_String paccent("0");
>>     if (token)
>>-	paccent = ffeature(token,"accent");
>>+	paccent = ffeature(token,"accent").string();
>> 	
>>     if (paccent == "0")
>>     {
>>-	paccent = ffeature(word,"accent");
>>+	paccent = ffeature(word,"accent").string();
>> 	if (paccent == "0")
>> 	    return paccent;
>>     }
>>@@ -139,11 +139,11 @@
>>     EST_Item *token = parent(word,"Token");
>>     EST_String ptone("0");
>>     if (token)
>>-	ptone = ffeature(token,"tone");
>>+	ptone = ffeature(token,"tone").string();
>> 
>>     if (ptone == "0")
>>     {
>>-	ptone = ffeature(word,"tone");
>>+	ptone = ffeature(word,"tone").string();
>> 	if (ptone == "0")
>> 	    return ptone;
>>     }
>>diff -ur festival.bad/src/modules/Text/token.cc festival/src/modules/Text/token.cc
>>--- festival.bad/src/modules/Text/token.cc	2001-04-04 13:55:20.000000000 +0200
>>+++ festival/src/modules/Text/token.cc	2004-04-25 15:58:56.000000000 +0200
>>@@ -230,7 +230,7 @@
>> 	else
>> 	    return cons(strintern(tok),NIL);
>>     }
>>-    else if ((token_pos = ffeature(token,"token_pos")) == "ordinal")
>>+    else if ((token_pos = ffeature(token,"token_pos").string()) == "ordinal")
>> 	return say_num_as_ordinal(tok);
>>     else if (token_pos == "year")
>> 	return say_num_as_year(tok);
>>diff -ur festival.bad/src/modules/Text/xxml.cc festival/src/modules/Text/xxml.cc
>>--- festival.bad/src/modules/Text/xxml.cc	2001-04-04 13:55:20.000000000 +0200
>>+++ festival/src/modules/Text/xxml.cc	2004-04-25 16:00:18.000000000 +0200
>>@@ -93,7 +93,7 @@
>> 	    cerr << "xxml parse error: unexpected end of file \n";
>> 	    festival_error();
>> 	}
>>-	line = ts.get_upto_eoln();
>>+	line = ts.get_upto_eoln().string();
>> 	type = line.at(0,1);
>> 	remainder = line.after(0);
>> 	if (type == "-")
>>@@ -159,7 +159,7 @@
>>     EST_Token t;
>> 
>>     ts.open_string(remainder);
>>-    name = ts.get();
>>+    name = ts.get().string();
>>     if ((t=ts.get()) == "IMPLIED")
>> 	att = cons(rintern(name),cons(NIL,NIL));
>>     else if (t == "TOKEN")
>>diff -ur festival.bad/src/modules/UniSyn_diphone/us_diphone_index.cc festival/src/modules/UniSyn_diphone/us_diphone_index.cc
>>--- festival.bad/src/modules/UniSyn_diphone/us_diphone_index.cc	2002-07-02 13:18:30.000000000 +0200
>>+++ festival/src/modules/UniSyn_diphone/us_diphone_index.cc	2004-04-25 15:59:16.000000000 +0200
>>@@ -106,9 +106,9 @@
>> 
>>     if (!item)
>> 	return "";
>>-    else if ((d1 = item->f(dname+"_"+dir,def)) != "0")
>>+    else if ((d1 = item->f(dname+"_"+dir,def).string()) != "0")
>> 	return d1;
>>-    else if ((d1 = item->f(dname,def)) != "0")
>>+    else if ((d1 = item->f(dname,def).string()) != "0")
>> 	return d1;
>>     else
>> 	return item->f("name","0").string();
>>
>>
>>------------------------------------------------------------------------
>>
>>diff -ur speech_tools.bad/grammar/wfst/wfst_train.cc speech_tools/grammar/wfst/wfst_train.cc
>>--- speech_tools.bad/grammar/wfst/wfst_train.cc	2002-12-26 21:29:40.000000000 +0100
>>+++ speech_tools/grammar/wfst/wfst_train.cc	2004-04-25 14:28:51.000000000 +0200
>>@@ -95,7 +95,7 @@
>> 	LISP s = NIL;
>> 	do
>> 	{
>>-	    t = ts.get();
>>+	    t = ts.get().string();
>> 	    id = wfst.in_symbol(t);
>> 	    if (id == -1)
>> 	    {
>>diff -ur speech_tools.bad/include/EST_Complex.h speech_tools/include/EST_Complex.h
>>--- speech_tools.bad/include/EST_Complex.h	2001-04-04 13:55:32.000000000 +0200
>>+++ speech_tools/include/EST_Complex.h	2004-04-25 14:25:56.000000000 +0200
>>@@ -100,7 +100,7 @@
>> friend EST_Complex operator / (float x, const EST_Complex &z);
>> 
>> 
>>-friend ostream& operator<< (ostream& s,  const EST_Complex& a)
>>+friend std::ostream& operator<< (std::ostream& s,  const EST_Complex& a)
>> { s << a.r << " " << a.i; return s;}
>> };  
>> 
>>diff -ur speech_tools.bad/include/EST_iostream.h speech_tools/include/EST_iostream.h
>>--- speech_tools.bad/include/EST_iostream.h	2001-04-04 13:55:32.000000000 +0200
>>+++ speech_tools/include/EST_iostream.h	2004-04-25 14:24:55.000000000 +0200
>>@@ -50,8 +50,8 @@
>> #   include <iostream.h>
>> #   include <strstrea.h>
>> #elif defined(SYSTEM_IS_UNIX)
>>-#   include <iostream.h>
>>-#   include <strstream.h>
>>+#   include <iostream>
>>+#   include <strstream>
>> #elif defined(SYSTEM_IS_WIN32)
>> #   include "win32/EST_iostream_win32.h"
>> #   include <strstrea.h>
>>diff -ur speech_tools.bad/include/EST_THash.h speech_tools/include/EST_THash.h
>>--- speech_tools.bad/include/EST_THash.h	2002-12-26 16:48:53.000000000 +0100
>>+++ speech_tools/include/EST_THash.h	2004-04-25 14:29:18.000000000 +0200
>>@@ -289,9 +289,9 @@
>> 
>> 
>>   /// Give the iterator a sensible name.
>>-  typedef EST_TStructIterator< EST_THash<EST_String, V>, IPointer, EST_Hash_Pair<EST_String, V> > Entries;
>>+  typedef EST_TStructIterator< EST_THash<EST_String, V>, typename EST_TStringHash::IPointer, EST_Hash_Pair<EST_String, V> > Entries;
>> 
>>-  typedef EST_TRwStructIterator< EST_THash<EST_String, V>, IPointer, EST_Hash_Pair<EST_String, V> > RwEntries;
>>+  typedef EST_TRwStructIterator< EST_THash<EST_String, V>, typename EST_TStringHash::IPointer, EST_Hash_Pair<EST_String, V> > RwEntries;
>>   //@}
>> 
>>   typedef EST_String KeyEntry;
>>@@ -300,8 +300,8 @@
>>     typedef struct IPointer_k_s IPointer_k; */
>> 
>>   /// Give the iterator a sensible name.
>>-  typedef EST_TIterator< EST_THash<EST_String, V>, IPointer_k, EST_String > KeyEntries;
>>-  typedef EST_TRwIterator< EST_THash<EST_String, V>, IPointer_k, EST_String > KeyRwEntries;
>>+  typedef EST_TIterator< EST_THash<EST_String, V>, typename EST_TStringHash::IPointer_k, EST_String > KeyEntries;
>>+  typedef EST_TRwIterator< EST_THash<EST_String, V>, typename EST_TStringHash::IPointer_k, EST_String > KeyRwEntries;
>> };
>> 
>> 
>>diff -ur speech_tools.bad/ling_class/EST_relation_aux.cc speech_tools/ling_class/EST_relation_aux.cc
>>--- speech_tools.bad/ling_class/EST_relation_aux.cc	2001-04-04 13:55:32.000000000 +0200
>>+++ speech_tools/ling_class/EST_relation_aux.cc	2004-04-25 14:26:11.000000000 +0200
>>@@ -416,7 +416,7 @@
>> 	if (k->F("end") > lab.head()->F("end"))
>> 	    break;
>> 
>>-    filename = k->f("file");
>>+    filename = k->f("file").string();
>>     a.f.set("name", (filename + ext));
>>     kstart = 0.0;
>>     
>>@@ -454,7 +454,7 @@
>> 	    k = next(k);
>> 	    kstart = start(k);
>> 	    a.clear();
>>-	    filename = k->f("file");
>>+	    filename = k->f("file").string();
>> 	    a.f.set("name", (filename + ext));
>> 	}
>> 	else
>>diff -ur speech_tools.bad/siod/slib_file.cc speech_tools/siod/slib_file.cc
>>--- speech_tools.bad/siod/slib_file.cc	2002-11-22 13:52:59.000000000 +0100
>>+++ speech_tools/siod/slib_file.cc	2004-04-25 14:25:29.000000000 +0200
>>@@ -13,7 +13,7 @@
>> #include "siodp.h"
>> #include "EST_Pathname.h"
>> 
>>-static void siod_string_print(LISP exp, ostrstream &sd);
>>+static void siod_string_print(LISP exp, std::ostrstream &sd);
>> 
>> LISP open_files = NIL;
>> 
>>@@ -109,7 +109,7 @@
>>     return NIL;
>> }
>> 
>>-static void siod_string_print(LISP exp, ostrstream &sd)
>>+static void siod_string_print(LISP exp, std::ostrstream &sd)
>> {
>>     LISP tmp;
>>     int i;
>>@@ -206,7 +206,7 @@
>> 
>> EST_String siod_sprint(LISP exp)
>> {
>>-    ostrstream sd;
>>+    std::ostrstream sd;
>>     EST_String r;
>> 
>>     siod_string_print(exp,sd);
>>diff -ur speech_tools.bad/speech_class/EST_TrackFile.cc speech_tools/speech_class/EST_TrackFile.cc
>>--- speech_tools.bad/speech_class/EST_TrackFile.cc	2002-09-28 16:15:02.000000000 +0200
>>+++ speech_tools/speech_class/EST_TrackFile.cc	2004-04-25 14:27:25.000000000 +0200
>>@@ -570,15 +570,15 @@
>>     
>>     while (1)
>>     {
>>-	t = ts.get_upto_eoln();
>>+	t = ts.get_upto_eoln().string();
>> 	//	cout << "t=" << t << endl;
>> 	if (t.contains("teaching output included"))
>> 	    teaching = 1;
>> 	if (!t.contains(":"))
>> 	    break;
>> 	str.open_string(t);
>>-	k = str.get_upto(":");
>>-	v = str.get_upto_eoln();
>>+	k = str.get_upto(":").string();
>>+	v = str.get_upto_eoln().string();
>> 	if (k == "No. of output units")
>> 	    num_channels = v.Int();
>> 	if (k == "No. of patterns")
>>diff -ur speech_tools.bad/speech_class/EST_wave_cuts.cc speech_tools/speech_class/EST_wave_cuts.cc
>>--- speech_tools.bad/speech_class/EST_wave_cuts.cc	2001-04-04 13:55:32.000000000 +0200
>>+++ speech_tools/speech_class/EST_wave_cuts.cc	2004-04-25 14:26:37.000000000 +0200
>>@@ -67,7 +67,7 @@
>> 	if (end < start)
>> 	    continue;
>> 	wave_subwave(a, sig, start, end-start);
>>-	filename = k->f("file");
>>+	filename = k->f("file").string();
>> 	a.set_name(filename + ext);
>> 	wl.append(a);
>> 	start = end;
>>@@ -87,7 +87,7 @@
>>     for (k = keylab.head(); k; k = next(k))
>>     {
>> 	end = k->F("end",0);
>>-	key_file_name = k->f("file");
>>+	key_file_name = k->f("file").string();
>> 	if (key_file_name == file)
>> 	{
>> 	    wave_subwave(part, sig, start, end-start);
>>diff -ur speech_tools.bad/speech_class/ssff.cc speech_tools/speech_class/ssff.cc
>>--- speech_tools.bad/speech_class/ssff.cc	2001-04-04 13:55:32.000000000 +0200
>>+++ speech_tools/speech_class/ssff.cc	2004-04-25 14:26:59.000000000 +0200
>>@@ -99,7 +99,7 @@
>>     
>>     while (ts.peek() != "-----------------")
>>     {
>>-	c = ts.get();
>>+	c = ts.get().string();
>> 	if (c == "Comment")
>> 	    ts.get_upto_eoln();
>> 	else if (c == "Start_Time")
>>@@ -124,9 +124,9 @@
>> 	}
>> 	else if (c == "Column")
>> 	{
>>-	    name = ts.get();
>>-	    type = ts.get();
>>-	    size = ts.get();
>>+	    name = ts.get().string();
>>+	    type = ts.get().string();
>>+	    size = ts.get().string();
>> 	    cname = EST_String("Channel_")+itoString(num_channels);
>> 	    channels.set(cname+".name",name);
>> 	    channels.set(cname+".type",type);
>>@@ -141,7 +141,7 @@
>> 		 (c == "preemphasis") ||
>> 		 (c == "frame_duration"))
>> 	{
>>-		type = ts.get();
>>+		type = ts.get().string();
>> 		if (type == "SHORT")
>> 		    tr.f_set(c,atoi(ts.get().string()));
>> 		else if (type == "DOUBLE")
>>diff -ur speech_tools.bad/stats/wagon/dlist.cc speech_tools/stats/wagon/dlist.cc
>>--- speech_tools.bad/stats/wagon/dlist.cc	2001-04-04 15:11:28.000000000 +0200
>>+++ speech_tools/stats/wagon/dlist.cc	2004-04-25 14:27:37.000000000 +0200
>>@@ -83,7 +83,7 @@
>> 
>>     for (p=dataset.head(); p != 0; p=next(p))
>>     {
>>-	predict = dlist->predict(*dataset(p));
>>+	predict = dlist->predict(*dataset(p)).string();
>> 	type = dataset.ftype(0);
>> 	real = wgn_discretes[type].name(dataset(p)->get_int_val(0));
>> 	pairs.add_item(real,predict,1);
>>diff -ur speech_tools.bad/stats/wagon/wagon.cc speech_tools/stats/wagon/wagon.cc
>>--- speech_tools.bad/stats/wagon/wagon.cc	2001-09-30 21:13:33.000000000 +0200
>>+++ speech_tools/stats/wagon/wagon.cc	2004-04-25 14:28:38.000000000 +0200
>>@@ -276,7 +276,7 @@
>>     for (p=dataset.head(); p != 0; p=next(p))
>>     {
>> 	pnode = tree.predict_node((*dataset(p)));
>>-	predict = pnode->get_impurity().value();
>>+	predict = pnode->get_impurity().value().string();
>> 	if (wgn_count_field == -1)
>> 	    count = 1.0;
>> 	else
>>diff -ur speech_tools.bad/testsuite/hash_regression.cc speech_tools/testsuite/hash_regression.cc
>>--- speech_tools.bad/testsuite/hash_regression.cc	2002-12-27 14:00:24.000000000 +0100
>>+++ speech_tools/testsuite/hash_regression.cc	2004-04-25 14:29:00.000000000 +0200
>>@@ -71,7 +71,7 @@
>>   {
>>     EST_String line;
>> 
>>-    line = file.get();
>>+    line = file.get().string();
>> 
>>     if (file.eof())
>>       break;
>>diff -ur speech_tools.bad/utils/EST_ServiceTable.cc speech_tools/utils/EST_ServiceTable.cc
>>--- speech_tools.bad/utils/EST_ServiceTable.cc	2002-12-26 16:46:20.000000000 +0100
>>+++ speech_tools/utils/EST_ServiceTable.cc	2004-04-25 14:25:46.000000000 +0200
>>@@ -154,15 +154,15 @@
>>       Entry &entry = entries.t.val(name);
>> 
>>       if (type=="host")
>>-	entry.hostname=val;
>>+	entry.hostname=val.string();
>>       else if (type=="address")
>>-	entry.address=val;
>>+	entry.address=val.string();
>>       else if (type=="type")
>>-	entry.type=val;
>>+	entry.type=val.string();
>>       else if (type=="port")
>> 	entry.port=val;
>>       else if (type=="cookie")
>>-	entry.cookie=val;
>>+	entry.cookie=val.string();
>>       else
>> 	EST_warning("Unknown entry field '%s' at %s",
>> 		    (const char *)type,



More information about the asterisk-users mailing list