SphinxTrain fails to compile on Suse 8.2, using gcc 3.3, with the following error messages:
/usr/lib/gcc-lib/i486-suse-linux/3.3/include/varargs.h:4:2: #error "GCC no lonr implements <varargs.h>."
/usr/lib/gcc-lib/i486-suse-linux/3.3/include/varargs.h:5:2: #error "Revise youcode to use <stdarg.h>."
Is this a bug in SphinxTrain or in the gcc?
Does anybody know a simple solution?
However, sphinx2 and 3 compile with no errors.
Regards,
Christoph Becker
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The problem is that gcc changed in a way that broke older code. I managaged to get SphinxTrain to clean compile under cygwin using gcc 3.3.
Step 1:
Edit the files quit.c and wrec.h and change <varargs.h> to <stdarg.h>. (Both of these files are in the directory ~/SphinxTrain/src/programs/count_3phone)
Step 2:
Make the following changes to quit.c.
Change:
int quit (status,fmt,va_alist)
int status;
char *fmt;
va_dcl
{
va_list args;
Step 3:
There is a function in to a function in ~/SphinxTrain/src/programs/count_3phone/main.c called "unlimit". I'm not sure what unlimit() does, but it gave me a compile error. Comment it out.
Doing this I was able to do a clean make. I'm not sure what will happen next since this is my first attempt at using SphinxTrain.
Regards,
John M. Drake
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I found the same workaround as John to fix this problem with the new GCC, but could not figure out the unlimit problem... Seems that you fixed unlimit.c to do additional check wether to use unlimit() on Win32 systems. Thanks!
Actually after updating "wrec.h", "quit.c" and "unlimit.c" from the CVS (src/programs/count_3phone/) compilation worked fine.
I know a lot of people that just downloaded Sphinxtrain from there, tried to compile it and then abandoned using SphinTrain due to the compilation errors.
Thanks in advance
Reto Baumberger
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi John and Becker,
Thanks for you mail. As the maintainer of the code, I will call this a bug because we have no intention to ask every user to do the same the hack of yours.
From you mail, it seems to me SphinxTrain was using deprecated <vararg.h> , I will just do a global replace in that case to fix the code.
John, I want to know how unlimit gives you error, do you think you can send me the error message? Thanks in advance.
Arthur
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
for those who install sphinxtrain using cygwin, is there any problem with the training? i have install it using cygwin that have gcc 3.3.3 and the training can't go through kmeans_init. full with empty cluster warning and failed finally
after that, i try with redhat 8.0 and everything settled. i am curious why cygwin can't work with my sphinxtrain
anyone can tell me why?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
SphinxTrain fails to compile on Suse 8.2, using gcc 3.3, with the following error messages:
/usr/lib/gcc-lib/i486-suse-linux/3.3/include/varargs.h:4:2: #error "GCC no lonr implements <varargs.h>."
/usr/lib/gcc-lib/i486-suse-linux/3.3/include/varargs.h:5:2: #error "Revise youcode to use <stdarg.h>."
Is this a bug in SphinxTrain or in the gcc?
Does anybody know a simple solution?
However, sphinx2 and 3 compile with no errors.
Regards,
Christoph Becker
The problem is that gcc changed in a way that broke older code. I managaged to get SphinxTrain to clean compile under cygwin using gcc 3.3.
Step 1:
Edit the files quit.c and wrec.h and change <varargs.h> to <stdarg.h>. (Both of these files are in the directory ~/SphinxTrain/src/programs/count_3phone)
Step 2:
Make the following changes to quit.c.
Change:
int quit (status,fmt,va_alist)
int status;
char *fmt;
va_dcl
{
va_list args;
}
To:
int quit (int status,char *fmt, ...)
{
va_list args;
}
Step 3:
There is a function in to a function in ~/SphinxTrain/src/programs/count_3phone/main.c called "unlimit". I'm not sure what unlimit() does, but it gave me a compile error. Comment it out.
Doing this I was able to do a clean make. I'm not sure what will happen next since this is my first attempt at using SphinxTrain.
Regards,
John M. Drake
I found the same workaround as John to fix this problem with the new GCC, but could not figure out the unlimit problem... Seems that you fixed unlimit.c to do additional check wether to use unlimit() on Win32 systems. Thanks!
Actually after updating "wrec.h", "quit.c" and "unlimit.c" from the CVS (src/programs/count_3phone/) compilation worked fine.
I suggest to replace the Sphinxtrain package from http://www.speech.cs.cmu.edu/SphinxTrain/download.html
by a new CVS snapshot.
I know a lot of people that just downloaded Sphinxtrain from there, tried to compile it and then abandoned using SphinTrain due to the compilation errors.
Thanks in advance
Reto Baumberger
Hi John and Becker,
Thanks for you mail. As the maintainer of the code, I will call this a bug because we have no intention to ask every user to do the same the hack of yours.
From you mail, it seems to me SphinxTrain was using deprecated <vararg.h> , I will just do a global replace in that case to fix the code.
John, I want to know how unlimit gives you error, do you think you can send me the error message? Thanks in advance.
Arthur
BTW, for SphinxTrain, please try to check out the code from CVS because it always contains the latest bug fixes. -Arthur
Hi all
for those who install sphinxtrain using cygwin, is there any problem with the training? i have install it using cygwin that have gcc 3.3.3 and the training can't go through kmeans_init. full with empty cluster warning and failed finally
after that, i try with redhat 8.0 and everything settled. i am curious why cygwin can't work with my sphinxtrain
anyone can tell me why?
Download latest SphinxTrain from CVS and compile it under gcc 3.3.3 (Fedora 2)
TusharP