Code Monkey home page Code Monkey logo

Comments (3)

nemequ avatar nemequ commented on July 17, 2024

There are a few issues when trying to compile on OSX.

Thanks for testing. Unfortunately I don't have OS X, and I don't have good way to get access to a copy with the developer tools installed (or the option of installing them), so I'm not going to be able to test anything.

zpaq uses windows.h which is obviously not found, maybe an extra check in the squash makefile could fix that ?

Apparently unix isn't defined on OS X (it is on Linux and BSD with gcc). The automake files could probably be modified, but I think a better solution would be to use the preprocessor in zpaq.cpp. Can you try adding this:

#if !defined(_WIN32) && !defined(unix)
#define unix
#endif

To the beginning of plugins/zpaq/zpaq/libzpaq.cpp (line 18)?

The clock_gettime issue is a bit more complicated... I can't seem to find a good alternative to clock_gettime for CPU time on OS X. That question on SO only tells you how to get the wall-clock time. I can't find anything, so I've just asked on SO. Hopefully someone there knows the answer.

from squash.

g1mv avatar g1mv commented on July 17, 2024

Can you try adding this:

#if !defined(_WIN32) && !defined(unix)
#define unix
#endif

To the beginning of plugins/zpaq/zpaq/libzpaq.cpp (line 18)?

It works !
Maybe you should rather use this though :

#if defined(__APPLE__)
#define unix
#endif

For more safety ? Tested with success as well.

from squash.

nemequ avatar nemequ commented on July 17, 2024

commit 1939bec
Author: Evan Nemerson [email protected]
Date: Fri Sep 13 23:57:31 2013 -0700

zpaq: add a configuration header and get rid of build system cruft

The configuration header causes ZPAQ to only assume it's on Windows
if _WIN32 is defined.  This is necessary because OS X does not define
"unix", so it was attempting to include Windows-specific headers.

Also, it disables JIT on non-x86/amd64 CPUs, and enables it on all
x86/amd64 CPUs.  This replaces the old autotools macros which attempted
to detect whether SSE2 was really available which doesn't play well
when attempting to cross-compile.  In practice JIT should really be
enabled/disabled at runtime, but doing that efficiently would require
significant changes to ZPAQ and in practice we are unlikely to
encounter an x86/amd64 CPU which doesn't support SSE2.

https://github.com/quixdb/squash/issues/49

Signed-off-by: Evan Nemerson <[email protected]>

commit 7d82cc0
Author: Evan Nemerson [email protected]
Date: Fri Sep 13 23:39:11 2013 -0700

benchmark: add getrusage support, separate timer into its own file

OS X doesn't support clock_gettime, so if it is not available we fall
back on getrusage.  This also paves the way for adding Windows support
(via GetProcessTimes).

https://github.com/quixdb/squash/issues/49

Signed-off-by: Evan Nemerson <[email protected]>

from squash.

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.