GithubHelp home page GithubHelp logo

Comments (10)

JayXon avatar JayXon commented on May 28, 2024 1

you are missing a ) should be (unsigned long)(ZOPFLI_CACHE_LENGTH * 3 * blocksize));

from leanify.

JayXon avatar JayXon commented on May 28, 2024

If you cherry pick this commit it should fix the issue, I just haven't updated my fork yet
google/zopfli@60503d1

from leanify.

K0-RR avatar K0-RR commented on May 28, 2024

Now I'm getting

lib/zopfli/cache.c: In function 'ZopfliInitCache':
lib/zopfli/cache.c:36:51: error: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'size_t' {aka 'long long unsigned int'} [-Werror=format=]
   36 |         "Error: Out of memory. Tried allocating %lu bytes of memory.\n",
      |                                                 ~~^
      |                                                   |
      |                                                   long unsigned int
      |                                                 %llu
   37 |         (unsigned long)ZOPFLI_CACHE_LENGTH * 3 * blocksize);
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                |
      |                                                size_t {aka long long unsigned int}
cc1.exe: all warnings being treated as errors
mingw32-make: *** [<builtin>: lib/zopfli/cache.o] Error 1

from leanify.

JayXon avatar JayXon commented on May 28, 2024

hmm, maybe change it to (unsigned long)(ZOPFLI_CACHE_LENGTH * 3 * blocksize) instead?

from leanify.

K0-RR avatar K0-RR commented on May 28, 2024

Now all builds are failing
gcc:

lib/zopfli/cache.c:37:61: error: expected ')' before 'exit'
   37 |         (unsigned long)(ZOPFLI_CACHE_LENGTH * 3 * blocksize)
      |                                                             ^
      |                                                             )
   38 |     exit (EXIT_FAILURE);
      |     ~~~~                                                     
lib/zopfli/cache.c:35:12: note: to match this '('
   35 |     fprintf(stderr,
      |            ^
lib/zopfli/cache.c:38:25: error: expected ';' before '}' token
   38 |     exit (EXIT_FAILURE);
      |                         ^
      |                         ;
   39 |   }
      |   ~                      

clang:

lib/zopfli/cache.c:38:5: error: expected ')'
    exit (EXIT_FAILURE);
    ^
lib/zopfli/cache.c:35:12: note: to match this '('
    fprintf(stderr,
           ^
1 error generated.

from leanify.

JayXon avatar JayXon commented on May 28, 2024

Did you replaced the whole line? 😅 you need to add ); after that

from leanify.

K0-RR avatar K0-RR commented on May 28, 2024

That's what I tried at first but the error is nearly the same with ";".

lib/zopfli/cache.c:37:61: error: expected ')' before ';' token
   37 |         (unsigned long)(ZOPFLI_CACHE_LENGTH * 3 * blocksize);
      |                                                             ^
      |                                                             )
lib/zopfli/cache.c:35:12: note: to match this '('
   35 |     fprintf(stderr,
      |            ^
lib/zopfli/cache.c:38:25: error: expected ';' before '}' token
   38 |     exit (EXIT_FAILURE);
      |                         ^
      |                         ;
   39 |   }
      |   ~                      

from leanify.

K0-RR avatar K0-RR commented on May 28, 2024

It seems to be working on Windows now but only for gcc. clang returns this

C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\any:22:2: error: class any requires static RTTI.
#error class any requires static RTTI.
 ^
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\any:239:16: error: use of typeid requires -frtti
        return typeid(void);
               ^
main.cpp:165:15: error: 'getenv' is deprecated: This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [-Werror,-Wdeprecated-declarations]
  is_pause = !getenv("PROMPT");
              ^
C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\ucrt\stdlib.h:1183:20: note: 'getenv' has been explicitly marked deprecated here
    _Check_return_ _CRT_INSECURE_DEPRECATE(_dupenv_s)
                   ^
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\vcruntime.h:355:55: note: expanded from macro '_CRT_INSECURE_DEPRECATE'
        #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT(    \
                                                      ^
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.34.31933\include\vcruntime.h:345:47: note: expanded from macro '_CRT_DEPRECATE_TEXT'
#define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
                                              ^
3 errors generated.
mingw32-make: *** [<builtin>: main.o] Error 1

from leanify.

JayXon avatar JayXon commented on May 28, 2024

That error is from your Visual Studio, not related to leanify

from leanify.

K0-RR avatar K0-RR commented on May 28, 2024

Ok

from leanify.

Related Issues (20)

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.