Giter VIP home page Giter VIP logo

lz77-to-slp's People

Contributors

dominikkempa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

lz77-to-slp's Issues

Compilation on OSX fails (undeclared identifier 'POSIX_FADV_DONTNEED')

Hello, I've tried to compile LZ77-to-SLP on Mac (Big Sur), but I'm getting the following errors:

When using the default clang compiler:

$ make
...

./src/../include/lazy_avl_grammar/lz_to_lazy_avl_grammar.hpp:90:31: note: in instantiation of member function 'lazy_avl_grammar<unsigned char, uint40>::lazy_avl_grammar' requested here
  grammar_type *grammar = new grammar_type(use_kr_hashing, kr_hashing_prob);
                              ^
./src/main.cpp:294:7: note: in instantiation of function template specialization 'lz_to_lazy_avl_grammar<unsigned char, uint40>' requested here
      lz_to_lazy_avl_grammar<char_type, text_offset_type>(
      ^
./src/main.cpp:398:3: note: in instantiation of function template specialization 'test_conversion<unsigned char, uint40>' requested here
  test_conversion<char_type, text_offset_type>(
  ^
In file included from ./src/main.cpp:48:
./src/../include/lazy_avl_grammar/lazy_avl_grammar.hpp:1680:11: error: no viable overloaded '='
      x_p = x_left_p;
      ~~~ ^ ~~~~~~~~

...


./src/../include/types/uint40.hpp:40:7: note: candidate function (the implicit copy assignment operator) not viable: 'this' argument has type 'const nonterminal<unsigned char, uint40>::ptr_type' (aka 'const uint40'), but method is not marked const
class uint40 {
      ^
In file included from ./src/main.cpp:48:
./src/../include/lazy_avl_grammar/lazy_avl_grammar.hpp:780:13: warning: format specifies type 'unsigned long' but the argument has type 'std::uint64_t' (aka 'unsigned long long') [-Wformat]
            cache_misses, (100.L * cache_misses) / query_counter);
            ^~~~~~~~~~~~
./src/main.cpp:344:12: note: in instantiation of member function 'lazy_avl_grammar<unsigned char, uint40>::print_stats' requested here
  grammar->print_stats();
           ^
./src/main.cpp:398:3: note: in instantiation of function template specialization 'test_conversion<unsigned char, uint40>' requested here
  test_conversion<char_type, text_offset_type>(
  ^
12 warnings and 2 errors generated.
./src/utils.cpp:231:32: error: use of undeclared identifier 'POSIX_FADV_DONTNEED'
  posix_fadvise(fd, 0, length, POSIX_FADV_DONTNEED);

When using GCC11 (make CC=gcc-11 CXX=g++-11):

./src/utils.cpp: In function 'void utils::empty_page_cache(std::string)':
./src/utils.cpp:231:32: error: 'POSIX_FADV_DONTNEED' was not declared in this scope
  231 |   posix_fadvise(fd, 0, length, POSIX_FADV_DONTNEED);
      |                                ^~~~~~~~~~~~~~~~~~~
./src/utils.cpp:231:3: error: 'posix_fadvise' was not declared in this scope
  231 |   posix_fadvise(fd, 0, length, POSIX_FADV_DONTNEED);
      |   ^~~~~~~~~~~~~
make: *** [lz_to_grammar] Error 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.