Bug 193433 - x11-toolkits/gtk20: Makefile uses Python 2.7_2,2, causes openshot to fail with erroneous missing libmp3lame claim
Summary: x11-toolkits/gtk20: Makefile uses Python 2.7_2,2, causes openshot to fail wit...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Many People
Assignee: freebsd-gnome (Nobody)
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2014-09-07 17:02 UTC by freebsd
Modified: 2018-02-03 01:21 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback? (gnome)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description freebsd 2014-09-07 17:02:39 UTC
$ uname -a
FreeBSD breakaway.dreamchaser.org 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013     root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

The Makefile for gtk20 specifies 
  python:${PORTSDIR}/lang/python
as a run dependency (RUN_DEPENDS).
This causes python python-2.7_2,2 to be built and used
  $pkg info -r python-2.7_2,2
  python-2.7_2,2:
        gtk2-2.24.22_4
All other ports I have built reference a more up-to-date python port,
  python27-2.7.8_4

When openshot is built, it gets built with various python things plus gtk:
$ pkg info -d openshot-1.4.3
openshot-1.4.3:
        py27-gtk2-2.24.0_3
        pango-1.34.1_7
        gtk2-2.24.22_4
        py27-httplib2-0.8_2
        rarian-0.8.1_1
        libxml2-2.9.1_1
        py27-mlt-0.9.0
        ffmpeg-2.2.4_4,1
        shared-mime-info-1.1_1
        python27-2.7.8_4
        python2-2_3
        py27-imaging-1.1.7_3
        py27-goocanvas-0.14.1_5
        frei0r-plugins-1.3
        py27-xdg-0.25
        py27-setuptools27-5.5.1
        py27-gobject-2.28.6_4
        pcre-8.35
        libglade2-2.6.4_7
        glib-2.36.3_3
        gettext-0.18.3.1_1
        desktop-file-utils-0.22_1
        sox-14.4.1_5
        atk-2.8.0
If you try to export a video file to the web (some other forms of export
seem to work, such as dvd), openshot complains 
  The following codec(s) are missing from your system: libmp3lame
although the proper libraries are installed:
-rw-r--r--  1 root  wheel  423218 May 19 00:35 libmp3lame.a
-rwxr-xr-x  1 root  wheel     939 May 19 00:35 libmp3lame.la
lrwxr-xr-x  1 root  wheel      19 May 19 00:35 libmp3lame.so -> libmp3lame.so.0.0.0
lrwxr-xr-x  1 root  wheel      19 May 19 00:35 libmp3lame.so.0 -> libmp3lame.so.0.0.0
-rwxr-xr-x  1 root  wheel  287312 May 19 00:35 libmp3lame.so.0.0.0

Removing the python dependency in the RUN_DEPENDS clause in the
Makefile for gtk20 fixes the problem.  However, that's not a proper fix,
but I don't know the right way to fix it, as I don't know if gtk20
has any particular constraints regarding python versions.  On my system,
things seem to be working ok so far...
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2014-09-08 01:55:18 UTC
lang/python just provides symlinks to relevant binaries depending on the what the default version of Python is for the system in question (DEFAULT_VERSIONS, PYTHON_DEFAULT_VERSION) 

RUN_DEPENDS= python:${PORTSDIR}/lang/python

is likely better converted to USES=python[:<version>]

The value of version of course should consider gtk20's Python version compatibility, and how the python interpreter is invoked via its scripts.

See PEP-394 for more information [1]

[1] http://legacy.python.org/dev/peps/pep-0394/
Comment 2 Marcus von Appen freebsd_committer freebsd_triage 2014-09-08 06:07:11 UTC
(In reply to Kubilay Kocak from comment #1)
> lang/python just provides symlinks to relevant binaries depending on the
> what the default version of Python is for the system in question
> (DEFAULT_VERSIONS, PYTHON_DEFAULT_VERSION) 
> 
> RUN_DEPENDS= python:${PORTSDIR}/lang/python
> 
> is likely better converted to USES=python[:<version>]

gtk20 has just a single script (gtk-builder-convert), which is compatible to both, Python 2.x and Python 3.x. This was the reason, why the python meta-port has been used as RUN_DEPENDS and not one of the specific python versions.

I am missing the root cause of the problem, though. It looks like something else breaks, if the python meta port is around. Can we get a more detailed description to recreate the problem?
Comment 3 freebsd 2014-09-08 15:07:19 UTC
The following sequence should cause the error:

start openshot (port multimedio/openshot)
File/Import Files (or hit the "+" button on the toolbar
  Click any file (image or video) to select it.
  Click "+" at bottom of dialog to add it and dismiss the dialog
Drag the added file down and drop it on one of the lower timelines (Track1 or Track2).
File/Export Video
  Under "Profile", select "Web"
    A message will appear saying libmp3lame is missing
Comment 4 Marcus von Appen freebsd_committer freebsd_triage 2014-09-08 17:47:06 UTC
I just tested it and can't recreate the behaviour. With your description, I selected Web.

Target was automatically set to Flickr-HD
Video Profile was set automatically to HD 720p 25fps
Quality was set automatically to med

Clicking "Export Video" does not raise any libmp3lame isse.

On Advanced, I checked the audio settings. Audio was set to "ac3".
I changed the audio settings to "Audio Codec: libmp3lame" and kept the rest as is: "Sample Rate: 44100", "# of Channels: 2", "Bit rate: 128 kb/s".
Still no error, the export works flawlessly.

If you run openshot from the console, what is printed on the console, when you try to export your image or video? What are your exact settings?
Comment 5 freebsd 2014-09-09 04:50:03 UTC
Ugh.  I was dead certain this was trivial to reproduce, as I did it consistently.  I can no longer reproduce it, and am not certain what's happened in between.  I've restored my gtk Makefile to its original and will try to reproduce.  The only things I've got in /usr/local/lib and /usr/local/bin built since the bug was filed is gtk2.0 stuff; that was to restore the original behavior.  I'll keep trying but probably best to shelve things until I can repeat it.
Comment 6 freebsd 2014-09-09 05:51:13 UTC
ok, I can now reproduce it:

start openshot
File/Import Files (or hit the "+" button on the toolbar)
  Choose a .png file and add it to the project
  Drag the added file onto track 2 at the beginning.
File/Export Video
  Under "Profile", select "Web"
  Change Target: to "YouTube-HD"
    A message will appear saying libmp3lame is missing

Nothing appears in the controlling xterm window between selecting "Web" and when the target is changed and the error message appears.  The last few lines are simply logging the type of project based on the changes being made:

...

state saved
on_tlbImportFiles_clicked called with self.GtkToolButton
project state modified
state saved
project state modified
state saved
on_mnuMakeMovie1_activate called with self.GtkImageMenuItem
on_tlbMakeMovie_clicked called with self.GtkImageMenuItem
on_cboExportType_changed
on_cboUploadServices_changed
on_cboProjectType_changed
on_cboExportTo_changed
on_cboProjectType_changed
Comment 7 Walter Schwarzenfeld freebsd_triage 2018-01-12 21:49:55 UTC
Is this still relevant?
Comment 8 freebsd 2018-02-03 01:20:34 UTC
I can't reproduce it anymore, so probably no longer relevant.