Bug#528080: ffmpeg-debian: ffmpeg still has shlib-with-non-pic-code lintian errors

Reinhard Tartler siretart at tauware.de
Mon May 11 07:20:43 UTC 2009


Andres Mejia <mcitadel at gmail.com> writes:

> On Monday 11 May 2009 01:17:30 Reinhard Tartler wrote:
>> Andres Mejia <mcitadel at gmail.com> writes:
>> > On Sunday 10 May 2009 16:15:48 Reinhard Tartler wrote:
>> >> Andres Mejia <mcitadel at gmail.com> writes:
>> >> > ffmpeg still gets these 'shlib-with-non-pic-code' lintian errors,
>> >> > although the package is build with '-fPIC -DPIC' as required by
>> >> > policy.
>> >>
>> >> policy does not require it, but rather strongly recommends it. In ffmpeg
>> >> there is a good argument for *not* following that suggestion.
>> >
>> > Well policy has a must directive for shared libraries. It says "must have
>> > - fPIC". From what I understood, it was for static libraries
>>
>> Please reference the policy section. I fail to locate the paragraph in
>> section 8.
>
> It's in section 10.2.

Ah, right, you mean this:

,----
| 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[61]. Any exception to
| this rule must be discussed on the mailing list
| debian-devel at lists.debian.org, 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.[62]
`----

the ffmpeg case is special: The exact usage on -fPIC/-DPIC depends on
the architecture, and upstream does has portability in mind. There is a
very active porter community there that are doing a *much* better job of
porting ffmpeg than we could ever do.

Okay, we should probably document that in README.Debian, as this is
required per policy 10.2.


>> >> > The patch I've committed to git reduced the amount of these errors
>> >> > from 14 to 6. More work needs to be done to find the remaining places
>> >> > which causes these TEXTRELs to appear in the resulting binaries. Any
>> >> > help is welcome.
>> >>
>> >> What problem are you trying to fix? Please revert that change, we need
>> >> further discussion on that.
>> >
>> > I was first fixing the issue that ffmpeg wouldn't build without -fPIC
>> > enabled.
>>
>> the build logs on buildd.debian org don't indicate any build failiure.
>> What failiure are you experiencing? Please attach the buildlog.
>
> It happens when you enable "--extra-cflags="-fPIC -DPIC" on i386. I
> think other architectures are ok.

Then just don't do that. As indicated above, upstream really knows
better here.

>> > I've since fixed that and now I'm just trying to fix all issues with
>> > non-PIC code remaining in the shared libraries. Using scanelf from
>> > pax-utils, I've found that all the TEXTREL issues that appear are from
>> > absolute memory references, and they all come from the inline assembly
>> > found in the source of various files. I'm currently trying to resolve
>> > what I can.
>> >
>> > I've succeeded in resolving all issues found with libpostproc. All of
>> > them were from the use of MANGLE. I'll push this change.
>>
>> Has this been discussed and reviewed by upstream? I follow the upstream
>> development list rather closesly but don't remember having these patches
>> discussed. If I missed them, please add pointer to the threads that
>> discuss them. If you intend to do so, please revert these commits post
>> them for review and let's recommit the cleaned up and reviewed  versions
>> of the patches.
>>
>> > I'll later push a change to not enable -fPIC, so we may discuss this
>> > further.
>>
>> Please just revert them for now. No need to fiddle out these micro
>> changes.
>
> Alright, done.

thanks.

-- 
Gruesse/greetings,
Reinhard Tartler, KeyID 945348A4



More information about the pkg-multimedia-maintainers mailing list