Closed Snowfees closed 2 years ago
As I'm not a Mac user myself, I've always been relying on help from people who actually know how to develop for Mac, but my wild guess: maybe the sfml version you're using is too new. I haven't updated this in a while, I'm not sure if it works with the most recent version of sfml.
If you're in sfml 2.5, can you try if sfml 2.4 works? And if not, could you post which command throws the error and the exact error message?
Nevermind the version, the latest version of sfml that is confirmed to work is 2.5.1. Still, the command you're using and the output might help.
Oh, I might have just found the problem. Sfml 2.5.1 apparently does not have support for Apple silicone, so you'd need to build SFML yourself too.
SFML does have Apple silicone support by now, according to https://en.sfml-dev.org/forums/index.php?topic=28114.0 but it's not released, so you're probably using a version without that support.
If I understand it correctly, at least on the M1 there should be an x32_64 emulator called rosetta? Would it be an option for you to use that to run the official Mac build?
The official builds do work on rosetta, but the frame rate is somewhat unstable so I wanted to compile a native version. I tried using a new build of sfml, but that didn't seem to change anything. below is the terminal output from using "/autogen.sh && ./configure && make" to compile
configure.ac:60: warning: AC_OUTPUT should be used without arguments.
configure.ac:60: You should run autoupdate.
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /opt/homebrew/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
checking for _Bool... yes
checking for stdbool.h that conforms to C99... yes
checking for size_t... yes
checking for uint16_t... yes
checking for uint8_t... yes
checking for main in -lsfml-system... no
configure: error: *** Unable to find SFML library (http://www.sfml-dev.org/)```
Okay, unstable frame rate is annoying indeed.
So the configure fails to find the fsml header files if I interpret the error output correctly (it's been a hot minute since I last worked with C(++), let alone autotools). So that sounds like either you didn't install everything related to sfml that is needed or it's been installed in a path that isn't known to configure. You compiled sfml yourself to get the apple silicone support? Did you do any installation steps after compiling it?
Just so I don't ask questions that are obvious to you: how much experience do you have with compiling programs and libraries by yourself?
I compiled it by using homebrew, which cloned the SFML GitHub and built from that, so it should have installed to the default location. I’m not that experienced with compiling programs and libraries unfortunately.
Okay. Again, I don't know much about Mac OS, but I hope this will help debug this:
Can you check if there is an SFML folder in /usr/local/include? That seems to be the canonical path for header files on Mac OS and if they are there, at least those shouldn't be the issue. Also check for an SFML folder in /usr/local/lib, which should contain dylib files.
If those aren't there, search for other places that have .h or .dylib files that contain sfml in their name.
The files appeared to not be in those locations, so I moved the files there, and it seems that the compile is working now. Thank you for the help.
That's great to hear! I hope it'll run more stable for you now :)
I’ve been trying to compile a version for apple silicon using the instructions on the main page, but when it attempts to look for Sfml, it says it cannot find it, despite that and the other dependencies being installed via homebrew with their latest versions. Any help would be appreciated.
Currently on Big Sur 11.6 if that helps.