How to prevent dylib from linkage fixing


(Alex Bobrikovich) #1

Hi Homebrew Community

I have started developing own formula https://github.com/riboseinc/homebrew-metanorma/blob/add-dependencies/Formula/metanorma.rb and faced with [issue](https://travis-ci.com/riboseinc/homebrew-metanorma/builds/96398336):

Error: Failed changing dylib ID of /usr/local/Cellar/metanorma/1.1.0/libexec/lib/node_modules/puppeteer/.local-chromium/mac-609904/chrome-mac/Chromium.app/Contents/Versions/72.0.3617.0/Chromium Framework.framework/Versions/A/Libraries/libEGL.dylib
from @rpath/libEGL.dylib
to /usr/local/opt/metanorma/libexec/lib/node_modules/puppeteer/.local-chromium/mac-609904/chrome-mac/Chromium.app/Contents/Versions/72.0.3617.0/Chromium Framework.framework/Versions/A/Libraries/libEGL.dylib
Error: Failed to fix install linkage

Problem happens for Chromium.app which embedded in [puppeteer] (https://github.com/GoogleChrome/puppeteer) npm package.

I’m %99 sure that we should not try to fix linkage for those dylib which inside some .app

I have found logic which control this but looks like it will remote linkage fix at all https://github.com/Homebrew/brew/blob/master/Library/Homebrew/formula_installer.rb#L631

Questions:

  • Is there a way to prevent linkage fix for particular files?
  • Maybe make sense to skip linkage for dylib inside app bundle?

(Sean Molenaar) #2

App files should really be installed with casks instead of formula, there’s also no way to prevent this behavior as far as I know.


(Alex Bobrikovich) #3

Thanks for help, BTW I have found workaround already I just download Chromium.app on post_install step in this case it will not be fixed

But I will think about your suggestion because it more transparent