Unable to build 1.8.3.3 on OS X

Sep 16, 2009 at 8:52 PM
Edited Sep 16, 2009 at 9:08 PM

I'm trying to build EnhSim 1.8.3.3 on my OS X machine, using the .xcodeproj included with the source distribution, however I'm not having much success.  I went into the project properties and added the boost and build directories to the Header Search Paths (also tried adding to the User Header Search Paths to no avail), and still encounter many, many errors, all stemming from the following significant ones:

Boost/config.hpp: No such file or directory
Boost/detail/endian.hpp: No such file or directory

I also receive the following 2 warnings that may or may not be significant, but indicate to me that it's actually seeing the boost directory:

warning: no rule to process file '$(PROJECT_DIR)/boost/pool/detail/pool_construct.inc' of type sourcecode.pascal for architecture i386
warning: no rule to process file '$(PROJECT_DIR)/boost/pool/detail/pool_construct_simple.inc' of type sourcecode.pascal for architecture i386

I've also tried creating a new project and dragging all file from the source directory in, however I get an error about being unable to copy build/ and it also seems to lack many of the other files (such as SFMT.c, or enhsim.h...)

Any help would be greatly appreciated. 

[e] Build log available at http://pastebin.com/f7351221b

Sep 19, 2009 at 9:16 PM

I just downloaded the latest version and had the same problems (I think).  What I had to do to get things to build:

  1. I set my Header Search Paths to "$(SRCROOT)/" with the quotes and all. 
  2. In globalutil.h, there were two declarations for TimeunitsToSeconds/Minutes/Hours.  I deleted the later declarations, keeping just one set.
  3. I changed al instances of __int64 to double across all files.  You can do this by adding typedefs, or just going a global search/replace.
  4. I removed all #include references to limits.h.  This file was included in the mac 10.5 SDK, and the version in the boost directory was confusing things.  

After that, things built fine.  Hope that helps!

Oct 6, 2009 at 9:41 PM
Edited Oct 15, 2009 at 7:37 PM

I've done this and would just make a couple clarifications.   In step (4), you just need to remove or comment out those include statements that go to limits.hpp from the boost directory.  You can leave direct references to limits.h.   If this is all overwhelming to anyone, I've made up a Mac binary and made it available for download.  It's still just the Unix executable, but it is version 1.8.3.3 which is much better than using the only working version I saw released which was back in 1.7.0 or something.   

The Mac binary is available at:

 

EnhSim Mac Binary

The link above points directly to the binary file and at least Safari directly downloads the contents of the binary file to the browser.  You'd be better off going to 

http://peloton.radford.edu/enhsim/

and then save the binary file from that page (right click and use "Save linked file as" choice to get the build.

Oct 9, 2009 at 4:53 PM

Any update on a mac version?

Oct 15, 2009 at 7:34 PM
Edited Oct 15, 2009 at 7:35 PM

You can download the 1.8.3.3 version of EnhSim (the binary for OS X) from 

http://peloton.radford.edu/enhsim/

The link above points directly to the binary which is somewhat annoying since it just loads the binary text into the page.   Use the link in this reply and then download the binary.

Oct 21, 2009 at 5:14 AM

The  executable you posted is an Intel binary, please specify it since it won't work on PPC systems.

Coordinator
Oct 21, 2009 at 10:00 AM

As I posted in another thread. Please volunteer to join the project. You will then be given rights to release Mac versions on this site so that it forms part of the official release and so we don't have multiple unofficial versions strewn all over the web.

 

Dec 25, 2009 at 9:19 AM

I'm having problems building 1.9.4.2 

Here are the errors I'm getting:

  "FireElemental::EVENT_ID_FIRE_ELEMENTAL_FIRE_SHIELD", referenced from:

      __ZN13FireElemental35EVENT_ID_FIRE_ELEMENTAL_FIRE_SHIELDE$non_lazy_ptr in skills.o

  "FireElemental::EVENT_ID_FIRE_ELEMENTAL_FIVE_SEC_RULE", referenced from:

      __ZN13FireElemental37EVENT_ID_FIRE_ELEMENTAL_FIVE_SEC_RULEE$non_lazy_ptr in skills.o

  "FireElemental::EVENT_ID_FIRE_ELEMENTAL_MELEE", referenced from:

      __ZN13FireElemental29EVENT_ID_FIRE_ELEMENTAL_MELEEE$non_lazy_ptr in skills.o

  "FireElemental::EVENT_ID_FIRE_ELEMENTAL_FIRE_NOVA", referenced from:

      __ZN13FireElemental33EVENT_ID_FIRE_ELEMENTAL_FIRE_NOVAE$non_lazy_ptr in skills.o

  "FireElemental::EVENT_ID_FIRE_ELEMENTAL_FIRE_NOVA_CD", referenced from:

      __ZN13FireElemental36EVENT_ID_FIRE_ELEMENTAL_FIRE_NOVA_CDE$non_lazy_ptr in skills.o

  "FireElemental::EVENT_ID_FIRE_ELEMENTAL_FIRE_BLAST_CD", referenced from:

      __ZN13FireElemental37EVENT_ID_FIRE_ELEMENTAL_FIRE_BLAST_CDE$non_lazy_ptr in skills.o

 

Any help would be greatly appreciated.

Coordinator
Dec 26, 2009 at 12:13 AM

The errors don't make much sense to me but apparently it's a Mac OSx specific error. I have made a couple of change to the code that seems to be causing it, hopefully solving the problem. If this doesn't work could you give me some more info about your setup? Like, which compiler, GCC? And possibly post your make file as well.

Dec 27, 2009 at 6:19 AM

Works now, thank you very much. :)

Developer
Jan 7, 2010 at 9:02 AM

Hi, I'm getting a similar error from the linker, even in V1.9.5.4.

 

Undefined symbols:
  "ConfigFactory::ConfigFactory(std::basic_string, std::allocator > const&)", referenced from:
      _main in main.o
  "AoE::getAdditiontalTargets()", referenced from:
      FireElemental::handleFireShieldEvent()       in skills.o
      FireElemental::castingFinishedFireNova()       in skills.o
      MagmaTotem::event(int const&)in skills.o
      FireNova::cast()     in skills.o
      ChainLightning::castingFinished()       in skills.o
  "ConfigFactory::isFileRead()", referenced from:
      _main in main.o
  "AoE::calculateAoETime(double const&)", referenced from:
      EnhSim::simulate(float const&)in EnhSim.o
  "AoE::AoE(EnhSim*)", referenced from:
      EnhSim::EnhSim(Statistics&) in EnhSim.o
      EnhSim::EnhSim(Statistics&) in EnhSim.o
  "AoE::getSwitchToCL()", referenced from:
      LightningBolt::cast()      in skills.o
  "AoE::calculateDamageReduction()", referenced from:
      EnhSim::simulate(float const&)in EnhSim.o
  "AoE::setAoEEvent()", referenced from:
      EnhSim::simulate(float const&)in EnhSim.o
  "AoE::setSwitchToCL(bool const&)", referenced from:
      EnhSimConfig::setRotationSettings(bool, bool, bool, float const&, bool, int const&, int const&, float const&, bool const&, bool const&)in enhsimconfig.o
  "AoE::getAoeing()", referenced from:
      FireElemental::handleFireShieldEvent()       in skills.o
      FireElemental::castingFinishedFireNova()       in skills.o
      MagmaTotem::event(int const&)in skills.o
      FireNova::cast()     in skills.o
      ChainLightning::castingFinished()       in skills.o
      LightningBolt::cast()      in skills.o
  "ConfigFactory::buildEnhSimConfig(bool, bool)", referenced from:
      _main in main.o
  "ConfigFactory::allConfigsFound()", referenced from:
      _main in main.o
  "ConfigFactory::getConfigInt(std::basic_string, std::allocator > const&)", referenced from:
      _main in main.o
  "ConfigFactory::getConfigString(std::basic_string, std::allocator > const&)", referenced from:
      _main in main.o
  "AoE::getMagicResistance(int)", referenced from:
      FireElemental::handleFireShieldEvent()       in skills.o
      FireElemental::castingFinishedFireNova()       in skills.o
      MagmaTotem::event(int const&)in skills.o
      FireNova::cast()     in skills.o
      ChainLightning::castingFinished()       in skills.o
      ChainLightning::castingFinished()       in skills.o
      ChainLightning::castingFinished()       in skills.o
  "AoE::setAdditionalTargets(int const&, float const&, int)", referenced from:
      EnhSimConfig::setAdditionalTargets(int const&, float const&, int)in enhsimconfig.o
  "ConfigFactory::getConfigFloat(std::basic_string, std::allocator > const&)", referenced from:
      _main in main.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

Before, I had to set Header Search Paths to "$(SRCROOT)/" and comment out #include "boost/detail/limits.hpp" from stats.h (as stated above) in order to prevent further errors.

Any ideas?

Rumpel

 

Developer
Jan 7, 2010 at 9:21 AM

Found the error, had to manually add configfactory.h/.cpp and aoe.h/.cpp to the project. Still getting a Bus Error running the Release version, but Debug versions runs smoothly :)

BTW, is any GUI planned for OS X? ;)

Thanks for your work!

Rumple

Coordinator
Jan 7, 2010 at 10:36 AM

My understanding is that as the GUI is a C# project it can be run under Mono on a Mac?

As a Mac person who can compile and get the code running. Are you prepared to join the project so we can release a Mac executable for your fellow Mac users to use. All that this would require is for you to compile the source when a new version is ready and click to upload a Mac.zip, or whatever zip type stuff Macs use :), file to the downloads section.

Developer
Jan 11, 2010 at 9:02 AM

I added my build to the v1.9.5.4 release. The current release produces strange errors due to the EnhSimDLL lib, which I will (hopefully) have a look at this evening. But again: I'm everything but an expert ;)

 

Coordinator
Jan 11, 2010 at 11:24 AM

The EnhSimDLL project was removed in its old "managed" form from release v1.9.5.5 onwards and replaced by an "unmanaged" version. This basically means that it no longer relies on .NET to provide any functionality. So the GUI does slightly more work to interface with the DLL but the DLL itself is closer to native code.