[MacPorts] #28052: py26-gst-python: 'python' plugin does not work because libpython2.6 cannot be found
#28052: py26-gst-python: 'python' plugin does not work because libpython2.6 cannot be found ---------------------------------+------------------------------------------ Reporter: lsinger@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: ---------------------------------+------------------------------------------ The plugin named "python", which is included in the gst-python package, needs to know where to find libpython2.x at run time. To reproduce, first nuke your plugin registry: {{{ #!sh $ rm -f ~/.gstreamer-0.10/registry.*.bin }}} Then, run {{{gst-inspect}}} on the "python" plugin as follows: {{{ #!sh $ GST_DEBUG=2 gst-inspect --gst-plugin- path=/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/gstreamer-0.10 python }}} You should get the following output (or something like it): {{{ 0:00:00.004724000 1735 0x606b00 WARN pyplugin gstpythonplugin.c:373:plugin_init: Couldn't g_module_open libpython. Reason: dlopen(/usr/lib/libpython2.6.dylib, 10): image not found 0:00:00.004784000 1735 0x606b00 WARN GST_PLUGIN_LOADING gstplugin.c:558:gst_plugin_register_func: plugin "/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/gstreamer-0.10/libgstpython.so" failed to initialise 0:00:00.005348000 1735 0x606b00 WARN pyplugin gstpythonplugin.c:373:plugin_init: Couldn't g_module_open libpython. Reason: dlopen(/usr/lib/libpython2.6.dylib, 10): image not found 0:00:00.005366000 1735 0x606b00 WARN GST_PLUGIN_LOADING gstplugin.c:558:gst_plugin_register_func: plugin "/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/gstreamer-0.10/libgstpython.so" failed to initialise No such element or plugin 'python' }}} Now, apply the attached patch, then update {{{py26-gst-python}}}: {{{ #!sh $ sudo port upgrade py26-gst-python }}} Then nuke your plugin registry again: {{{ #!sh $ rm -f ~/.gstreamer-0.10/registry.*.bin }}} and run {{{gst-inspect}}} again: {{{ #!sh $ GST_DEBUG=2 gst-inspect --gst-plugin- path=/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/gstreamer-0.10 python }}} You should now get the following output, indicating that the "python" plugin was found and was loaded successfully: {{{ Plugin Details: Name: python Description: loader for plugins written in python Filename: /opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/gstreamer-0.10/libgstpython.so Version: 0.10.20 License: LGPL Source module: gst-python Binary package: GStreamer Python Bindings Origin URL: http://gstreamer.freedesktop.org 0 features: }}} If you have any Python element classes installed, then they will be listed under 'features'. Similar patches could be applied to the ports {{{py25-gst-python}}} and {{{py27-gst-python}}}. -- Ticket URL: <https://trac.macports.org/ticket/28052> MacPorts <http://www.macports.org/> Ports system for Mac OS
#28052: py26-gst-python: 'python' plugin does not work because libpython2.6 cannot be found ---------------------------------+------------------------------------------ Reporter: lsinger@… | Owner: rmstonecipher@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: py26-gst-python ---------------------------------+------------------------------------------ Changes (by jmr@…): * owner: macports-tickets@… => rmstonecipher@… * port: => py26-gst-python Comment: Please remember to fill in the Port field and cc the maintainer. -- Ticket URL: <https://trac.macports.org/ticket/28052#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#28052: py26-gst-python: 'python' plugin does not work because libpython2.6 cannot be found ---------------------------------+------------------------------------------ Reporter: lsinger@… | Owner: rmstonecipher@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: py26-gst-python ---------------------------------+------------------------------------------ Comment(by lsinger@…): I've added attachments for py25-gst-python, py26-gst-python, and py27-gst- python. I updated these patches against the recent version increment. -- Ticket URL: <https://trac.macports.org/ticket/28052#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#28052: py26-gst-python: 'python' plugin does not work because libpython2.6 cannot be found ---------------------------------+------------------------------------------ Reporter: lsinger@… | Owner: rmstonecipher@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: py26-gst-python ---------------------------------+------------------------------------------ Comment(by rmstonecipher@…): Leo,[[br]] While I have confirmed that your method changes something, I'm a little concerned about ~/.gstreamer-0.10/.[[br]] I am not comfortable with the idea of having port remove a file in a user's home directory so that gstreamer can recreate that file.[[br]] Also, my results were not the same as yours:[[br]] {{{ euclid:~ ryan$ rm .gstreamer-0.10/registry.* euclid:~ ryan$ gst-inspect --gst-plugin- path=/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/gstreamer-0.10 python (gst-plugin-scanner:76458): GStreamer-WARNING **: Failed to load plugin '/opt/local/lib/gstreamer-0.10/libgstcog.so': dlopen(/opt/local/lib/gstreamer-0.10/libgstcog.so, 2): Library not loaded: /opt/local/lib/libpng12.0.dylib Referenced from: /opt/local/lib/gstreamer-0.10/libgstcog.so Reason: image not found (gst-plugin-scanner:76458): GStreamer-WARNING **: Failed to load plugin '/opt/local/lib/gstreamer-0.10/libgstopengl.so': dlopen(/opt/local/lib/gstreamer-0.10/libgstopengl.so, 2): Library not loaded: /opt/local/lib/libpng12.0.dylib Referenced from: /opt/local/lib/gstreamer-0.10/libgstopengl.so Reason: image not found No such element or plugin 'python' }}} It looks like the above warnings are caused by shortcomings of files installed by gst-plugins-bad and gst-plugins-gl and would appreciate it if you would confirm that suspicion.[[br]] I should be able to commit your revisions this evening.[[br]][[br]] Cheers,[[br]] Ryan Stonecipher -- Ticket URL: <https://trac.macports.org/ticket/28052#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#28052: py26-gst-python: 'python' plugin does not work because libpython2.6 cannot be found ---------------------------------+------------------------------------------ Reporter: lsinger@… | Owner: rmstonecipher@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: py26-gst-python ---------------------------------+------------------------------------------ Comment(by lsinger@…): Replying to [comment:3 rmstonecipher@…]:
While I have confirmed that your method changes something, I'm a little concerned about ~/.gstreamer-0.10/.[[br]] I am not comfortable with the idea of having port remove a file in a user's home directory so that gstreamer can recreate that file.[[br]]
But port doesn't delete the registry. I just added the instruction to delete it so that gst-inspect would be forced to attempt to load all plugins. If the plugin scanner fails to load a particular plugin, it will 'blacklist' it by making a note in the registry not to try to load it. If you had previously run gst-inspect and it had not been able to load the plugin 'python', then you would see just the error message {{{ No such element or plugin 'python' }}} Whereas if you start without a plugin registry then you should get this more informative version: {{{ 0:00:00.004724000 1735 0x606b00 WARN pyplugin gstpythonplugin.c:373:plugin_init: Couldn't g_module_open libpython. Reason: dlopen(/usr/lib/libpython2.6.dylib, 10): image not found 0:00:00.004784000 1735 0x606b00 WARN GST_PLUGIN_LOADING gstplugin.c:558:gst_plugin_register_func: plugin "/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/gstreamer-0.10/libgstpython.so" failed to initialise 0:00:00.005348000 1735 0x606b00 WARN pyplugin gstpythonplugin.c:373:plugin_init: Couldn't g_module_open libpython. Reason: dlopen(/usr/lib/libpython2.6.dylib, 10): image not found 0:00:00.005366000 1735 0x606b00 WARN GST_PLUGIN_LOADING gstplugin.c:558:gst_plugin_register_func: plugin "/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/gstreamer-0.10/libgstpython.so" failed to initialise No such element or plugin 'python' }}}
Also, my results were not the same as yours:[[br]] {{{ euclid:~ ryan$ rm .gstreamer-0.10/registry.* euclid:~ ryan$ gst-inspect --gst-plugin- path=/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/gstreamer-0.10 python
(gst-plugin-scanner:76458): GStreamer-WARNING **: Failed to load plugin '/opt/local/lib/gstreamer-0.10/libgstcog.so': dlopen(/opt/local/lib/gstreamer-0.10/libgstcog.so, 2): Library not loaded: /opt/local/lib/libpng12.0.dylib Referenced from: /opt/local/lib/gstreamer-0.10/libgstcog.so Reason: image not found
(gst-plugin-scanner:76458): GStreamer-WARNING **: Failed to load plugin '/opt/local/lib/gstreamer-0.10/libgstopengl.so': dlopen(/opt/local/lib/gstreamer-0.10/libgstopengl.so, 2): Library not loaded: /opt/local/lib/libpng12.0.dylib Referenced from: /opt/local/lib/gstreamer-0.10/libgstopengl.so Reason: image not found No such element or plugin 'python' }}} It looks like the above warnings are caused by shortcomings of files installed by gst-plugins-bad and gst-plugins-gl and would appreciate it if you would confirm that suspicion.[[br]]
Is this with or without the patch? The error messages about libgstcog and libgstopengl are not related to gst-python. They are error messages about different plugins. Both libgstcog and libgstopengl depend on libpng, which could not be found in /opt/local/lib. I've seen that sort of error message about libpng before. Which version of the libpng port do you have installed? Is it possible that you built gst-plugins-bad and gst-plugins-gl against libpng 1.2 and later upgraded libpng to 1.4? This was the case with me; the name of the library changed from libpng12 to libpng14. -- Ticket URL: <https://trac.macports.org/ticket/28052#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#28052: py26-gst-python: 'python' plugin does not work because libpython2.6 cannot be found ---------------------------------+------------------------------------------ Reporter: lsinger@… | Owner: rmstonecipher@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: | Port: py26-gst-python ---------------------------------+------------------------------------------ Comment(by lsinger@…): Just wanted to check on where this stands. I am working on a project that makes extensive use of Python plugins. I would like to be able to use the MacPorts distribution of GStreamer. Thanks! -- Ticket URL: <https://trac.macports.org/ticket/28052#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#28052: py26-gst-python: 'python' plugin does not work because libpython2.6 cannot be found ----------------------------------+----------------------------------------- Reporter: lsinger@… | Owner: rmstonecipher@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Resolution: fixed | Keywords: Port: py26-gst-python | ----------------------------------+----------------------------------------- Changes (by rmstonecipher@…): * status: new => closed * resolution: => fixed Comment: Leo,[[br]] I committed your proposed changes in r76086.[[br]][[br]] Cheers,[[br]] Ryan Stonecipher[[br]][[br]] P.S. I used subversion's "changelist" command to commit revisions to these three python ports without committing other changes within my python directory.[[br]] Thanks for giving me a reason to learn that command.[[br]] -- Ticket URL: <https://trac.macports.org/ticket/28052#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts