Git Product home page Git Product logo

Comments (3)

RikerW avatar RikerW commented on July 18, 2024

For MacOS, try running

./sys/unix/setup.sh sys/unix/hints/macOS.370
make fetch-lua
make all
make install

Instead of that install file. The typical build path for unix is to run those commands, with the only thing being swapped out is the sys/unix/hints/PATHNAME hints file to actually run. Note: I don't use MacOS anymore, but I'm getting this off how I compile on ubuntu and the travis build workflow for this repo, link.

from xnethack.

entrez avatar entrez commented on July 18, 2024

This is a known issue that should be fixed with the next vanilla merge. The vanilla fix is in commit NetHack/NetHack@1302814. You can try applying that change yourself in the meantime, it's pretty straightforward. You just add && !defined(MACOS) so that __warn_unused_result__ and warn_unused_result aren't "blanked out" in tradstdc.h:

diff --git a/include/tradstdc.h b/include/tradstdc.h
index 8c33d55e0..ee6bd99c2 100644
--- a/include/tradstdc.h
+++ b/include/tradstdc.h
@@ -405,7 +405,7 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
 #if __GNUC__ >= 3
 #define UNUSED __attribute__((unused))
 #define NORETURN __attribute__((noreturn))
-#if !defined(__linux__) || defined(GCC_URWARN)
+#if (!defined(__linux__) && !defined(MACOS)) || defined(GCC_URWARN)
 /* disable gcc's __attribute__((__warn_unused_result__)) since explicitly
    discarding the result by casting to (void) is not accepted as a 'use' */
 #define __warn_unused_result__ /*empty*/

from xnethack.

erichrutz avatar erichrutz commented on July 18, 2024

Thank you very much. Applying the patch worked. Now I can compile

from xnethack.

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.