0

I'm installing HTK on the WSL on a windows machine. The .\configure run correctly but when i typed make all it can't work.

Here is the error code:

(cd HTKLib && make HTKLib.a) \
  || case "" in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory '/mnt/c/Users/ts4016/AppData/Local/HTK-3.4/htk/HTKLib'
gcc  -ansi -D_SVID_SOURCE -DOSS_AUDIO -D'ARCH="x86_64"' -Wall -Wno-switch -g -O2 -I.  -UPHNALG  -c -o esig_asc.o esig_asc.c
In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
                 from /usr/include/stdio.h:27,
                 from esignal.h:97,
                 from esig_asc.c:85:
/usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
In file included from esig_asc.c:85:
esignal.h:895:16: error: expected ‘)’ before ‘>=’ token
esignal.h:895:52: error: expected ‘)’ before ‘?’ token
......
In file included from esig_asc.c:88:
esig_asc.c: In function ‘ReadAsciiName’:
esig_asc.c:2641:19: error: ‘_ISalnum’ undeclared (first use in this function)
 2641 |                {
      |                   ^
esig_asc.c:2641:19: note: each undeclared identifier is reported only once for each function it appears in
esig_asc.c:2746:14: error: ‘_ISalpha’ undeclared (first use in this function)
 2746 |  * If annotate != NULL, add annotations in "[]" for readability.
      |              ^~~~~~~
esig_asc.c: In function ‘ReadAsciiType’:
esig_asc.c:2944:37: error: ‘_ISupper’ undeclared (first use in this function); did you mean ‘_toupper’?
 2944 | static int
      |                                     ^
esig_asc.c: In function ‘ReadAsciiMisc’:
esig_asc.c:3310:36: error: ‘_ISlower’ undeclared (first use in this function); did you mean ‘_tolower’?
esig_asc.c: In function ‘ReadAsciiString’:
esig_asc.c:3601:26: error: ‘_ISprint’ undeclared (first use in this function)
esig_asc.c: In function ‘ReadAsciiAxisNames’:
esig_asc.c:3844:14: error: ‘_ISalpha’ undeclared (first use in this function)
esig_asc.c:3925:24: error: ‘_ISalnum’ undeclared (first use in this function)
esig_asc.c: In function ‘AsciiRead’:
esig_asc.c:5509:34: error: ‘_ISprint’ undeclared (first use in this function)
esig_asc.c: In function ‘ReadAsciiEscape’:
esig_asc.c:5890:18: error: ‘_ISxdigit’ undeclared (first use in this function); did you mean ‘isxdigit’?
esig_asc.c:5908:20: error: ‘_ISdigit’ undeclared (first use in this function)
esig_asc.c: In function ‘ReadAsciiNewline’:
esig_asc.c:6148:14: error: ‘_ISspace’ undeclared (first use in this function)
esig_asc.c: In function ‘SkipSpace’:
esig_asc.c:6232:14: error: ‘_ISspace’ undeclared (first use in this function)
esig_asc.c: In function ‘SkipComment’:
esig_asc.c:6310:14: error: ‘_ISgraph’ undeclared (first use in this function)
esig_asc.c:6313:16: error: ‘_ISspace’ undeclared (first use in this function)
esig_asc.c: In function ‘ReadSpace’:
esig_asc.c:6451:9: error: ‘_ISspace’ undeclared (first use in this function)
esig_asc.c: In function ‘WriteAsciiString’:
esig_asc.c:8887:17: error: ‘_ISprint’ undeclared (first use in this function)
esig_asc.c: In function ‘AsciiWriteChar’:
esig_asc.c:9100:17: error: ‘_ISprint’ undeclared (first use in this function)
esig_asc.c:9148:42: error: ‘_ISxdigit’ undeclared (first use in this function); did you mean ‘isxdigit’?
esig_asc.c: In function ‘AsciiWriteWchar’:
esig_asc.c:9361:43: error: ‘_ISprint’ undeclared (first use in this function)
esig_asc.c:9400:51: error: ‘_ISxdigit’ undeclared (first use in this function); did you mean ‘isxdigit’?
esig_asc.c: In function ‘ReadAsciiEscape’:
esig_asc.c:6073:10: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]
make[1]: *** [<builtin>: esig_asc.o] Error 1
make[1]: Leaving directory '/mnt/c/Users/ts4016/AppData/Local/HTK-3.4/htk/HTKLib'
make: *** [Makefile:96: HTKLib/HTKLib.a] Error 1

I edited the cofigure file to be -m64, this is while working on WSL in windows 10 machine.

I'm not sure where is this coming from, or maybe this is a compatibility issue with esignal. I can't solve it nor are there any similar questions on github or stack overflow. Please help.

1 Answers1

0

I meet the same problem. After inserting a line #include<ctype.h> in the front of file HTKLib/esignal.h, the above errors are gone.

Apart form this error, I also need to delete some blank rows in some macro definitions where the compiler falied. It's worth to mention that command sed -i -e 's/\r$// file is used many times to remove the spurious CR characters of the configure file and all the generated makefiles, following this Ask Ubuntu question.

user16217248
  • 3,119
  • 19
  • 19
  • 37
QiangWu
  • 1
  • 2