vittorioromeo / SSVOpenHexagon

C++20 FOSS clone of "Super Hexagon". Depends on SSVStart, SSVEntitySystem, SSVLuaWrapper, SSVMenuSystem, JSONcpp, SFML2.0. Features JSON/LUA customizable game files, a soundtrack by BOSSFIGHT, pseudo-3D effects.
https://vittorioromeo.com/openhexagon.html
Other
611 stars 70 forks source link

OSX build? #150

Open CatsAreFluffy opened 7 years ago

vittorioromeo commented 7 years ago

I don't own a Mac, but I see no particular reason this wouldn't build on OSX. You are welcome to try building if you own a Mac - let me know how it goes and if you have any question.

CatsAreFluffy commented 7 years ago

Well, I'm kinda lazy, so i just used Wine :P

On Thu, Sep 21, 2017 at 8:49 AM, Vittorio Romeo notifications@github.com wrote:

I don't own a Mac, but I see no particular reason this wouldn't build on OSX. You are welcome to try building if you own a Mac - let me know how it goes and if you have any question.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/SuperV1234/SSVOpenHexagon/issues/150#issuecomment-331199155, or mute the thread https://github.com/notifications/unsubscribe-auth/ARIzhiXi-VrWkHeWMLZ2ew03EwzTqNrfks5skoWlgaJpZM4PeRvP .

scemino commented 4 years ago

I'm also interested in OSX build. Here is the full build file on my mac: build.txt.zip You don't own a Mac but you could use Travis, this is what I do to compile my projects on Linux and I use appveyor for Windows build.

Morxemplum commented 4 years ago

We do have a few Mac users in the Open Hexagon community so if you manage to get a native build working for MacOS, that'd be wonderful! :)

AlphaPromethium commented 4 years ago

I think we should at least try to get this working before full release in August. Would be epic!

Morxemplum commented 4 years ago

Only real issue is that none of us own a Mac so it's really hard for us to even try to build the game for Mac, considering how picky Apple is when it comes to who has their OS

AlphaPromethium commented 4 years ago

We could try renting a MacInCloud for a month?

Morxemplum commented 4 years ago

Never heard of it. But I was thinking of getting a family Macbook for my family so at least there's a family computer that my parents can use for their stuff. This is an interesting topic though.

scemino commented 4 years ago

I can help you, if you want.

Morxemplum commented 4 years ago

All contributions are welcome! :)

scemino commented 4 years ago

I have still an error: LuaWrapper.hpp:1318:19: error: expected body of lambda expression return [&]<int... Is>(std::integer_sequence<int, Is...>) it should be valid with C++ 20 enabled in CMakeLists.txt -> set(CMAKE_CXX_STANDARD "20") If someone knows what to do...

scemino commented 4 years ago

So I updated clang to version 11.0.3, now it's different:

[build] clang: error: unable to execute command: Segmentation fault: 11
[build] clang: error: clang frontend command failed due to signal (use -v to see invocation)
[build] Apple clang version 11.0.3 (clang-1103.0.32.62)
[build] Target: x86_64-apple-darwin19.4.0

I don't know if C++20 is stable in clang ;)

vittorioromeo commented 4 years ago

@scemino: is there any way you could use GCC 9.2.x or higher on Mac OS?

scemino commented 4 years ago

@scemino: is there any way you could use GCC 9.2.x or higher on Mac OS?

Good question... but with gcc version 10.1.0 I have some issues to build SFML g++-10: error: unrecognized command-line option '-stdlib=libc++'

AlphaPromethium commented 4 years ago

If this issue is being worked on, can we get a card assignment and drag to the board?

scemino commented 4 years ago

I filled a bug about the clang crash to Apple. I try to go deeper with gcc 10, here is what I get now:

[build] Undefined symbols for architecture x86_64:
[build]   "_DiscordCreate", referenced from:
[build]       __ZN7discord4Core6CreateExyPPS0_ in core.cpp.o
[build]   "_SteamAPI_GetHSteamUser", referenced from:
[build]       __Z27SteamInternal_Init_SteamUGCPP9ISteamUGC in Steam.cpp.o
[build]       __Z33SteamInternal_Init_SteamUserStatsPP15ISteamUserStats in Steam.cpp.o
[build]       __Z31SteamInternal_Init_SteamFriendsPP13ISteamFriends in Steam.cpp.o
[build]   "_SteamAPI_Init", referenced from:
[build]       __ZN2hg5SteamL21initialize_steamworksEv in Steam.cpp.o
[build]   "_SteamAPI_RegisterCallback", referenced from:
[build]       __ZN2hg5Steam13steam_managerC1Ev in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_managerC2Ev in Steam.cpp.o
[build]   "_SteamAPI_RunCallbacks", referenced from:
[build]       __ZN2hg5Steam13steam_manager13run_callbacksEv in Steam.cpp.o
[build]   "_SteamAPI_Shutdown", referenced from:
[build]       __ZN2hg5SteamL19shutdown_steamworksEv in Steam.cpp.o
[build]   "_SteamAPI_UnregisterCallback", referenced from:
[build]       __ZN2hg5Steam13steam_manager44CCallbackInternal_on_user_achievement_storedD1Ev in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_manager38CCallbackInternal_on_user_stats_storedD1Ev in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_manager40CCallbackInternal_on_user_stats_receivedD1Ev in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_manager38CCallbackInternal_on_user_stats_storedD0Ev in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_manager40CCallbackInternal_on_user_stats_receivedD0Ev in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_manager44CCallbackInternal_on_user_achievement_storedD0Ev in Steam.cpp.o
[build]       __ZN13CCallbackImplILi20EED2Ev in Steam.cpp.o
[build]       ...
[build]   "_SteamInternal_ContextInit", referenced from:
[build]       __ZN2hg5Steam13steam_manager25set_rich_presence_in_menuEv in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_manager25set_rich_presence_in_gameESt17basic_string_viewIcSt11char_traitsIcEES5_S5_ in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_manager30request_stats_and_achievementsEv in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_manager11store_statsEv in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_manager18set_and_store_statESt17basic_string_viewIcSt11char_traitsIcEEi in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_manager15get_achievementEPbSt17basic_string_viewIcSt11char_traitsIcEE in Steam.cpp.o
[build]       __ZN2hg5Steam13steam_manager8get_statEPiSt17basic_string_viewIcSt11char_traitsIcEE in Steam.cpp.o
[build]       ...
[build]   "_SteamInternal_FindOrCreateUserInterface", referenced from:
[build]       __Z27SteamInternal_Init_SteamUGCPP9ISteamUGC in Steam.cpp.o
[build]       __Z33SteamInternal_Init_SteamUserStatsPP15ISteamUserStats in Steam.cpp.o
[build]       __Z31SteamInternal_Init_SteamFriendsPP13ISteamFriends in Steam.cpp.o
[build]   "__ZN2sf11SoundBuffer12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf11SoundBufferENS_15RHPolicyDefaultEE4loadIJRKN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in Assets.cpp.o
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf11SoundBufferENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZN2sf4Font12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf4FontENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZN2sf5Image12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf5ImageENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZN2sf5Music12openFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf5MusicENS_15RHPolicyDefaultEE4loadIJRKN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in Assets.cpp.o
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf5MusicENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZN2sf6PacketlsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN2hg6Online12buildCPacketILj0EJRbEEEN2sf6PacketEDpOT0_ in main.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj3EJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in main.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj7EJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in main.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj9EJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in main.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj2EJRfRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in main.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj6EJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in Online.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj7EJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in Online.cpp.o
[build]       ...
[build]   "__ZN2sf6PacketrsERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN2hg6Online21getDecompressedPacketERN2sf6PacketE in main.cpp.o
[build]       __ZN2hg6Online21getDecompressedPacketERN2sf6PacketE in Online.cpp.o
[build]   "__ZN2sf6Shader12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_4TypeE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf6ShaderENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathENS3_4TypeENS0_23ShaderDisambiguationTagILb0EEEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZN2sf6StringC1EPKcRKSt6locale", referenced from:
[build]       __ZN2hg11HexagonGame16drawText_MessageERKN2sf5ColorE in HGGraphics.cpp.o
[build]       __ZN2hg11HexagonGame10updateTextEv in HGGraphics.cpp.o
[build]       __ZN2hg11HexagonGame6updateEf in HGUpdate.cpp.o
[build]       __ZNSt17_Function_handlerIFvvEZN2hg11HexagonGame10addMessageENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdbEUlvE0_E9_M_invokeERKSt9_Any_data in HexagonGame.cpp.o
[build]       __ZN2hg11HexagonGame7newGameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_bf in HexagonGame.cpp.o
[build]       __ZN2hg11HexagonGameC2ERNS_5Steam13steam_managerERNS_7Discord15discord_managerERNS_8HGAssetsERN4ssvs10GameWindowE in HexagonGame.cpp.o
[build]       __ZN2hg11HexagonGameC1ERNS_5Steam13steam_managerERNS_7Discord15discord_managerERNS_8HGAssetsERN4ssvs10GameWindowE in HexagonGame.cpp.o
[build]       ...
[build]   "__ZN2sf6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6locale", referenced from:
[build]       __ZN2hg11HexagonGame10updateTextEv in HGGraphics.cpp.o
[build]       __ZNSt17_Function_handlerIFvvEZN2hg11HexagonGame10addMessageENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdbEUlvE_E9_M_invokeERKSt9_Any_data in HexagonGame.cpp.o
[build]       __ZN2hg8MenuGame14renderTextImplENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERN2sf4TextERKNS7_7Vector2IfEE in MenuGame.cpp.o
[build]       __ZN2hg8MenuGame18drawLevelSelectionEv in MenuGame.cpp.o
[build]       __ZN4ssvs10GameWindow14recreateWindowEv in main.cpp.o
[build]       _main in main.cpp.o
[build]   "__ZN2sf7Texture12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4RectIiEE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf7TextureENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZNK2sf5Image10saveToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN2hg11HexagonGame4drawEv in HGGraphics.cpp.o
[build]       __ZN2hg8MenuGame4drawEv in MenuGame.cpp.o
[build]   "__ZNK2sf9IpAddress8toStringB5cxx11Ev", referenced from:
[build]       __ZN2hg6Online13ManagedSocket7connectEN2sf9IpAddressEt in Online.cpp.o

How do you get the "steam api" ? OK I think I figured it out, now I still have some link issues with SFML (I presume).

[build] Undefined symbols for architecture x86_64:
[build]   "__ZN2sf11SoundBuffer12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf11SoundBufferENS_15RHPolicyDefaultEE4loadIJRKN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in Assets.cpp.o
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf11SoundBufferENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZN2sf4Font12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf4FontENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZN2sf5Image12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf5ImageENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZN2sf5Music12openFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf5MusicENS_15RHPolicyDefaultEE4loadIJRKN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in Assets.cpp.o
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf5MusicENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZN2sf6PacketlsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN2hg6Online12buildCPacketILj0EJRbEEEN2sf6PacketEDpOT0_ in main.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj3EJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in main.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj7EJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in main.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj9EJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in main.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj2EJRfRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in main.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj6EJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in Online.cpp.o
[build]       __ZN2hg6Online12buildCPacketILj7EJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEEN2sf6PacketEDpOT0_ in Online.cpp.o
[build]       ...
[build]   "__ZN2sf6PacketrsERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN2hg6Online21getDecompressedPacketERN2sf6PacketE in main.cpp.o
[build]       __ZN2hg6Online21getDecompressedPacketERN2sf6PacketE in Online.cpp.o
[build]   "__ZN2sf6Shader12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_4TypeE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf6ShaderENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathENS3_4TypeENS0_23ShaderDisambiguationTagILb0EEEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZN2sf6StringC1EPKcRKSt6locale", referenced from:
[build]       __ZN2hg11HexagonGame16drawText_MessageERKN2sf5ColorE in HGGraphics.cpp.o
[build]       __ZN2hg11HexagonGame10updateTextEv in HGGraphics.cpp.o
[build]       __ZN2hg11HexagonGame6updateEf in HGUpdate.cpp.o
[build]       __ZNSt17_Function_handlerIFvvEZN2hg11HexagonGame10addMessageENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdbEUlvE0_E9_M_invokeERKSt9_Any_data in HexagonGame.cpp.o
[build]       __ZN2hg11HexagonGame7newGameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_bf in HexagonGame.cpp.o
[build]       __ZN2hg11HexagonGameC2ERNS_5Steam13steam_managerERNS_7Discord15discord_managerERNS_8HGAssetsERN4ssvs10GameWindowE in HexagonGame.cpp.o
[build]       __ZN2hg11HexagonGameC1ERNS_5Steam13steam_managerERNS_7Discord15discord_managerERNS_8HGAssetsERN4ssvs10GameWindowE in HexagonGame.cpp.o
[build]       ...
[build]   "__ZN2sf6StringC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6locale", referenced from:
[build]       __ZN2hg11HexagonGame10updateTextEv in HGGraphics.cpp.o
[build]       __ZNSt17_Function_handlerIFvvEZN2hg11HexagonGame10addMessageENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEdbEUlvE_E9_M_invokeERKSt9_Any_data in HexagonGame.cpp.o
[build]       __ZN2hg8MenuGame14renderTextImplENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERN2sf4TextERKNS7_7Vector2IfEE in MenuGame.cpp.o
[build]       __ZN2hg8MenuGame18drawLevelSelectionEv in MenuGame.cpp.o
[build]       __ZN4ssvs10GameWindow14recreateWindowEv in main.cpp.o
[build]       _main in main.cpp.o
[build]   "__ZN2sf7Texture12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4RectIiEE", referenced from:
[build]       __ZN4ssvs4Impl14ResourceHolderIN2sf7TextureENS_15RHPolicyDefaultEE4loadIJN4ssvu10FileSystem4PathEEEERS3_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEDpOT_ in UtilsJson.cpp.o
[build]   "__ZNK2sf5Image10saveToFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN2hg11HexagonGame4drawEv in HGGraphics.cpp.o
[build]       __ZN2hg8MenuGame4drawEv in MenuGame.cpp.o
[build]   "__ZNK2sf9IpAddress8toStringB5cxx11Ev", referenced from:
[build]       __ZN2hg6Online13ManagedSocket7connectEN2sf9IpAddressEt in Online.cpp.o
[build] ld: symbol(s) not found for architecture x86_64
scemino commented 4 years ago

Bad news, for macOS, SFML is built with clang only, there is no GCC version. And as I understand SFML use objective C which is not well supported by GCC, that's why there's no GCC version for SFML.

Here are my propositions:

  1. Find a way to compile SFML with gcc
  2. Or use another library than sfml
  3. Or replace C++20 code that don't compile with clang by C++17 code
  4. Or wait for Apple to fix clang issues with C++20
  5. Or something else?
InfoTeddy commented 4 years ago

2. Or use another library than sfml

I haven't heard anything definitive yet, but there has been talk of moving the game to OpenGL or even Vulkan, which the game should do anyway.

3. Or replace C++20 code that don't compile with clang by C++17 code

This seems to me like the solution that could be achieved the fastest, the next fastest being the one above (moving off of SFML). As a bonus, maybe I could easily add Windows builds to the CI after this change, since it's hard to get MinGW 9 or later working on GitHub Actions runners.

InfoTeddy commented 4 years ago

there's no GCC version for SFML

Hmm, I'm confused by this statement. I got SFML built on my Linux system using GCC just fine. If SFML doesn't support GCC, how come it worked?

More specifically, I'm running Gentoo, and I did sudo emerge -1a libsfml to build SFML, the output of which says it is using /usr/bin/x86_64-pc-linux-gnu-g++. And as you can see:

~  /usr/bin/x86_64-pc-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=/usr/bin/x86_64-pc-linux-gnu-g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/9.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/gcc-9.2.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/9.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/python --enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened 9.2.0-r2 p3' --enable-esp --enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-systemtap --enable-vtable-verify --disable-libquadmath --enable-lto --without-isl --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 9.2.0 (Gentoo Hardened 9.2.0-r2 p3)

This is GCC.

scemino commented 4 years ago

there's no GCC version for SFML

Hmm, I'm confused by this statement. I got SFML built on my Linux system using GCC just fine. If SFML doesn't support GCC, how come it worked?

More specifically, I'm running Gentoo, and I did sudo emerge -1a libsfml to build SFML, the output of which says it is using /usr/bin/x86_64-pc-linux-gnu-g++. And as you can see:

~  /usr/bin/x86_64-pc-linux-gnu-g++ -v
Using built-in specs.
COLLECT_GCC=/usr/bin/x86_64-pc-linux-gnu-g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/9.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-9.2.0-r2/work/gcc-9.2.0/configure --host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/9.2.0 --includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include --datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0 --mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/man --infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/9.2.0/include/g++-v9 --with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/9.2.0/python --enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --enable-nls --without-included-gettext --enable-checking=release --with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened 9.2.0-r2 p3' --enable-esp --enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-multilib --with-multilib-list=m32,m64 --disable-altivec --disable-fixed-point --enable-targets=all --enable-libgomp --disable-libmudflap --disable-libssp --disable-systemtap --enable-vtable-verify --disable-libquadmath --enable-lto --without-isl --enable-default-pie --enable-default-ssp
Thread model: posix
gcc version 9.2.0 (Gentoo Hardened 9.2.0-r2 p3)

This is GCC.

Sorry for the misunderstanding, I was talking about the macOS version, there is no GCC version for macOS

PyRectangle commented 4 years ago

Sorry for the misunderstanding, I was talking about the macOS version, there is no GCC version for macOS

There is gcc for mac. Do a quick search and you find this. If that doesn't work, you can build gcc from source.

scemino commented 4 years ago

Sorry for the misunderstanding, I was talking about the macOS version, there is no GCC version for macOS

There is gcc for mac. Do a quick search and you find this. If that doesn't work, you can build gcc from source.

Sorry again, what I said is there is no GCC version of the sfml library for macOS, there is only a clang version. If you try to compile in your own the sfml library with gcc on macOS you will get errors.

PyRectangle commented 4 years ago

Can't you compile sfml with clang and the rest with gcc? Also, someone had a similar problem here, wouldn't the solution in this thread work?

scemino commented 4 years ago

I don't have a link error but a compilation error, so the solution you gave me won't work.

PyRectangle commented 4 years ago

I mean, that you don't build sfml yourself, but download prebuilt binaries from here.

scemino commented 4 years ago

Sorry I know this page and there is no gcc version for macOS: image

PyRectangle commented 4 years ago

Sorry, if I'm just dumb, but can't you use gcc to link against the sfml.framework that was compiled with clang in the download.

scemino commented 4 years ago

Sorry, if I'm just dumb, but can't you use gcc to link against the sfml.framework that was compiled with clang in the download.

Maybe but I have a compilation error, so I don't reach the linking phase.

PyRectangle commented 4 years ago

What error? Can you post it? Edit: Did you mean the Segmentation fault: 11 from above?

Morxemplum commented 3 years ago

Good news for y'all Mac users https://github.com/duck-37/SSVOpenHexagon/commit/355d956fd12542cc22516c69d17d34700e35bc0d

Morxemplum commented 3 years ago

Someone was able to get the game to build on Mac. The instructions are a little complicated, but I'm sure they'll be coming soon and we can finally close this issue

duk-37 commented 3 years ago

Build steps:

brew install cmake llvm git sfml
git clone --recurse-submodules --remote-submodules -b osx https://github.com/duck-37/SSVOpenHexagon
cd SSVOpenHexagon
cd build
<cmake command of choice>
make
make install
cp ./SSVOpenHexagon ../_RELEASE

Then run _RELEASE/SSVOpenHexagon.

CMake commands: Debug

cmake .. -DCMAKE_BUILD_TYPE=DEBUG -DLUAJIT_ENABLE_GC64=YES -DCMAKE_C_COMPILER="/usr/local/opt/llvm/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/opt/llvm/bin/clang++" -DCMAKE_CXX_FLAGS="-g3 -O0 -fno-omit-frame-pointer" -DCMAKE_C_FLAGS="-DTARGET_OS_IPHONE=0"

Release

cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DLUAJIT_ENABLE_GC64=YES -DCMAKE_C_COMPILER="/usr/local/opt/llvm/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/opt/llvm/bin/clang++" -DCMAKE_C_FLAGS="-DTARGET_OS_IPHONE=0"

I used LLVM 12 from homebrew, which is why the paths to the compilers are so long.

Morxemplum commented 3 years ago

@duck-37 Great! Now along with your changes we could add some more friendlier instructions to the Wiki Build Instructions and make a Pull Request from this!

duk-37 commented 3 years ago

Sounds good to me, though I wouldn't put the hack-y clock fix into the PR; that needs to be fixed properly some other way. Will open a PR for the cmake and library changes though.

Morxemplum commented 3 years ago

Hmmmm. Take the time you need for a more proper fix. I'm sure the Mac users can now wait a little more.

duk-37 commented 3 years ago

Well the main issue is that I don't want to touch the database/server/etc code because that's all very tightly knit together. I'll see what I can do though.

Morxemplum commented 3 years ago

You may need to talk to Vee about that. Paging @SuperV1234.

M0REKZ commented 1 year ago

Hi, how is that going? i want to play open hexagon :)