0

I try to deploy a mac app using macdeployqt. It used to work like a charm but since I use homebrew to get my libs, the deploy doesn't works, throwing a lot (400+) of lines like that :

ERROR: "install_name_tool: can't open input file: Joker.app/Contents/Frameworks//libavformat.54.63.104.dylib for writing (Permission denied)
install_name_tool: can't lseek to offset: 0 in file: Joker.app/Contents/Frameworks//libavformat.54.63.104.dylib for writing (Bad file descriptor)

If I run ls -l on /usr/local/lib I've got this :

lrwxr-xr-x    1 thomas  admin     54  5 fév 12:40 libavformat.54.63.104.dylib -> ../Cellar/ffmpeg/1.2.4/lib/libavformat.54.63.104.dylib

And in /usr/local/Cellar/ffmpeg/1.2.4/lib :

-r--r--r--   1 thomas  admin  9787252  5 fév 12:40 libavcodec.54.92.100.dylib
lrwxr-xr-x   1 thomas  admin       26  5 fév 12:40 libavcodec.54.dylib -> libavcodec.54.92.100.dylib
-r--r--r--   1 thomas  admin  9949304  5 fév 12:40 libavcodec.a
lrwxr-xr-x   1 thomas  admin       26  5 fév 12:40 libavcodec.dylib -> libavcodec.54.92.100.dylib
-r--r--r--   1 thomas  admin    61120  5 fév 12:40 libavdevice.54.3.103.dylib
lrwxr-xr-x   1 thomas  admin       26  5 fév 12:40 libavdevice.54.dylib -> libavdevice.54.3.103.dylib
-r--r--r--   1 thomas  admin    25616  5 fév 12:40 libavdevice.a
lrwxr-xr-x   1 thomas  admin       26  5 fév 12:40 libavdevice.dylib -> libavdevice.54.3.103.dylib
-r--r--r--   1 thomas  admin   684428  5 fév 12:40 libavfilter.3.42.103.dylib
lrwxr-xr-x   1 thomas  admin       26  5 fév 12:40 libavfilter.3.dylib -> libavfilter.3.42.103.dylib
-r--r--r--   1 thomas  admin  1135720  5 fév 12:40 libavfilter.a
lrwxr-xr-x   1 thomas  admin       26  5 fév 12:40 libavfilter.dylib -> libavfilter.3.42.103.dylib
-r--r--r--   1 thomas  admin  1179128  5 fév 12:40 libavformat.54.63.104.dylib
lrwxr-xr-x   1 thomas  admin       27  5 fév 12:40 libavformat.54.dylib -> libavformat.54.63.104.dylib
-r--r--r--   1 thomas  admin  2098824  5 fév 12:40 libavformat.a
lrwxr-xr-x   1 thomas  admin       27  5 fév 12:40 libavformat.dylib -> libavformat.54.63.104.dylib
-r--r--r--   1 thomas  admin   151636  5 fév 12:40 libavresample.1.1.0.dylib
lrwxr-xr-x   1 thomas  admin       25  5 fév 12:40 libavresample.1.dylib -> libavresample.1.1.0.dylib
-r--r--r--   1 thomas  admin   171816  5 fév 12:40 libavresample.a
lrwxr-xr-x   1 thomas  admin       25  5 fév 12:40 libavresample.dylib -> libavresample.1.1.0.dylib
-r--r--r--   1 thomas  admin   189152  5 fév 12:40 libavutil.52.18.100.dylib
lrwxr-xr-x   1 thomas  admin       25  5 fév 12:40 libavutil.52.dylib -> libavutil.52.18.100.dylib
-r--r--r--   1 thomas  admin   242496  5 fév 12:40 libavutil.a
lrwxr-xr-x   1 thomas  admin       25  5 fév 12:40 libavutil.dylib -> libavutil.52.18.100.dylib
-r--r--r--   1 thomas  admin   149772  5 fév 12:40 libpostproc.52.2.100.dylib
lrwxr-xr-x   1 thomas  admin       26  5 fév 12:40 libpostproc.52.dylib -> libpostproc.52.2.100.dylib
-r--r--r--   1 thomas  admin   118880  5 fév 12:40 libpostproc.a
lrwxr-xr-x   1 thomas  admin       26  5 fév 12:40 libpostproc.dylib -> libpostproc.52.2.100.dylib
-r--r--r--   1 thomas  admin   122164  5 fév 12:40 libswresample.0.17.102.dylib
lrwxr-xr-x   1 thomas  admin       28  5 fév 12:40 libswresample.0.dylib -> libswresample.0.17.102.dylib
-r--r--r--   1 thomas  admin   123944  5 fév 12:40 libswresample.a
lrwxr-xr-x   1 thomas  admin       28  5 fév 12:40 libswresample.dylib -> libswresample.0.17.102.dylib
-r--r--r--   1 thomas  admin   347800  5 fév 12:40 libswscale.2.2.100.dylib
lrwxr-xr-x   1 thomas  admin       24  5 fév 12:40 libswscale.2.dylib -> libswscale.2.2.100.dylib
-r--r--r--   1 thomas  admin   425640  5 fév 12:40 libswscale.a
lrwxr-xr-x   1 thomas  admin       24  5 fév 12:40 libswscale.dylib -> libswscale.2.2.100.dylib
drwxr-xr-x  11 thomas  admin      374  5 fév 12:40 pkgconfig

So the issue seems to be about permissions, but override Brew permissions seems to be a bad practice. Is there another way to do it ?

demonplus
  • 5,613
  • 12
  • 49
  • 68
Thomas Ayoub
  • 29,063
  • 15
  • 95
  • 142
  • Why just to not run macdeployqt with sudo? It will be very strange if it will change any permissions outside your target bundle. – Max Go Feb 05 '14 at 16:36
  • @N1ghtLight : Because I use macdeployqt as a postbuild step and sudo will not work – Thomas Ayoub Feb 05 '14 at 16:38
  • How exactly you use it as "postbuild step"? – Max Go Feb 05 '14 at 16:42
  • @N1ghtLight I forget to mention that I use it with Qt, where you can add post build steps – Thomas Ayoub Feb 05 '14 at 16:52
  • Joker.app is your app just being deployed? Then macdeployqt should fix the permissions for the dylib copies. I'd consider it a macdeployqt bug if it doesn't. (Although I would have expected that at least the owner has write permission) – Frank Osterfeld Feb 05 '14 at 22:49
  • @FrankOsterfeld yes, Joker.app is my app just being deployed. I rise an issue on [homebrew repo](https://github.com/Homebrew/homebrew) but I've been told that it was a `macdeployqt`issue. And as you said, block write access to the owner seems strange. Anyway, I changed the permissions on my files and now it works – Thomas Ayoub Feb 06 '14 at 08:53

0 Answers0