Bug#922402: lintian: False positive: pkg-config-references-unknown-shared-library

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#922402: lintian: False positive: pkg-config-references-unknown-shared-library

Herbert Fortes
Package: lintian
Version: 2.7.0
Severity: normal


I got these warnings:

W: libgphoto2-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/libgphoto2.pc -lm (line 14)
W: libgphoto2-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/libgphoto2_port.pc -lm (line 12)

'libm.so' is shipped in libc6-dev.

Thanks Andreas at debian-mentors.



Regards,
Herbert

Reply | Threaded
Open this post in threaded view
|

Bug#922402: Bug #922402 in lintian marked as pending

Roberto C. Sánchez-2
On Fri, Feb 15, 2019 at 09:46:52PM +0000, Chris Lamb wrote:

> Control: tag -1 pending
>
> Hello,
>
> Bug #922402 in lintian reported by you has been fixed in the
> Git repository and is awaiting an upload. You can see the commit
> message below and you can check the diff of the fix at:
>
> https://salsa.debian.org/lintian/lintian/commit/603d9f2c5f54af162dbbfccf370d1881bbc9430f
>
> ------------------------------------------------------------------------
> Prevent false positives in pkg-config-references-unknown-shared-library (eg. "-lm") by creating an exception list and populating with shared objects shipped by libc6-dev. (Closes: #922402)
> ------------------------------------------------------------------------
>
Hi Chris,

As I was working on packaging the new mongo-c-driver upstream, I
encountered the same problem, though with different libraries.

Here is the line from the pkg-config file:

Libs: -L${libdir} -lbson-static-1.0  -lpthread -lgcc -lgcc_s -lc -lgcc
-lgcc_s /usr/lib/x86_64-linux-gnu/librt.so
/usr/lib/x86_64-linux-gnu/libm.so

The complaints from lintian:

W: libbson-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/libbson-static-1.0.pc -lpthread (line 9)
W: libbson-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/libbson-static-1.0.pc -lgcc (line 9)
W: libbson-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/libbson-static-1.0.pc -lgcc_s (line 9)
W: libbson-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/libbson-static-1.0.pc -lc (line 9)
W: libbson-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/libbson-static-1.0.pc -lgcc (line 9)
W: libbson-dev: pkg-config-references-unknown-shared-library usr/lib/x86_64-linux-gnu/pkgconfig/libbson-static-1.0.pc -lgcc_s (line 9)

It looks like perhaps libraries files shipped in libgcc1 also need to be
added to the whitelist.

Regards,

-Roberto

--
Roberto C. Sánchez

Reply | Threaded
Open this post in threaded view
|

Bug#922402: Bug #922402 in lintian marked as pending

Russ Allbery-2
Roberto C. Sánchez <[hidden email]> writes:

> Here is the line from the pkg-config file:

> Libs: -L${libdir} -lbson-static-1.0  -lpthread -lgcc -lgcc_s -lc -lgcc
> -lgcc_s /usr/lib/x86_64-linux-gnu/librt.so
> /usr/lib/x86_64-linux-gnu/libm.so

For whatever it's worth, I personally would consider editing all of that
out in the Debian packaging unless you're explicitly trying to support
-nostdlib builds with that library.  The linker will add the correct
version of that rune automatically by default, and providing it via
pkg-config can sometimes cause issues if the handling of those libraries
changes in the future.

--
Russ Allbery ([hidden email])               <http://www.eyrie.org/~eagle/>

Reply | Threaded
Open this post in threaded view
|

Bug#922402: Bug #922402 in lintian marked as pending

Roberto C. Sánchez-2
On Sat, Feb 23, 2019 at 12:59:17PM -0800, Russ Allbery wrote:

> Roberto C. Sánchez <[hidden email]> writes:
>
> > Here is the line from the pkg-config file:
>
> > Libs: -L${libdir} -lbson-static-1.0  -lpthread -lgcc -lgcc_s -lc -lgcc
> > -lgcc_s /usr/lib/x86_64-linux-gnu/librt.so
> > /usr/lib/x86_64-linux-gnu/libm.so
>
> For whatever it's worth, I personally would consider editing all of that
> out in the Debian packaging unless you're explicitly trying to support
> -nostdlib builds with that library.  The linker will add the correct
> version of that rune automatically by default, and providing it via
> pkg-config can sometimes cause issues if the handling of those libraries
> changes in the future.
>
Russ,

That is very helpful indeed.  I will check with upstream to see if
-nostdlib support is the intent and will adjust the pkg-config script
accordingly.

Regards,

-Roberto
--
Roberto C. Sánchez

Reply | Threaded
Open this post in threaded view
|

Bug#922402: Bug #922402 in lintian marked as pending

Chris Lamb -2
In reply to this post by Roberto C. Sánchez-2
Hi Roberto,

> It looks like perhaps libraries files shipped in libgcc1 also need to be
> added to the whitelist.

Thanks. Added in:

  https://salsa.debian.org/lintian/lintian/commit/f9c245df6d9285a6c220cf87c6e76437f7089e33

I needed to add "gcc" manually in:


 
>
> Regards,
>
> -Roberto
>
> --
> Roberto C. Sánchez


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [hidden email] 🍥 chris-lamb.co.uk
       `-

Reply | Threaded
Open this post in threaded view
|

Bug#922402: Bug #922402 in lintian marked as pending

Chris Lamb -2
In reply to this post by Herbert Fortes
Hi Roberto,

> It looks like perhaps libraries files shipped in libgcc1 also need to be
> added to the whitelist.

Thanks. Added in:

  https://salsa.debian.org/lintian/lintian/commit/f9c245df6d9285a6c220cf87c6e76437f7089e33

I needed to add "gcc" manually in:

  https://salsa.debian.org/lintian/lintian/commit/544e738ebcd12dc12dfdd3832c40acdf6050e451

:)


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [hidden email] 🍥 chris-lamb.co.uk
       `-