Error when compiling ENIGMA on OS X

Reporter: 9Morello  |  Status: closed  |  Last Modified: October 01, 2017, 01:58:42 AM

I'm getting the following error when trying to compile ENIGMA on OS X.

compiler/components/parse_and_link.cpp:67:56: error: use of overloaded operator
      '<<' is ambiguous (with operand types 'ideprint' and 'size_type'
      (aka 'unsigned long'))
    edbg << "Parsed `" << es->scripts[i].name << "': " << scripts[i]->obj.locals.size()...
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./backend/ideprint.h:29:13: note: candidate function
  ideprint &operator<< (int16_t x);
            ^
./backend/ideprint.h:30:13: note: candidate function
  ideprint &operator<< (int32_t x);
            ^
./backend/ideprint.h:31:13: note: candidate function
  ideprint &operator<< (int64_t x);
            ^
./backend/ideprint.h:32:13: note: candidate function
  ideprint &operator<< (uint16_t x);
            ^
./backend/ideprint.h:33:13: note: candidate function
  ideprint &operator<< (uint32_t x);
            ^
./backend/ideprint.h:34:13: note: candidate function
  ideprint &operator<< (uint64_t x);
            ^
./backend/ideprint.h:35:13: note: candidate function
  ideprint &operator<< (char x);
            ^
./backend/ideprint.h:36:13: note: candidate function
  ideprint &operator<< (unsigned char x);
            ^
./backend/ideprint.h:37:13: note: candidate function
  ideprint &operator<< (double x);
            ^
compiler/components/parse_and_link.cpp:98:112: error: use of overloaded operator
      '<<' is ambiguous (with operand types 'ideprint' and 'size_type'
      (aka 'unsigned long'))
  ...edbg << "Parsed `" << es->timelines[i].name <<", moment: " <<es->timelines[i].moments[j].stepNo << "': " << tlines.back()->obj.locals.size()...
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./backend/ideprint.h:29:13: note: candidate function
  ideprint &operator<< (int16_t x);
            ^
./backend/ideprint.h:30:13: note: candidate function
  ideprint &operator<< (int32_t x);
            ^
./backend/ideprint.h:31:13: note: candidate function
  ideprint &operator<< (int64_t x);
            ^
./backend/ideprint.h:32:13: note: candidate function
  ideprint &operator<< (uint16_t x);
            ^
./backend/ideprint.h:33:13: note: candidate function
  ideprint &operator<< (uint32_t x);
            ^
./backend/ideprint.h:34:13: note: candidate function
  ideprint &operator<< (uint64_t x);
            ^
./backend/ideprint.h:35:13: note: candidate function
  ideprint &operator<< (char x);
            ^
./backend/ideprint.h:36:13: note: candidate function
  ideprint &operator<< (unsigned char x);
            ^
./backend/ideprint.h:37:13: note: candidate function
  ideprint &operator<< (double x);
            ^
3 warnings and 2 errors generated.
make: *** [.eobjs/./compiler/components/parse_and_link.o] Error 1

Steps to reproduce:

  1. Clone the repository
  2. cd compilerSource && make clean && make

LateralGM seems to be running fine - though it obviously can't compile games because its lacking ENIGMA.

faissaloo  
What version of GCC are you using? Go to a terminal and type gcc -v to check
9Morello  

Here is the output of gcc -v:

gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

faissaloo  

This seems to me like a duplicate of #1001

Try compiling this fork instead of the master repository: #1011

9Morello  

@faissaloo That branch compiles ENIGMA, but I can't run any games I compile with it. Tried with a new game with one object and got this output:

/Users/Morello/enigma-dev/MacOS/build/Release/EnigmaXcode.app/Contents/MacOS/EnigmaXcode ; exit;
Current working dir: /Users/Morello/enigma-dev/MacOS/build/Release/EnigmaXcode.app
2017-06-11 12:22:38.713 EnigmaXcode[17958:51321] Unable to load nib file: MainMenu, exiting
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.

[Process completed]

faissaloo  

Try exporting the game and running it manually
9Morello  

Thanks, I didn't have the time to test it those days but I'll asap and post the result here.
9Morello  

@faissaloo Sorry for taking so long. I just tried exporting the game and running it manually and it didn't work. The app instantly crashes before its window appears.
faissaloo  

Can you go into the .app bundle and find the actual executable and run it from a terminal so we can see the output?
RobertBColton  

Closing this as the issue hasn't had any updates in a while and it does look as though he got ENIGMA building, though not running. The issue also seems to be a duplicate of other issues (namely #1001). If there's anything new on this issue please discuss it there. If you discover any new and unrelated issues, please post separate tickets for those. Thanks!
Please sign in to post comments, or you can view this issue on GitHub.