Repository navigation
Description
Hi! 👋
The CI covers macOS for 0.4.x for two weeks now, there is an input plugin for PortAudio that supports macOS and there have been build system fixes for macOS to make CI integration possible in the first place.
However I have no access to macOS, all my boxes run Linux (and a pile of GNU). I am looking for people to help answer these macOS questions regarding libvisual 0.4.x:
- Does it compile out of the box?
- If it doesn't compile, did
./configurecomplain and helped figuring out what was needed? - Does lv-tool-0.4 start and show a spinning 3D GL spectrum?
- Does lv-tool-0.4 use actual audio input when run with
--input portaudio(and does it use the microphone or the audio that other apps are playing)?
If you can help answer these questions from practical experience, that would rock.
To make that easier for you here's the quickest way I know:
Clone the right branch
git clone --branch 0.4.x-macos https://github.com/Libvisual/libvisual
cd libvisualInstall homebrew packages
EDIT 2023-02-08: Add package autoconf-archive this list of packages to install locally:
libvisual/.github/workflows/linux_and_macos.yml
Lines 95 to 112 in fc109d8
| brew install \ | |
| automake \ | |
| bison \ | |
| doxygen \ | |
| flex \ | |
| gettext \ | |
| graphviz \ | |
| gstreamer \ | |
| gtk+3 \ | |
| jack \ | |
| libpng \ | |
| luajit \ | |
| mesa \ | |
| mesa-glu \ | |
| orc \ | |
| pkg-config \ | |
| portaudio \ | |
| sdl12-compat |
Compile and run
Here's what I would put in a script run-0.4-macos.sh, this is very close to what I do on Linux, locally:
#! /usr/bin/env bash
set -eux
LV_INSTALL_PREFIX="${PWD}"/INSTALL_PREFIX
configure_args=(
--prefix="${LV_INSTALL_PREFIX}"
# In case you would like to play with AddressSanitizer:
#CFLAGS="-O1 -pipe -g -fsanitize=address -fno-omit-frame-pointer"
#CXXFLAGS="-O1 -pipe -g -fsanitize=address -fno-omit-frame-pointer"
#LDFLAGS="-g -fsanitize=address"
)
for i in libvisual libvisual-plugins ; do
( cd "$i" && NOCONFIGURE=please ./autogen.sh )
done
pushd libvisual
./configure "${configure_args[@]}"
make -j$(nproc)
make install
popd
pushd libvisual-plugins
PKG_CONFIG_PATH="${LV_INSTALL_PREFIX}"/lib/pkgconfig/ \
./configure "${configure_args[@]}"
make -j$(nproc)
make install
popd
lv_tool_env=(
#ASAN_OPTIONS=detect_leaks=0
DYLD_LIBRARY_PATH="${LV_INSTALL_PREFIX}"/lib/
)
exec env "${lv_tool_env[@]}" "${LV_INSTALL_PREFIX}"/bin/lv-tool-0.4 --input portaudio "$@"What you should see:
- Compile output including unfixed warnings
- A window titled "lv-tool" looking a bit like this, but animated:
For anything odd that you find except compiler warnings, please open dedicated bug reports at https://github.com/Libvisual/libvisual/issues . Many thanks in advance! 🙏
Best, Sebastian

Activity
ChrisScheffler commentedon Feb 4, 2023
CPU: M1 Pro (arm64)
MacOS: Ventura 13.0.1
Kernel: Darwin Kernel Version 22.1.0
no
no, it fails at
make(after successful compile) it does start, but with a blank window
no
libvisual CRITICAL: lv-tool-0.4: inp_portaudio_upload(): assertion `priv->stream != NULL' failed
Workaround for compile
makefails with default compilerclangbrew install gcc@11configure&make2.1.
./configure CC=/opt/homebrew/bin/gcc-11 CXX=/opt/homebrew/bin/g++-112.2.
make CC=/opt/homebrew/bin/gcc-11 CXX=/opt/homebrew/bin/g++-11notes for
run-0.4-macos.shnprocis not available by defaultmake installrequires root privilegesidleberg commentedon Feb 4, 2023
For comparison, here's the result on my rather old setup:
System Version: macOS 10.15.7 (19H2026)
Kernel Version: Darwin 19.6.0
Model Name: Mac mini
Model Identifier: Macmini8,1
Processor Name: 6-Core Intel Core i5
The output of your demo script:
hartwork commentedon Feb 5, 2023
Thank you! 👍 👍 That's more and more severe trouble than I expected.
@ChrisScheffler regarding your report:
priv->stream != NULL? It would mean that PortAudio failed to open the stream but also pretended it worked (thinking linevisual_log_return_val_if_fail (open_error == paNoError, -3);)-frameworkOpenGL rather than homebrew's Mesa then.nprocis GNU coreutils, right,coreutilswas is not in the list for homebrew to install, my bad.make installrequire root despite--prefix="${LV_INSTALL_PREFIX}"? If so, did you find why?@idleberg regarding the
AC_MSG_ERROR, is this with pkg-config installed, did you run the homebrew install list mentioned above? From what this reads it seems to happen when pkg-config is not installed.hartwork commentedon Feb 5, 2023
@idleberg PS: Alternatively, could it be that there are multiple copies of pkg-config and the wrong one wins the
${PATH}race? Doeswhich pkg-configpoint at homebrew? Autoconf tries to satisfy macroPKG_PROG_PKG_CONFIGand it needs filepkg.m4for that — my copy is at/usr/share/aclocal/pkg.m4. If the wrong pkg-config looks in effectively the wrong place, maybe that would cause the error.idleberg commentedon Feb 5, 2023
Homebrew gave me some warnings when installing the dependencies. Basically, they don't guarantee that installing "formalas" will continue work for an outdated OS. I tried again and I'm now getting this:
ChrisScheffler commentedon Feb 5, 2023
startup with root privileges:
ChrisScheffler commentedon Feb 5, 2023
@idleberg last comment addresses the clang issue. Its the default compiler frontend (not homebrew).
On M1 Pro @ Ventura:
gcc -vhartwork commentedon Feb 6, 2023
Thanks for the updates, interesting! 👍
There is a new branch
0.4.x-macoswith these noteworthy changes:Could you try with branch
0.4.x-macosand report back?Thanks in advance! 🙏
hartwork commentedon Feb 6, 2023
PS: One more homebrew package is needed with branch
0.4.x-macosnow:autoconf-archive.[-]macOS support / need your help with trying 0.4.x out on macOS (branch "0.4.x-fix-palette-use-after-free")[/-][+]macOS support / need your help with trying 0.4.x out on macOS (branch "0.4.x-macos")[/+]ChrisScheffler commentedon Feb 6, 2023
compiling branch
0.4.x-macoswith native clang fails for G-Force plugin (errors only):output for compiled binary (with gcc 11):
hartwork commentedon Feb 6, 2023
@ChrisScheffler thanks! Will need to look into the C++ errors and find a clean way to make the PortAudio code first try stereo and the fall back to mono. With the changes regarding OpenGL, did you still get a black window or a rotating plane of squares this time?
ChrisScheffler commentedon Feb 6, 2023
@hartwork sorry, forgot the screenshot. The window is now filled with colored "bars" as expected.
hartwork commentedon Feb 6, 2023
@ChrisScheffler that is plain awesome! 👍
idleberg commentedon Feb 6, 2023
With the new version, I'm getting dozens of warnings (C++11 related, OpenGL deprecations and others) and ultimately an error:
Let me know if you need the entire log (3181 lines)
PS: neither version will compile with root privileges
hartwork commentedon Feb 6, 2023
@ChrisScheffler I made the PortAudio plugin fall back to mono now when stereo is not available, same branch. Could you give it a try?
@idleberg I did try with macOS 10.15 and its system Clang in the CI earlier, strange. If you could drag-n-drop the full log as a text file into a reply, that would rock (and be the easiest to look at). Alternatively, a
<details>tag would work well too. The log would allow seeing if pluginslv_gltestandportaudiowere fully built.PS: There should be no need for root with anything here, I made
run-0.4-macos.shwith that in mind, e.g. that's why I putDYLD_LIBRARY_PATHin there. But maybe it needs adjustment (if the plugins are fully built). Could you share the output offind . -name \*lv_gltest.dy\*?hartwork commentedon Feb 6, 2023
@idleberg PS: Got your e-mail just now.
ChrisScheffler commentedon Feb 6, 2023
@hartwork with the new version of the plugin audio is captured from the microphone and visualized.
output:
hartwork commentedon Feb 6, 2023
@ChrisScheffler awesome!
The assertion output is not specific to macOS and a known todo, but thanks.
hartwork commentedon Feb 6, 2023
@ChrisScheffler this^^ seems to be about const correctness. I believe that is fixed by 0c21b88 now, same branch. Can you confirm?
ChrisScheffler commentedon Feb 7, 2023
@hartwork 6d93614 compiles without errors for clang and gcc11
hartwork commentedon Feb 7, 2023
@ChrisScheffler perfect, thank you! 👍
hartwork commentedon Apr 25, 2023
libvisual just entered Homebrew. Please be invited to try it on macOS for yourself: