Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error #15

Open
DuyguA opened this issue Feb 21, 2019 · 1 comment
Open

Compile error #15

DuyguA opened this issue Feb 21, 2019 · 1 comment

Comments

@DuyguA
Copy link

DuyguA commented Feb 21, 2019

I do a make and get the following error:

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:2415:14: error: ‘found’ was not declared in this scope
    pst.state=found;
              ^
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:36: 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:14: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result]
   system(cmd);
              ^
lmtable.cpp:728:14: 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:33: 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:14: 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:14: 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:33: 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:29: 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:742: 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

Any suggestion is appreciated, thanks in advance.

@alpoktem
Copy link

alpoktem commented Jul 26, 2019

Having the same issue here on Ubuntu 18.04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants