unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* missing input and more
@ 2015-02-05  7:05 sleep_walker
  2015-02-05  9:48 ` 宋文武
  2015-02-05 10:30 ` Andreas Enge
  0 siblings, 2 replies; 8+ messages in thread
From: sleep_walker @ 2015-02-05  7:05 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 956 bytes --]

Hi Guix,

during my packaging attempts of connman (which looks good so far) I
found that gnutls is missing "install-time" dependency - zlib.

1] ldd shows run-time dependency:
$ ldd /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/libgnutls.so | grep libz
        libz.so.1 => /gnu/store/x8cg3irwf8y2mkr88bqmsqhadi71xf6s-zlib-1.2.7/lib/libz.so.1 (0x00007fe4fac90000)

2] pkg-config rants about not filled dependencies when building against gnutls

In /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/pkgconfig/gnutls.pc you can see

Libs.private: -lz        -lgmp
Requires.private: nettle, hogweed, libtasn1, zlib


That is something which should be solved by "propagate-input"?

Both dependency requirements types are quite easy to detect. I'm not
sure if they shouldn't be done in package build
(maintaining mapping for pkg-config *.pc --> package)

or we should just invest time into package validation afterwards.

WDYT?

S_W

[-- Attachment #2: Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: missing input and more
  2015-02-05  7:05 missing input and more sleep_walker
@ 2015-02-05  9:48 ` 宋文武
  2015-02-05 10:30 ` Andreas Enge
  1 sibling, 0 replies; 8+ messages in thread
From: 宋文武 @ 2015-02-05  9:48 UTC (permalink / raw)
  To: sleep_walker; +Cc: Guix-devel

2015-02-05 15:05 GMT+08:00  <sleep_walker@suse.cz>:
> Hi Guix,
>
> during my packaging attempts of connman (which looks good so far) I
> found that gnutls is missing "install-time" dependency - zlib.
>
> 1] ldd shows run-time dependency:
> $ ldd
> /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/libgnutls.so |
> grep libz
>        libz.so.1 =>
> /gnu/store/x8cg3irwf8y2mkr88bqmsqhadi71xf6s-zlib-1.2.7/lib/libz.so.1
> (0x00007fe4fac90000)
>
> 2] pkg-config rants about not filled dependencies when building against
> gnutls
>
> In
> /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/pkgconfig/gnutls.pc
> you can see
>
> Libs.private: -lz        -lgmp
> Requires.private: nettle, hogweed, libtasn1, zlib
>
>
> That is something which should be solved by "propagate-input"?
Yes, zlib should be a propagate-input of gnutls.
>
> Both dependency requirements types are quite easy to detect. I'm not
> sure if they shouldn't be done in package build
> (maintaining mapping for pkg-config *.pc --> package)
>
> or we should just invest time into package validation afterwards.
>
> WDYT?
>
> S_W

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: missing input and more
  2015-02-05  7:05 missing input and more sleep_walker
  2015-02-05  9:48 ` 宋文武
@ 2015-02-05 10:30 ` Andreas Enge
  2015-02-05 11:01   ` 宋文武
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Enge @ 2015-02-05 10:30 UTC (permalink / raw)
  To: sleep_walker; +Cc: guix-devel

On Thu, Feb 05, 2015 at 08:05:03AM +0100, sleep_walker@suse.cz wrote:
> 1] ldd shows run-time dependency:
> $ ldd /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/libgnutls.so | grep libz
>        libz.so.1 => /gnu/store/x8cg3irwf8y2mkr88bqmsqhadi71xf6s-zlib-1.2.7/lib/libz.so.1 (0x00007fe4fac90000)

That is fine - so there is a dependency, but our rpath recoding handles it.
So far, there is no need for zlib as a propagated input - we do not need to
install it into the user profile when installing gnutls.

> Libs.private: -lz        -lgmp
> Requires.private: nettle, hogweed, libtasn1, zlib

Reading up the documentation of pkg-config:
"Requires and Requires.private define other modules needed by the library.
It is usually preferred to use the private variant of Requires to avoid
exposing unnecessary libraries to the program that is linking with your
library. If the program will not be using the symbols of the required library,
it should not be linking directly to that library."

So as I understand this, there is no need to propagate the zlib input.

Or am I getting it wrong?

Andreas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: missing input and more
  2015-02-05 10:30 ` Andreas Enge
@ 2015-02-05 11:01   ` 宋文武
  2015-02-05 11:57     ` Tomas Cech
  2015-02-05 15:59     ` Andreas Enge
  0 siblings, 2 replies; 8+ messages in thread
From: 宋文武 @ 2015-02-05 11:01 UTC (permalink / raw)
  To: Andreas Enge, sleep_walker; +Cc: guix-devel

Andreas Enge <andreas@enge.fr> writes:

> On Thu, Feb 05, 2015 at 08:05:03AM +0100, sleep_walker@suse.cz wrote:
>> 1] ldd shows run-time dependency:
>> $ ldd /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/libgnutls.so | grep libz
>>        libz.so.1 => /gnu/store/x8cg3irwf8y2mkr88bqmsqhadi71xf6s-zlib-1.2.7/lib/libz.so.1 (0x00007fe4fac90000)
>
> That is fine - so there is a dependency, but our rpath recoding handles it.
> So far, there is no need for zlib as a propagated input - we do not need to
> install it into the user profile when installing gnutls.
>
>> Libs.private: -lz        -lgmp
>> Requires.private: nettle, hogweed, libtasn1, zlib
>
> Reading up the documentation of pkg-config:
> "Requires and Requires.private define other modules needed by the library.
> It is usually preferred to use the private variant of Requires to avoid
> exposing unnecessary libraries to the program that is linking with your
> library. If the program will not be using the symbols of the required library,
> it should not be linking directly to that library."
Ah, I think libraries in 'Requires.private' should also be propagated,
otherwise, we got:
  $ pkg-config --cflags gnutls
  = Package 'zlib', required by 'GnuTLS', not found
If not propagated, other packages use gnutls have to add zlib to inputs,
even they never use it.

I just pushed a commit to propagate zlib for gnutls,
hope I'm not wrong ;-)
>
> So as I understand this, there is no need to propagate the zlib input.
>
> Or am I getting it wrong?
>
> Andreas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: missing input and more
  2015-02-05 11:01   ` 宋文武
@ 2015-02-05 11:57     ` Tomas Cech
  2015-02-05 16:01       ` Andreas Enge
  2015-02-05 15:59     ` Andreas Enge
  1 sibling, 1 reply; 8+ messages in thread
From: Tomas Cech @ 2015-02-05 11:57 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

At Thu, 05 Feb 2015 19:01:18 +0800,
宋文武 wrote:
> 
> Andreas Enge <andreas@enge.fr> writes:
> 
> > On Thu, Feb 05, 2015 at 08:05:03AM +0100, sleep_walker@suse.cz wrote:
> >> 1] ldd shows run-time dependency:
> >> $ ldd /gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/lib/libgnutls.so | grep libz
> >>        libz.so.1 => /gnu/store/x8cg3irwf8y2mkr88bqmsqhadi71xf6s-zlib-1.2.7/lib/libz.so.1 (0x00007fe4fac90000)
> >
> > That is fine - so there is a dependency, but our rpath recoding handles it.
> > So far, there is no need for zlib as a propagated input - we do not need to
> > install it into the user profile when installing gnutls.
> >
> >> Libs.private: -lz        -lgmp
> >> Requires.private: nettle, hogweed, libtasn1, zlib
> >
> > Reading up the documentation of pkg-config:
> > "Requires and Requires.private define other modules needed by the library.
> > It is usually preferred to use the private variant of Requires to avoid
> > exposing unnecessary libraries to the program that is linking with your
> > library. If the program will not be using the symbols of the required library,
> > it should not be linking directly to that library."
> Ah, I think libraries in 'Requires.private' should also be propagated,
> otherwise, we got:
>   $ pkg-config --cflags gnutls
>   = Package 'zlib', required by 'GnuTLS', not found
> If not propagated, other packages use gnutls have to add zlib to inputs,
> even they never use it.

That is exactly my case I found and have to add workaround for that.
 
> I just pushed a commit to propagate zlib for gnutls,
> hope I'm not wrong ;-)

Perfect, thanks!


But that fixed only one problem while we should do something dependencies in
general.

Imagine I have not came with this bug and some other people would just added
zlib to the inputs. We could have it wrong on multiple places and when we
would replace gnutls with something else in future, it would stay there
unnoticed.

I can hack some script to do the checks but I believe that everyone would
appreciate clean solution which would check dependencies after build as a part
of build process...

S_W

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: missing input and more
  2015-02-05 11:01   ` 宋文武
  2015-02-05 11:57     ` Tomas Cech
@ 2015-02-05 15:59     ` Andreas Enge
  1 sibling, 0 replies; 8+ messages in thread
From: Andreas Enge @ 2015-02-05 15:59 UTC (permalink / raw)
  To: 宋文武; +Cc: guix-devel

On Thu, Feb 05, 2015 at 07:01:18PM +0800, 宋文武 wrote:
> Ah, I think libraries in 'Requires.private' should also be propagated,
> otherwise, we got:
>   $ pkg-config --cflags gnutls
>   = Package 'zlib', required by 'GnuTLS', not found
> If not propagated, other packages use gnutls have to add zlib to inputs,
> even they never use it.

For whatever reason, this command works for me:
$ pkg-config --cflags gnutls
-I/gnu/store/0mfgwxgqyhlvi5xyi1j2lbr3ygczsdyp-gnutls-3.2.21/include -I/gnu/store/gayyfjxgsbpym1dcnd3b9mzwj2fz3jvj-nettle-2.7.1/include -I/gnu/store/dm9cnj2ng8a58l88j4bs9zjf78ysjprv-libtasn1-4.2/include

with the one that was currently in my profile, and
$ pkg-config --cflags gnutls
-I/gnu/store/msknn44rcfwfall90lz1kcklsd34iy21-gnutls-3.3.12/include -I/gnu/store/gayyfjxgsbpym1dcnd3b9mzwj2fz3jvj-nettle-2.7.1/include -I/gnu/store/dm9cnj2ng8a58l88j4bs9zjf78ysjprv-libtasn1-4.2/include

with the latest version.

Andreas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: missing input and more
  2015-02-05 11:57     ` Tomas Cech
@ 2015-02-05 16:01       ` Andreas Enge
  2015-02-05 20:54         ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Enge @ 2015-02-05 16:01 UTC (permalink / raw)
  To: Tomas Cech; +Cc: guix-devel

On Thu, Feb 05, 2015 at 12:57:27PM +0100, Tomas Cech wrote:
> But that fixed only one problem while we should do something dependencies in
> general.
> 
> Imagine I have not came with this bug and some other people would just added
> zlib to the inputs. We could have it wrong on multiple places and when we
> would replace gnutls with something else in future, it would stay there
> unnoticed.
> 
> I can hack some script to do the checks but I believe that everyone would
> appreciate clean solution which would check dependencies after build as a part
> of build process...

Maybe we could extend "guix lint" so that it compiles the package and performs
checks on the output (for instance, looking for .pc files and checking
whether libraries are correctly propagated)?

Andreas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: missing input and more
  2015-02-05 16:01       ` Andreas Enge
@ 2015-02-05 20:54         ` Ludovic Courtès
  0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2015-02-05 20:54 UTC (permalink / raw)
  To: Andreas Enge; +Cc: guix-devel, Tomas Cech

Andreas Enge <andreas@enge.fr> skribis:

> Maybe we could extend "guix lint" so that it compiles the package and performs
> checks on the output (for instance, looking for .pc files and checking
> whether libraries are correctly propagated)?

That would be costly and probably difficult to automate: it’s almost
doable for .pc files, but hardly so for .h files.

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-02-05 20:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-05  7:05 missing input and more sleep_walker
2015-02-05  9:48 ` 宋文武
2015-02-05 10:30 ` Andreas Enge
2015-02-05 11:01   ` 宋文武
2015-02-05 11:57     ` Tomas Cech
2015-02-05 16:01       ` Andreas Enge
2015-02-05 20:54         ` Ludovic Courtès
2015-02-05 15:59     ` Andreas Enge

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).