Author Topic: Issues on OSX with milestone, nightly, compiling from source.  (Read 3659 times)

Offline Ianforcements

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Issues on OSX with milestone, nightly, compiling from source.
« on: November 18, 2016, 07:52:53 pm »
Sup?

I decided to give openXCOM a try today, but ran into some issues. I'm on OSX.

I started with the latest milestone, copied the game data into the app package and fired it up. Opens just fine but I soon find that there's literally no text rendered anywhere in the game, and it seems to hang occasionally.

I figured I'd try the nightly, followed the instructions here:
https://bitbucket.org/grrussel/openxcomosx
When trying to run the nightly I get the following error:
Code: [Select]
dyld: Library not loaded: /usr/local/lib/libSDL_gfx.13.dylib
  Referenced from: /Users/Ian/OpenXcom/bin/./openxcom
  Reason: image not found

I looked for libsdl_gfx.13.dylib at the location specified and sure enough it does not exist. I have libsdl_gfx.15.dylib instead, because that's the version of SDL that's available on homebrew. I checked out the SDL homepage and they don't seem to have any prior versions.

After this I decided to compile from source, followed the instructions here:
https://github.com/SupSuper/OpenXcom/tree/master/xcode

When attempting to build this, I get a linker error like so:
Code: [Select]
ld: warning: directory not found for option '-L/opt/local/lib'
Undefined symbols for architecture x86_64:
  "_SDL_main", referenced from:
      -[SDLMain applicationDidFinishLaunching:] in SDLMain.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any suggestions as to what I should try next? I'm not sure where I've gone wrong.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Issues on OSX with milestone, nightly, compiling from source.
« Reply #1 on: November 18, 2016, 08:26:00 pm »
seems like the SDL library is either:

A) not installed
B) not present where the make file expects it to be
C) the wrong version

if none of these are the case, i'm of no further use to you.

grrussel has, however, posted a bug on the tracker regarding OSX builds, so hopefully we can get that sorted and you can use his nightly compilation.

Offline Ianforcements

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Re: Issues on OSX with milestone, nightly, compiling from source.
« Reply #2 on: November 18, 2016, 11:34:05 pm »
I decided to uninstall all the dependencies and reinstall them, and downloaded the source again (openxcom_2016-09-04_22-27-09) and attempted to build it again, I'm getting a different error now:

Code: [Select]
/Users/Ian/OpenXCOM/To Make/OpenXcom-master/src/Menu/SetWindowedRootState.cpp:78:72: Cannot take the address of an rvalue of type 'std::__1::basic_ostringstream<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >'

/Users/Ian/OpenXCOM/To Make/OpenXcom-master/src/Menu/SetWindowedRootState.cpp:81:72: Cannot take the address of an rvalue of type 'std::__1::basic_ostringstream<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >'


Offline Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Issues on OSX with milestone, nightly, compiling from source.
« Reply #3 on: November 19, 2016, 02:14:51 am »
I decided to uninstall all the dependencies and reinstall them, and downloaded the source again (openxcom_2016-09-04_22-27-09) and attempted to build it again, I'm getting a different error now:

Code: [Select]
/Users/Ian/OpenXCOM/To Make/OpenXcom-master/src/Menu/SetWindowedRootState.cpp:78:72: Cannot take the address of an rvalue of type 'std::__1::basic_ostringstream<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >'

/Users/Ian/OpenXCOM/To Make/OpenXcom-master/src/Menu/SetWindowedRootState.cpp:81:72: Cannot take the address of an rvalue of type 'std::__1::basic_ostringstream<wchar_t, std::__1::char_traits<wchar_t>, std::__1::allocator<wchar_t> >'

Try replace:
Code: [Select]
_edtWindowedModePositionX->setText(static_cast<std::wostringstream*>( &(std::wostringstream() << Options::newWindowedModePositionX) )->str());
_edtWindowedModePositionX->setConstraint(TEC_NUMERIC);

_edtWindowedModePositionY->setText(static_cast<std::wostringstream*>( &(std::wostringstream() << Options::newWindowedModePositionY) )->str());
_edtWindowedModePositionY->setConstraint(TEC_NUMERIC);
With
Code: [Select]
_edtWindowedModePositionX->setText(static_cast<const std::wostringstream&>((std::wostringstream() << Options::newWindowedModePositionX)).str());
_edtWindowedModePositionX->setConstraint(TEC_NUMERIC);

_edtWindowedModePositionY->setText(static_cast<const std::wostringstream&>((std::wostringstream() << Options::newWindowedModePositionY)).str());
_edtWindowedModePositionY->setConstraint(TEC_NUMERIC);

Offline Ianforcements

  • Squaddie
  • *
  • Posts: 3
    • View Profile
Re: Issues on OSX with milestone, nightly, compiling from source.
« Reply #4 on: November 19, 2016, 02:35:53 pm »
It works! thank you :D