Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues building Audiowmark on macOS #7

Open
carlca opened this issue May 30, 2021 · 10 comments
Open

Issues building Audiowmark on macOS #7

carlca opened this issue May 30, 2021 · 10 comments

Comments

@carlca
Copy link

carlca commented May 30, 2021

  • macOS 10.14.6
  • ZSH shell + Prezto

Hello! I am having problems building Audiowmark. I've downloaded the master zip. unzipped it into ~/music/audiowmark, issued cd ~/music/audiowmark but I'm not sure what to do next. Ideally, there would be some make command to build the package, but that does't seem to be present. Forgive me for my lack of knowledge in these matters ;-)

@normen
Copy link

normen commented Sep 2, 2021

You'll need at least automake installed (e.g. brew install automake) however not all of the required libraries (like zita-resampler) are available through homebrew so you'll probably have to build some of them as well.

Then it's probably just a matter of running autogen.sh and then running automake..

Edit: You can build and run on mac using docker desktop though, thats what I did for now..

@normen
Copy link

normen commented Sep 2, 2021

This is how I try to build on MacOS using homebrew:

  • brew install mpg123 fftw libsndfile libgcrypt
  • git clone https://github.com/digital-stage/zita-resampler
  • cd zita-resampler
  • Edit CMakeLists.txt
    • Change add_library(zita-resampler ${SOURCES} ${HEADER_LIST})
    • To add_library(zita-resampler SHARED ${SOURCES} ${HEADER_LIST})
  • cmake ./
  • make install
  • cd ..
  • git clone https://github.com/swesterfeld/audiowmark
  • cd audiowmark
  • ./autogen.sh

However while theres no more "library missing" errors I still end up with an error in the configure script when running autogen.sh:

./configure: line 17470: syntax error near unexpected token `ext'
./configure: line 17470: `AX_CXX_COMPILE_STDCXX_14(ext)'

@normen normen mentioned this issue Sep 2, 2021
@swesterfeld
Copy link
Owner

swesterfeld commented Sep 2, 2021

./configure: line 17470: syntax error near unexpected token `ext'
./configure: line 17470: `AX_CXX_COMPILE_STDCXX_14(ext)'

This looks like the problem could be fixed by installing the autoconf-archive package (brew install autoconf-archive).

@normen
Copy link

normen commented Sep 2, 2021

Wow, nice. That worked, yes. Thank you very much, especially for releasing this software in the first place!

I still had to change the zita-resampler CMakeLists.txt a bit for it to install the headers, so heres the full step-by-step that finally worked for me to build on MacOS:

  • brew install automake autoconf-archive cmake
  • brew install mpg123 fftw libsndfile libgcrypt
  • git clone https://github.com/digital-stage/zita-resampler
  • cd zita-resampler
  • Edit CMakeLists.txt
    • Change add_library(zita-resampler ${SOURCES} ${HEADER_LIST})
    • To add_library(zita-resampler SHARED ${SOURCES} ${HEADER_LIST})
    • Add to end of file: install(FILES ${HEADER_LIST} DESTINATION "include/zita-resampler")
  • cmake ./
  • make install
  • cd ..
  • git clone https://github.com/swesterfeld/audiowmark
  • cd audiowmark
  • ./autogen.sh
  • make
  • Find executable in src/audiowmark
  • Alternatively do make install

Thanks again!

@daryb
Copy link

daryb commented Nov 19, 2021

Thanks for this tool! And thanks normen for following up and writing your steps out to get going on macOS. audiowmark is working perfectly for me after following your instructions. Have you by chance gotten videowmark going on macOS? Whenever I run it, I get videowmark: error parsing command line arguments (use videowmark -h) . That also happens when running videowmark -h. Thoughts or suggestions?

@easyupdo
Copy link

easyupdo commented Dec 1, 2021

Hello sir:
I have the same problem.
./configure: line 16605: syntax error near unexpected token ext' ./configure: line 16605: AX_CXX_COMPILE_STDCXX_14(ext)'
AND
i exec: sudo apt-get install autoconf-archive,then, ./antogen.sh . I still have this problem

my env: ubuntu 16.04 gcc:5.0.4

Any other suggestions?

thanks.

@swesterfeld
Copy link
Owner

I think the error message

videowmark: error parsing command line arguments (use videowmark -h)

on macOS is since I developed and tested the script on linux where we have a version of getopt that is called GNU getopt which can handle long options as --strength 10. In the script this is this line:

GETOPT_TEMP=`getopt -o vhq --long verbose,quiet,help,key:,strength: -n 'videowmark' -- "$@"`

The following discussion has relevant information:

https://stackoverflow.com/questions/402377/using-getopts-to-process-long-and-short-command-line-options/7948533

but basically there are two possibilities of fixing this: install GNU getopt or modify the script to use different option handling.

@swesterfeld
Copy link
Owner

my env: ubuntu 16.04 gcc:5.0.4

This is kind-of old. Not sure if this has all dependencies for building audiowmark, you'll have to try.

./configure: line 16605: syntax error near unexpected token `ext' ./configure: line 16605: `AX_CXX_COMPILE_STDCXX_14(ext)'

It looks like your autoconf-archive is too old. Try building a stable audiowmark release, then you won't need to use autogen.sh.

Stable releases are available from https://uplex.de/audiowmark/. Then use the configure script instead of autogen.sh.

@carlca
Copy link
Author

carlca commented Dec 2, 2021

Thanks to @swesterfeld and @normen for providing the info.
Note that before running ./autogen.sh I had to run brew install lib tool and brew install png-config but otherwise it all worked a treat. To be honest, I had forgotten about this issue so getting notification about it was most welcome 😉

I should point out that since I wrote the initial message, I have moved to a new Mac Mini M1 and am now running macOS 12.01 Monterey, but everything worked just fine.

@daryb
Copy link

daryb commented Dec 2, 2021

Thanks for pointing me in the right direction @swesterfeld! gnu-getopt is included in macOS, but for some reason isn't symlinked by default...so after symlinking it gets past that step. I've progressed on to another error, relating to the temp file location directories /dev/fd/*, but again, that's probably a macos specific issue, and I can likely figure that one out. If I get everything working, I'll post back. In the meantime if anyone is looking for a workaround for videowmark on macOS, I have been manually stripping the audio with FFMPEG and passing it to audiowmark, and then passing that audio back to FFMPEG to mux or transcode it back into the video. Videowmark does the same thing (Line 87-96 of audiowmark/src/videowmark is the relevant FFMPEG settings for reference), but right now I'm scripting all that and it's working great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants