Comments (5)
This is on purpose as I build all the decoders and support libraries as part of the my macos squeezelite builds.
Adding the PATH(s) to these other package managers break my builds.
from squeezelite.
What about having extra Makefiles like Makefile.m1-pkgsrc
and Makefile.m1-macports
?
from squeezelite.
I don't know if this is the kind of thing ./configure
would fix, but I was able to get squeezelite compiled on my M2 Mac today. The packages available on the website the OS said were all corrupted.
I don't know what the cleanest way of handling these things are or I'd make a pull request so I'm documenting them here because the binary works fine. I haven't written C code since the 90s.
Apple M2 Mac running Ventura
- Comment out the -rt stuff because it's not Linux
- Force PORTAUDIO because it was trying to use ALSA
- add
-I /opt/homebrew/include
to CFLAGS and-L /opt/homebrew/lib
to LDADD so it could find all the includes and lib.
Hope that helps!
from squeezelite.
I don't know if this is the kind of thing
./configure
would fix,
Yes.
but I was able to get squeezelite compiled on my M2 Mac today. The packages available on the website the OS said were all corrupted.
Not sure, what you mean here.
1. Comment out the -rt stuff because it's not Linux 2. Force PORTAUDIO because it was trying to use ALSA
I guess you did not use the existing m1 Makefile. You can specify it like that: make -f Makefile.m1
3. add `-I /opt/homebrew/include` to CFLAGS and `-L /opt/homebrew/lib` to LDADD so it could find all the includes and lib.
Yes, that is basically what you need to do. Tell the build system, where headers and libs are.
from squeezelite.
Corrupted packages from the Sourceforge site:
I tried using the Makefile.m1
and it looks like it was very hacked for someone's specific machine. I think the Opus stuff might just be a quirk in how Homebrew packages stuff so I wound up taking OPUS and ALAC out since it didn't seem worth fighting with right now to get a clean compile.
This is what I had to change:
diff --git a/Makefile b/Makefile
index 78511dc..07443b1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
#Cross compile support - create a Makefile which defines these three variables and then includes this Makefile...
CFLAGS ?= -Wall -fPIC -O2
-CFLAGS += -fcommon -std=gnu99
+CFLAGS += -fcommon
LDADD ?= -lpthread -lm -lrt
EXECUTABLE ?= squeezelite
@@ -41,7 +41,7 @@ SOURCES_OPUS = opus.c
SOURCES_MAD = mad.c
SOURCES_MPG123 = mpg.c
-LINK_LINUX = -ldl
+LINK_LINUX = -ldl -std=gnu99
LINK_ALSA = -lasound
LINK_PORTAUDIO = -lportaudio
LINK_PULSEAUDIO = -lpulse
diff --git a/Makefile.m1 b/Makefile.m1
index 1157732..032732e 100644
--- a/Makefile.m1
+++ b/Makefile.m1
@@ -1,7 +1,7 @@
# OSX 12.0+ arm64 only
-OPTS = -DUSE_LIBOGG -DPORTAUDIO -DALAC -DOPUS -DRESAMPLE -DLINKALL -DVISEXPORT -DDSD -DUSE_SSL -I./includem1 -I./includem1/opus -I./includem1/alac -arch arm64 -O3 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=11.0
+OPTS = -DUSE_LIBOGG -DPORTAUDIO -DRESAMPLE -DLINKALL -DVISEXPORT -DDSD -DUSE_SSL -arch arm64 -O3 -mmacosx-version-min=11.0 -I /opt/homebrew/include
-LDFLAGS = -arch arm64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=11.0 -L./libm1
+LDFLAGS = -arch arm64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -mmacosx-version-min=11.0 -L /opt/homebrew/lib
LDADD = -lportaudio -lpthread -ldl -lm -framework CoreVideo -framework VideoDecodeAcceleration -frame
work CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon
diff --git a/opus.c b/opus.c
index baabab0..edbe18b 100644
--- a/opus.c
+++ b/opus.c
@@ -41,7 +41,7 @@
#define ALIGN(n) (n << 16)
#endif
-#include <opusfile.h>
+#include <opus/opusfile.h>
struct opus {
struct OggOpusFile *of
Briefly:
- The
gnu99
stuff - Removed the
sysroot
stuff as it wasn't needed and just broke things - Took out
DALAC
andDOPUS
because they were just causing headaches on my machine. I'm guessing I could fight to get the stuff in the right place to make it work because Homebrew didn't have it or do it. The ALAC stuff is over a decade old at this point.
tl;dr I think it would be cool to get the Sourceforge downloads to not be broken. Otherwise, the Makefile.m1
(and Makefile
) needs a little love if people are going to use it without too much trouble. I think the package manager stuff could be handled more cleanly in variables than as hardcoded.
If we can get these sorted out so that most people are happy, I'm happy to submit a PR for the README which is currently not useful to anyone.
from squeezelite.
Related Issues (20)
- flac and ogf streams HOT 3
- output threshold is incorrect HOT 2
- Power controls (gpio/script) tied to output device being open rather than soft power button state
- Build fails on 1466 (commit c89faf3) HOT 15
- Build error in flac.c on revision 1466 HOT 2
- Whole-album flacs with embedded cuesheet playback broken by commit c89faf3 Ogg metadata (and a bit more) HOT 11
- relay-script toggles off/on/off during start HOT 9
- Version 1476 - Error compiling on X86 and Raspberry 4 HOT 13
- Request: Create Release HOT 4
- OggFlac chaining HOT 2
- unhandled grfe HOT 4
- squeezelite-pulse sync issues
- Issue with mp3 playback on Alpine Linux with recent squeezelite versions HOT 8
- Crash on Arch Linux
- macOS M1 binary release Squeezelite.app is corrupted HOT 2
- Compiling: error with gpio.h HOT 3
- Meta-package squeezelite-2.0.0.1488-aarch64 HOT 1
- Squeezelite-2.0.0.1488 dont play FLAC radios HOT 1
- Native DSD not working HOT 2
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 squeezelite.