UltraStar-Deluxe / USDX

The free and open source karaoke singing game UltraStar Deluxe, inspired by Sony SingStar™
https://usdx.eu
GNU General Public License v2.0
832 stars 160 forks source link

Makefile cannot find brotli-related dynamic libraries MacOS #609

Closed seemanne closed 1 year ago

seemanne commented 2 years ago

The makefile currently terminates with error 2 when trying to compile USDX step by step following the instructions in the readme.

Actual behaviour

First the makefile runs through the creation of UltraStarDeluxe.app without issues. Then it gets to the point where the output ends with:

Using brew with libdir /usr/local/lib
Please report issues to the developer team, preferably mischi.
Have fun.

Creating the standalone Mac OS X application

here it starts throwing errors

error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: @loader_path/libbrotlicommon.1.dylib (No such file or directory)
error: /Library/Developer/CommandLineTools/usr/bin/otool-classic: can't open file: @loader_path/libbrotlicommon.1.dylib (No such file or directory)
work on ./game/ultrastardx
change the install name for /opt/homebrew/opt/sdl2/lib/libSDL2-2.0.0.dylib
change the install name for /opt/homebrew/opt/sdl2_image/lib/libSDL2_image-2.0.0.dylib
change the install name for /opt/X11/lib/libfreetype.6.dylib
change the install name for /opt/homebrew/opt/portaudio/lib/libportaudio.2.dylib
change the install name for /opt/homebrew/opt/ffmpeg@4/lib/libavcodec.58.dylib
change the install name for /opt/homebrew/opt/ffmpeg@4/lib/libavformat.58.dylib
change the install name for /opt/homebrew/opt/ffmpeg@4/lib/libavutil.56.dylib
change the install name for /opt/homebrew/opt/ffmpeg@4/lib/libswresample.3.dylib
change the install name for /opt/homebrew/opt/ffmpeg@4/lib/libswscale.5.dylib
change the install name for /opt/homebrew/opt/lua/lib/liblua.dylib
work on /opt/homebrew/opt/brotli/lib/libbrotlidec.1.dylib
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: UltraStarDeluxe.app/Contents/MacOS/libbrotlidec.1.dylib
change the install name for /opt/homebrew/opt/brotli/lib/libbrotlidec.1.dylib
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: UltraStarDeluxe.app/Contents/MacOS/libbrotlidec.1.dylib
change the install name for @loader_path/libbrotlicommon.1.dylib
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: UltraStarDeluxe.app/Contents/MacOS/libbrotlidec.1.dylib
work on /opt/homebrew/opt/brotli/lib/libbrotlienc.1.dylib
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: UltraStarDeluxe.app/Contents/MacOS/libbrotlienc.1.dylib
change the install name for /opt/homebrew/opt/brotli/lib/libbrotlienc.1.dylib
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: UltraStarDeluxe.app/Contents/MacOS/libbrotlienc.1.dylib
change the install name for @loader_path/libbrotlicommon.1.dylib
/Library/Developer/CommandLineTools/usr/bin/install_name_tool: warning: changes being made to the file will invalidate the code signature in: UltraStarDeluxe.app/Contents/MacOS/libbrotlienc.1.dylib
make[1]: *** No rule to make target `@loader_path/libbrotlicommon.1.dylib', needed by `UltraStarDeluxe.app/Contents/MacOS/libbrotlicommon.1.dylib'.  Stop.
make: *** [macosx-standalone-app] Error 2

Steps to reproduce

follow the compile tutorial in the readme

Details

Provide some additional information:

brotli is up-to-date I let homebrew reinstall it too

This seems to be related to https://github.com/google/brotli/issues/934 where they recommend using install_name_tool to fix it.

s09bQ5 commented 2 years ago

This issue came up in Gitter in November. @Lord-Kamina suggestes we try auriamg/macdylibbundler instead of our Makefile.osx-helper.