libmythtv-0.24-0 violates -fPIC policy

Bug #684941 reported by Jamie Strandboge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mythtv (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

Binary package hint: mythtv

In reviewing the mythtv binaries in the NEW queue, I came across these lintian errors:

$ lintian libmyth-0.24-0_0.24.0+fixes27305-0ubuntu1_i386.deb:
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmyth-0.24.so.0.24.0
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythavcodec.so.52.86.1
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythavcore.so.0.6.0
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythavdevice.so.52.2.1
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythavfilter.so.1.37.0
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythavformat.so.52.78.3
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythavutil.so.50.24.0
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythhdhomerun-0.24.so.0.24.0
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythlivemedia-0.24.so.0.24.0
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythpostproc.so.51.2.0
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythswscale.so.0.11.0
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythtv-0.24.so.0.24.0
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythui-0.24.so.0.24.0

This is in violation of section 10.2 of the Ubuntu Policy manual (http://people.canonical.com/~cjwatson/ubuntu-policy/policy.html/ch-files.html#s-libraries):
"If the package is _architecture: any_, then the shared library compilation and linking flags must have `-fPIC', or the package shall not build on some of the supported architectures. Any exception to this rule must be discussed on the mailing list <email address hidden>, and a rough consensus obtained. The reasons for not compiling with `-fPIC' flag must be recorded in the file `README.Debian', and care must be taken to either restrict the architecture or arrange for `-fPIC' to be used on architectures where it is required."

Changed in mythtv (Ubuntu):
importance: Undecided → High
importance: High → Critical
Revision history for this message
Mario Limonciello (superm1) wrote :

I've forced -fPIC on as much of the build as possible.

---------------------
>-fPIC support<
---------------------
The builds do have --enable-pic passed to them which should enable -fPIC where
applicable. There are certain portions of the ffmpeg code that intentionally
disable this functionality though. The same libraries in the 'ffmpeg'
package don't have -fPIC either.

These are all caused by inline assmebly referring to absolute memory on
x86/x86_64 that matches on MMX flags.
On other architectures this code will not be compiled.

libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythavcodec.so.52.86.1
 - mythtv/external/FFmpeg/libavcodec/x86/vp8dsp-init.c
 - ff_vp8dsp_init_x86

libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythpostproc.so.51.2.0
 - mythtv/external/libpostproc/postprocess.c
 - pp_get_mode_by_name_and_quality

libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythswscale.so.0.11.0
 - libswscale/utils.c
 - sws_rgb2rgb_init
 - sws_getCachedContext
 - sws_getDefaultFilter

Changed in mythtv (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mythtv - 2:0.24.0+fixes.20101207.d3d2640-0ubuntu1

---------------
mythtv (2:0.24.0+fixes.20101207.d3d2640-0ubuntu1) natty; urgency=low

  [ Mario Limonciello ]
  * Modify the get-orig-source rule to use launchpadlib to try to fetch the file
    from the archive instead.
  * Stop on runlevels [016] rather than on the start of shutdown job. (LP: #542627)
  * Move packaging to git based commands.
  * If no themes are included, don't make bad theme stubs in debian/control.
  * Update control files.
  * Add an epoch because of the changing fixes->fixes and trunk->master to allow
    proper upgrades.
  * In ppa git checker helper, if no hash returned, don't error up.
  * If running on a master build, have the update-control-files rule recommends
    mythtv-dbg.
  * Update standards version.
  * Force pic support on as much of the build as possible. (LP: #684941)
  * Move mythweb's set -e into the script invokation to quiet lintian.
  * Add python dependency to mythtv-common.
  * Demote libmythtv-perl depends to recommends on mythtv-backend.
  * Don't run the permissions fix up on python files smaller than 1 block.
  * Fixup the extra docs cleanup for mythweb.
  * >>Upstream changes since last upload (11ee9c5):
  * [d3d2640] MythArchive: Update the script to look for the fonts in
    the new location.
  * [011ffd5] Fix file streaming to stay working past 4G
  * [ecbbcf8] Backport from master to fixes/0.24.
  * [fe9d48e] Move toLower to the correct location
  * [e4ea220] Add gitignores to fixes/0.24 too
  * [dc4868a] Tweak PWD in the Makefile to be more specific

  [ Thomas Mashos ]
  * Make mythplugins replace mythmovies
  * Make mythplugins replace mythmovies in debian/control.in
 -- Mario Limonciello <email address hidden> Tue, 07 Dec 2010 02:42:49 -0600

Changed in mythtv (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Thank you for addressing this and for your clear explanation and thorough analysis. Lintian now complains about only these:
$ lintian libmyth-0.24-0_0.24.0+fixes.20101207.d3d2640-0ubuntu1_i386.deb:
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythavcodec.so.52.86.1
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythpostproc.so.51.2.0
E: libmyth-0.24-0: shlib-with-non-pic-code usr/lib/libmythswscale.so.0.11.0

which you discussed above and reference in the README.Debian. I would encourage you in your next upload to also add the lintian override, but I will not block on this. Thanks for all your hard work!

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

$ q accept mythtv
Initialising connection to queue new
Running: "accept mythtv"
Accepting ubuntu/None (NEW) 2/67
---------------------------------------------------------------------------
Accepting mythtv, mythtv_0.24.0+fixes.20101207.d3d2640-0ubuntu1_amd64_translations.tar.gz
Accepting mythtv, mythtv_0.24.0+fixes.20101207.d3d2640-0ubuntu1_i386_translations.tar.gz
---------------------------------------------------------------------------

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.