> On Jun 8, 2020, at 3:03 AM, Pascal <p....@orange.fr> wrote: > >> >> Le 7 juin 2020 à 19:39, Pascal <p....@orange.fr> a écrit : >> >> Hello, >> >> I've used gtk-mac-bundler to create my app, but I've some issues with >> referenced dylib. >> >> GTK libs are referenced with absolute path: >> <prefix>/lib/libgtk-3.0.dylib >> These are changed by gtk-mac-bundler into: >> @executable_path/../Resources/lib/libgtk-3.0.dylib >> >> I've got some messages as: >> Cannot find a matching prefix for libxmlada_schema.dylib >> These libs are outside <prefix>/lib so I changed them to absolute path. >> >> However, I have other libs built in <prefix>/lib that are referenced with >> relative path, for instance: >> @rpath/libadalang.dylib >> These are not changed by gtk-mac-bundler so I've added rpath >> "@executable_path/../Resources/lib" and I've deleted all rpath with >> <prefix>/lib in executable and all libs. >> I've checked with otool that the only remaining rpath is >> "@executable_path/../Resources/lib". >> >> But when executing the app I've messages for instance: >> objc[45002]: Class GdkQuartzView is implemented in both >> /opt/gps-build/osx_bundle/_build/Applications/gnatstudio.app/Contents/Resources/lib/libgdk-3.0.dylib >> (0x113f0a960) and /opt/xnadalib-2020/lib/libgdk-3.0.dylib (0x11ed97960). >> One of the two will be used. Which one is undefined. >> >> I do not understand where there are these references to <prefix>/lib >> (/opt/xnadalib-2020/lib in my case). >> Any idea is welcome. > > I've gone further, the references of <prefix>/lib are coming from *.so in > lib/Python2.7. > I had just put in my bungle file: > <data> > ${prefix}/lib/python2.7 > </data> > > So I changed for: > <binary> > ${prefix}/lib/python2.7/lib-dynload/*.so > </binary> > <binary> > ${prefix}/lib/python2.7/site-packages/*.so > </binary> > <binary> > ${prefix}/lib/python2.7/site-packages/gi/*.so > </binary> > <binary> > ${prefix}/lib/python2.7/site-packages/cairo/*.so > </binary> > > Side question, I've manually copied the *.py files to prevent to overwrite > the modified *.so files, is there a way to do it safely in the bundle file? > > Then I've a issue with gi: > Traceback (most recent call last): > File "<string>", line 1, in <module> > File > "/opt/gps-build/osx_bundle/_build/Applications/gnatstudio.app/Contents/Resources/lib/python2.7/site-packages/gi/__init__.py", > line 129, in require_version > raise ValueError('Namespace %s not available' % namespace) > ValueError: Namespace Gtk not available > > What could be missing in the bundle file?
The typelibs? I don't understand what you mean about manually copying the python files to prevent overwriting the loadable modules. How would that happen? You might look at https://github.com/gramps-project/gramps/blob/maintenance/gramps51/mac/gramps.bundle to see how I bundle Gramps. Regards, John Ralls _______________________________________________ gtk-osx-users-list mailing list gtk-osx-users-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-osx-users-list