Open douglasbagnall opened 6 years ago
Thanks @douglasbagnall this worked for me.
Hello @douglasbagnall ,
Many thanx for the fixes. After doing a make
this is what I get:
/bin/bash ../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I.. -DTRACE_LEVEL=1 -DMY_ASSERT_FLAG -DPS_CACHE_ENABLE -DLMT_CACHE_ENABLE -DMDIADAPTLM_CACHE_ENABLE -DHAVE_CXX0 -std=c++0x -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DMYCODESIZE=3 -g -O2 -MT lmtable.lo -MD -MP -MF .deps/lmtable.Tpo -c -o lmtable.lo lmtable.cpp
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -DTRACE_LEVEL=1 -DMY_ASSERT_FLAG -DPS_CACHE_ENABLE -DLMT_CACHE_ENABLE -DMDIADAPTLM_CACHE_ENABLE -DHAVE_CXX0 -std=c++0x -Wall -ffor-scope -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DMYCODESIZE=3 -g -O2 -MT lmtable.lo -MD -MP -MF .deps/lmtable.Tpo -c lmtable.cpp -fPIC -DPIC -o .libs/lmtable.o
lmtable.cpp: In member function ‘virtual ngram_state_t irstlm::lmtable::cmaxsuffidx(ngram, unsigned int*)’:
lmtable.cpp:2406:28: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
char* msptr = cmaxsuffptr(ong,&isize);
~~~~~~~~~~~^~~~~~~~~~~~
lmtable.cpp:2407:33: error: ‘suffptr’ was not declared in this scope
ngram_state_t msidx = convert(suffptr,isize);
^~~~~~~
lmtable.cpp:2407:33: note: suggested alternative: ‘maxsuffptr’
ngram_state_t msidx = convert(suffptr,isize);
^~~~~~~
maxsuffptr
lmtable.cpp:2415:14: error: ‘found’ was not declared in this scope
pst.state=found;
^~~~~
lmtable.cpp:2415:14: note: suggested alternative: ‘bound’
pst.state=found;
^~~~~
bound
lmtable.cpp:2406:9: warning: unused variable ‘msptr’ [-Wunused-variable]
char* msptr = cmaxsuffptr(ong,&isize);
^~~~~
lmtable.cpp: In member function ‘void irstlm::lmtable::loadtxt_mmap(std::istream&, const char*, const char*)’:
lmtable.cpp:622:15: warning: ignoring return value of ‘int ftruncate(int, __off64_t)’, declared with attribute warn_unused_result [-Wunused-result]
ftruncate(fileno(fd),filesize);
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
lmtable.cpp:724:9: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system(cmd);
~~~~~~^~~~~
lmtable.cpp:728:9: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system(cmd);
~~~~~~^~~~~
lmtable.cpp: In member function ‘void irstlm::lmtable::expand_level_mmap(int, table_entry_pos_t, const char*)’:
lmtable.cpp:887:12: warning: ignoring return value of ‘int ftruncate(int, __off64_t)’, declared with attribute warn_unused_result [-Wunused-result]
ftruncate(fileno(fd),filesize);
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
lmtable.cpp: In member function ‘void irstlm::lmtable::concatenate_single_level(int, const char*, const char*)’:
lmtable.cpp:1785:9: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system(cmd);
~~~~~~^~~~~
lmtable.cpp: In member function ‘void irstlm::lmtable::compact_single_level(int, const char*)’:
lmtable.cpp:1856:9: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
system(cmd);
~~~~~~^~~~~
lmtable.cpp: In member function ‘void irstlm::lmtable::resize_level_mmap(int, const char*)’:
lmtable.cpp:1889:12: warning: ignoring return value of ‘int ftruncate(int, __off64_t)’, declared with attribute warn_unused_result [-Wunused-result]
ftruncate(fileno(fd),filesize);
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
lmtable.cpp: In member function ‘void irstlm::lmtable::loadbin(std::istream&, const char*, const char*, int)’:
lmtable.cpp:1996:8: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
read(diskid,miniheader,4);
~~~~^~~~~~~~~~~~~~~~~~~~~
Makefile:744: recipe for target 'lmtable.lo' failed
make[2]: *** [lmtable.lo] Error 1
make[2]: Leaving directory '/home/duygu/irstlm/src'
Makefile:407: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/duygu/irstlm'
Makefile:339: recipe for target 'all' failed
make: *** [all] Error 2
Dou you have any ideas?
Autoconf package files have several issues: