Arx Libertatis Bug Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
CLOSED  Bug report #620  -  Fatal compiling errors on Mac OS X 10.9.2
Posted Mar 16, 2014 - updated Jan 03, 2017   Shortlink: http://arx.vg/620
action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
icon_info.png This issue has been closed with status "Not a bug" and resolution "CAN'T REPRODUCE".
Issue details
  • Type of issue
    Bug report
  • Status
     
    Not a bug
  • Assigned to
    Not assigned to anyone
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     Guest user
  • Owned by
    Not owned by anyone
  • Estimated time
    Not estimated
  • Category
    Not determined
  • Resolution
    CAN'T REPRODUCE
  • Priority
    Not determined
  • Reproducability
    Always
  • Severity
    Not determined
  • Targetted for
    icon_milestones.png Not determined
  • OS
    icon_customdatatype.png Not determined
  • Architecture
    icon_customdatatype.png Not determined
  • Fixed in
    icon_customdatatype.png Not determined
Issue description
While compiling Arc Libertatis on my mid-2011 iMac running OS X 10.9.2, I run into a number of problems. The first problem is that it can't detect my installation of SDL2, but it's not a fatal error. The first three fatal errors I can fix pretty easily (Dialog.mm enum DialogType & SDL2Window.h and SDL2InputBackend.h #include <SDL/SDL.h>), but the last one I can't. The fatal error is "Linking CXX executable arx" "Undefined symbols for architecture x86_64". I believe it has something to do with my GLEW, SDL, or SDL2 libraries, but I'm not advanced enough of a coder to know for sure. Specifics of the issue can be found in the Reproduction steps section.
Steps to reproduce this issue
Compile Arc Libertatis as it appears in the GitHub repository on March 15, 2014 on a Mac running Mavericks with all the required libraries installed, cd to the ArcLibertatis directory, run cmake.., then run sudo make and follow the following steps: The first problem is that, no matter how much I install SDL2, it always gives me the following message after running cmake .. :
  1.  


Also, it gives me a number of fatal errors during the build process (using the command sudo make), the first of which is:
  1.  


I was able to rectify this by adding the following code to line 27 of Dialog.mm:
  1.  
After building again I received a number of fatal errors starting with:
  1.  


Which I was able to rectify by changing line 23 of SDL2Window.h and SDL2InputBackend.h from #include <SDL.h> to #include <SDL/SDL.h>.

After this, I get the following fatal error which I have not been able to rectify:

  1.  

#1
icon_reply.pngReply
Comment posted by
 Guest user
Mar 16, 18:33
Please post the cmake output when it is run for the first time on a clean build directory.
#4
icon_reply.pngReply
Comment posted by
 Daniel Scharrer
Mar 16, 18:42
Arc Libertatis


"Arx Libertatis" ;-)

using the command sudo make


Why are you compiling as the super user? At most the make install part should be done with elevated privileges.

DialogType


Fixed, thanks for reporting.

Which I was able to rectify by changing line 23 of SDL2Window.h and SDL2InputBackend.h from #include <SDL.h> to #include <SDL/SDL.h>.


That's a workaround, not a fix. We should figure out why CMake didn't find your SDL 2 install. The complete cmake output will hopefully help here. What is the exact SDL version and package type (binaries from libsdl.org, macports, ...) you are using? Where are the libraries and headers installed?
#5
icon_reply.pngReply
Comment posted by
 Guest user
icon_reply.pngMar 16, 21:36, in reply to comment #1
Guest user wrote:
Please post the cmake output when it is run for the first time on a clean
build directory.


  1.  
#6
icon_reply.pngReply
Comment posted by
 Daniel Scharrer
icon_reply.pngMar 16, 21:56, in reply to comment #5
Hm, that looks like it found SDL 2 just fine :S

Can you check what SDL2_INCLUDE_DIR is set to CMakeCache.txt (you can use ccmake or cmake-gui if you pass the same arguments as you did to cmake)? I'm guessing that's just /Library/Frameworks/SDL2.framework as well? Where is SDL.h located under that path?
#7
icon_reply.pngReply
Comment posted by
 Guest user
icon_reply.pngMar 16, 21:57, in reply to comment #4
I'm using sudo make because there were one or two incidents where it wouldn't build in a non-empty directory. I could probably use make without sudo just as easily. The SDL2 framework cmake detected was the one I installed from the dmg on libsdl.org/download-2.0.php, which I keep installed as the /Library/Frameworks/SDL2.framework directory. At the time I reported the error, this dmg was SDL2 2.0.2, but in the last 24 hours they've updated the framework to version 2.0.3, which is the version I now have installed. I tried building it cleanly again with 2.0.3, but the fatal outcome was the same. The clean cmake output can be found in the previous post.

Daniel Scharrer wrote:
Arc Libertatis

"Arx Libertatis" ;-)

using the command sudo make

Why are you compiling as the super user? At most the make install part
should be done with elevated privileges.

DialogType

Fixed, thanks for reporting.

Which I was able to rectify by changing line 23 of SDL2Window.h and
SDL2InputBackend.h from #include <SDL.h> to #include <SDL/SDL.h>.

That's a workaround, not a fix. We should figure out why CMake didn't find
your SDL 2 install. The complete cmake output will hopefully help here.
What is the exact SDL version and package type (binaries from libsdl.org,
macports, ...) you are using? Where are the libraries and headers
installed?


#8
icon_reply.pngReply
Comment posted by
 Guest user
icon_reply.pngMar 16, 22:03, in reply to comment #7
I checked with both ccmake and cmake-gui, and there is no mention of SDL2_INCLUDE_DIR, or any such cmake flag name with SDL2 in it at all. The only mention of SDL2_INCLUDE_DIR is in CMakeCache.txt, which contains the following lines:

  1.  


and further down it says

  1.  


Guest user wrote:
I'm using sudo make because there were one or two incidents where it
wouldn't build in a non-empty directory. I could probably use make without
sudo just as easily. The SDL2 framework cmake detected was the one I
installed from the dmg on libsdl.org/download-2.0.php, which I keep
installed as the /Library/Frameworks/SDL2.framework directory. At the time
I reported the error, this dmg was SDL2 2.0.2, but in the last 24 hours
they've updated the framework to version 2.0.3, which is the version I now
have installed. I tried building it cleanly again with 2.0.3, but the fatal
outcome was the same. The clean cmake output can be found in the previous
post.

Daniel Scharrer wrote:
Arc Libertatis


"Arx Libertatis" ;-)

using the command sudo make


Why are you compiling as the super user? At most the make install part
should be done with elevated privileges.

DialogType


Fixed, thanks for reporting.

Which I was able to rectify by changing line 23 of SDL2Window.h and
SDL2InputBackend.h from #include <SDL.h> to #include <SDL/SDL.h>.


That's a workaround, not a fix. We should figure out why CMake didn't find
your SDL 2 install. The complete cmake output will hopefully help here.
What is the exact SDL version and package type (binaries from libsdl.org,
macports, ...) you are using? Where are the libraries and headers
installed?




#9
icon_reply.pngReply
Comment posted by
 Daniel Scharrer
icon_reply.pngMar 16, 22:14, in reply to comment #8
Ok then, what's under /Library/Frameworks/SDL.framework/Headers? There should be an SDL.h there directly without any sub directories, otherwise I don't see why cmake would have chosen that path. But then #include <SDL.h> should have worked…

Btw, you can put &lt;source&gt;&lt/source&gt; around code/text fragments so the formatting here won't mess it up (like I have edited your posts).

Also, please don't top-post.
#10
icon_reply.pngReply
Comment posted by
 Guest user
icon_reply.pngMar 16, 22:59, in reply to comment #9
Daniel Scharrer wrote:
Ok then, what's under /Library/Frameworks/SDL.framework/Headers? There
should be an SDL.h there directly without any sub directories, otherwise I
don't see why cmake would have chosen that path. But then #include <SDL.h>
should have worked…

Btw, you can put &lt;source&gt;&lt/source&gt; around code/text fragments so
the formatting here won't mess it up (like I have edited your posts).

Also, please don't top-post.
There is a SDL.h file at /Library/Frameworks/SDL2.framework/Versions/A/Headers/SDL.h
#11
icon_reply.pngReply
Comment posted by
 Daniel Scharrer
icon_reply.pngMar 16, 23:03, in reply to comment #10
Ind I assume /Library/Frameworks/SDL.framework/Headers (without the Versions/A part) links there? - but then why did you run into problems with SDL_Window?

Can you compile (without the include changes) and when you run into compile errors switch to
  1.  
to get the complete compiler command-line - thanks.
#12
icon_reply.pngReply
Comment posted by
 Guest user
icon_reply.pngMar 16, 23:12, in reply to comment #11
Daniel Scharrer wrote:
Ind I assume /Library/Frameworks/SDL.framework/Headers (without the
Versions/A part) links there? - but then why did you run into problems with
SDL_Window?

Can you compile (without the include changes) and when you run into compile
errors switch to VERBOSE=1 make to get the complete compiler command-line -
thanks.
I tried it, but I still got the same SDL error:
  1.  
#13
icon_reply.pngReply
Comment posted by
 Daniel Scharrer
icon_reply.pngMar 16, 23:13, in reply to comment #12
Yes, please run
  1.  
and post the *full* output, including the compiler command that is executed.
#14
icon_reply.pngReply
Comment posted by
 Daniel Scharrer
Jan 03, 10:22
We need further user input to triage this issue.

The issue was updated with the following change(s):
  • The status has been updated, from New to Not a bug.
  • This issue has been closed
  • The resolution has been updated, from Not determined to CAN'T REPRODUCE.