Comments (5)
In OSX makefile the SDL Framewwork standard path must be added to rpath in PLATFORM_LDFLAGS.
PLATFORM_LDFLAGS = $(SDL_LIBS) -lz -lm -lstdc++ -F/Library/Frameworks/ -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,~/Library/Frameworks -Wl,-rpath,/Library/Frameworks
from supermodel.
The UNIX Makefile has this:
SDL2_CFLAGS = `sdl2-config --cflags`
SDL2_LIBS = `sdl2-config --libs`
Have you tried this solution for macOS? Would it possibly resolve this issue? Here's what happens when I run it on my system:
(base) Barts-MBP:argpt-for-ios bart$ sdl2-config --libs
-L/opt/homebrew/lib -lSDL2
(base) Barts-MBP:argpt-for-ios bart$ sdl2-config --cflags
-I/opt/homebrew/include/SDL2 -D_THREAD_SAFE
(base) Barts-MBP:argpt-for-ios bart$
from supermodel.
SDL2 and zlib are really our only external dependencies. I would strongly prefer to make this work with a clever Makefile before going nuclear (cmake, ninja, etc.). One advantage of macOS and Linux is that you have a guarantee of a more functional shell to work with than on Windows, where I typically build using Command Prompt (but use bash on Windows for the build bot that uploads builds to supermodel3.com).
I feel like it should be quite possible to work with this. If I understand correctly, the issue is that the SDL2 path differs depending on whether it was installed with brew or manually. The sdl2-config script is provided by SDL2 to help here. If that doesn't work, don't we essentially have two possibilities, making it potentially possible to write a shell or even a native Makefile command to test for one or the other?
from supermodel.
No nuclear things needed.. This has nothing to do with homebrew. On a Mac SDL/SDL2 can be either installed manually or with brew. Independent of this, it's about where frameworks/libraries are stored on a Mac. The correct place is either "~/Library/Frameworks" or "/Library/Frameworks". So simply add these two path to the rpath variable in PLATFORM_LDFLAGS in the OSX makefile.
Once compiled with this change, supermodel will work for every Mac user.
from supermodel.
No nuclear things needed.. This has nothing to do with homebrew. On a Mac SDL/SDL2 can be either installed manually or with brew. Independent of this, it's about where frameworks/libraries are stored on a Mac. The correct place is either "~/Library/Frameworks" or "/Library/Frameworks". So simply add these two path to the rpath variable in PLATFORM_LDFLAGS in the OSX makefile.
Once compiled with this change, supermodel will work for every Mac user.
Doesn't it have a little bit to do with homebrew? Frameworks are linked differently than standard shared libraries.
PLATFORM_LDFLAGS = $(SDL_LIBS) -lz -lm -lstdc++ -F/Library/Frameworks/ -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,~/Library/Frameworks -Wl,-rpath,/Library/Frameworks
One word of caution for anyone seeing this, the home directory (tilde) in ~/Library/Frameworks
is expanded by the shell before it is added to the rpath list in the binary. Also, typically you'll need to add the requisite -F
flag for each path.
from supermodel.
Related Issues (20)
- Request: GroovyMISTER output path HOT 5
- Daytona 2 PE Scene transitions HOT 2
- Black/Blue Flashes HOT 10
- Supermodel crashes on startup when using wayland HOT 6
- validate roms HOT 3
- Cannot run any roms on 0.3a, [Error] Could not open '<rom>.zip'. No issue with 0.2a. HOT 5
- GAMES.XML HOT 4
- [vf3tb] Dural stage BGM disappears in the middle of the game
- Legacy renderer segfault on macOS HOT 1
- An old ancient mistake HOT 8
- Request: Appimage binary HOT 1
- Increase configurability for `~/.config` and `~/.local` paths
- Enable scuddxo commit has broken some 1.5 step games? HOT 1
- scuddxo glitches HOT 1
- [Linux][lamachin] Black screen when launching L.A. Machineguns HOT 10
- [Linux] Graphical problem choosing fullscreen option HOT 2
- [Linux][lostwsga] Aiming problem HOT 2
- Racing games are unplayable
- [eca] 4-Speed Gear Lever Inputs Not Mapped Correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supermodel.