Re: [Powertop] [PATCH] use pkg-config to find ncurses
Wout Mertens <wout.mertens at gmail.com>
| Newsgroups | dev.linux.lists.powertop |
|---|---|
| Message-ID | <CAO3V83JaYKrJPYT1Zd07dn64voGFdwkRBX+k=nWs18KD7cNNaw@mail.gmail.com> |
I'm confused, how does requiring a pkgconfig file break the tool? If a user somehow finds them in a situation where they need to build a recent powertop but can't build a recent ncurses, they can manually add the file... Or use an older version of powertop... On May 6, 2014 1:20 AM, "Alexandra Yates" <alexandra.yates(a)linux.intel.com> wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > Hash: SHA1 > > > > On 04/25/2014 07:58 PM, Alexandra Yates wrote: > >> Hi Zero, > >> > >> Based on Sergey's feedback can you send a revision for your patches? > >> > >> thank you, > >> Alex > >> On 04/16/2014 03:54 PM, Sergey Senozhatsky wrote: > >>>>> On (04/16/14 12:41), Kok, Auke-jan H wrote: > >>>>>> ncurses by itself does not provide a pkgconfig check, it is however > >>>>>> manually added by various distributions, but not all of them. > >>>>>> > >>>>>> So, the patch below breaks building powertop for those > >>>>>> distributions. > >>>>>> > >>>>> > >>>>> yes. good point. apparently ncurses provides pkg-config files these > >>>>> days. > >>>>> but there still may be distributions that use older ncurses versions. > >> > >> > >> pkgconfig support was added on 20090103 according to the changelog here: > >> http://invisible-island.net/ncurses/NEWS.html. > >> > >> Is is really a major concern to to require a version of ncurses released > >> within the last 5 years? > > > > I believe these comments stand for themselves. If a user isn't on a > > modern ncurses I fail to see why they would be on a modern powertop > > either. Supporting things >5 years old building against modern things > > is past my point of caring. If someone else would like to amend the > > patch to fall back to hardcoded libs that's fine, but I'm not going to > > invest my time in this. Sadly, my autotools skills are unimpressive and > > there is no justification for the amount of time this would take me. > > > > Accept the patch, don't accept the patch, modify the patch as you see > > fit, whatever you like. > > > > Thanks, > > Zero > > Hi Zero, > > Unfortunately, at the moment I don't have the bandwidth to fix your patch. > > Additionally, PowerTOP doesn't accept patches that break the tool, even if > that is in older technologies. Therefore, I'm simply rejecting your > submission. > > Thank you, > Alexandra. > > > >> > >> -Zero > >>>>> > >>>>> -ss > >>>>> > >>>>>> I suggest that if you really want to make it use pkg-config, you > >>>>>> write > >>>>>> it in such a way that if pkg-config checking fails, it will still > >>>>>> attempt to search for the appropriate libs instead. > >>>>>> > >>>>>> Auke > >>>>>> > >>>>>> > >>>>>> > >>>>>> On Wed, Apr 16, 2014 at 8:20 AM, Rick "Zero_Chaos" Farina > >>>>>> <zerochaos(a)gentoo.org> wrote: > >>>>> Original bug report: https://bugs.gentoo.org/show_bug.cgi?id=486124 > >>>>> > >>>>> Depending on how ncurses is built, it may require different > >>>>> information > >>>>> passed to the linker. Use pkg-config to detect the correct > >>>>> information: > >>>>> > >>>>> --- a/configure.ac > >>>>> +++ b/configure.ac > >>>>> @@ -46,7 +46,7 @@ > >>>>> AC_FUNC_STRTOD > >>>>> AC_CHECK_FUNCS([fdatasync getpagesize gettimeofday memmove memset > >>>>> mkdir > >>>>> munmap pow realpath regcomp select setlocale socket sqrt strcasecmp > >>>>> strchr strdup strerror strncasecmp strstr strtoul strtoull]) > >>>>> > >>>>> -AC_SEARCH_LIBS([delwin], [ncursesw ncurses], [], > >>>>> AC_MSG_ERROR([ncurses > >>>>> is required but was not found]), []) > >>>>> +PKG_CHECK_MODULES(ncurses, ncurses, [LIBS="$LIBS $ncurses_LIBS"], > >>>>> AC_MSG_ERROR([ncurses is required but was not found])) > >>>>> > >>>>> has_libpci=0 > >>>>> PKG_CHECK_MODULES([PCIUTILS], [libpci],[has_libpci=1],[ > >>>>> > >>>>> > >>>>> Original patch: > >>>>> > http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-power/powertop/files/powertop-2.4-tinfo.patch?revision=1.1&view=markup > >>>>> > >>>>> Please include this fix. > >>>>> > >>>>> thanks, > >>>>> Zero > >>>>>>> _______________________________________________ > >>>>>>> PowerTop mailing list > >>>>>>> PowerTop(a)lists.01.org > >>>>>>> https://lists.01.org/mailman/listinfo/powertop > >>>>>> _______________________________________________ > >>>>>> PowerTop mailing list > >>>>>> PowerTop(a)lists.01.org > >>>>>> https://lists.01.org/mailman/listinfo/powertop > >>>>>> > >>>>> > >> > >>> _______________________________________________ > >>> PowerTop mailing list > >>> PowerTop(a)lists.01.org > >>> https://lists.01.org/mailman/listinfo/powertop > >>> > >> > >> > >> Thank you, > >> Alexandra. > >> > > > > -----BEGIN PGP SIGNATURE----- > > Version: GnuPG v2.0.22 (GNU/Linux) > > Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ > > > > iQIcBAEBAgAGBQJTX7T7AAoJEKXdFCfdEflKMpwP/A3ajGdX9nzIN9qelCT6B1Zh > > EfwGI+aNQ+ae9GP7BMYx9Dzirrg7g///cTv3oXxnSpX4XiQIj7oozwLOF1DgEcs8 > > XdmoTSONx6gEiGlYU60jrMKokml+bJoABxM4R6tBMYM2XUD+Zx28TdM76SCx2cGq > > CiWI6dvK7x5afyLbrjRtNvkBQ2k5qMej4s/4fDC/yr1XNvaLxEq4RQyohF+5dAk8 > > T9rD6Yq0B8EvyrXT09TD03cNm/GH+I4Fzuo/h7Ivun10TM40nsXHuNq67LPhYgVa > > ox28MsyRcaRnHyoPzuuMOhz+/QIeUgDHOu1lTFBDNcJgCuox+OPf1O9flw/HTEZ/ > > +YQewdYIgjIiv9tVjwdvXlkr/JSgCl0CdjaJT6MN+VhXz2aMdyQh9TV5Ph8+KBIH > > 3+R3pUGKh+mTEyJ5mwBXMsL9jqQa8TTwFp9OGRjmnqyvyqRJ7z4CRQrnLRfS+D99 > > 5FaZkS2NL/5XDnLAZcNqrRkV4w+UFjuJK5yrZxiYWXgX1n6IqX8eY8Q66SMfBRMG > > 6XKtGD53ku7DV6H+/dlfzOZTD8B+emOJQXprT5O9/QPX1R1bbpC3DSEzMTadtRPi > > CVhMEPfdY/UllH+pIAVNP3ORo4vgRJwOfZNhcqLke7sDrSjqTa5KnAbjb+4Qb5nK > > nBQKYIQfN92Mb7fxF3ve > > =dGdt > > -----END PGP SIGNATURE----- > > > > > Thank you, > Alexandra. > _______________________________________________ > PowerTop mailing list > PowerTop(a)lists.01.org > https://lists.01.org/mailman/listinfo/powertop >
attachment.html
(text/html, 8.6 KB)
<p dir="ltr">I'm confused, how does requiring a pkgconfig file break the tool? </p> <p dir="ltr">If a user somehow finds them in a situation where they need to build a recent powertop but can't build a recent ncurses, they can manually add the file... Or use an older version of powertop... </p> <div class="gmail_quote">On May 6, 2014 1:20 AM, "Alexandra Yates" <<a href="mailto:[email protected]">[email protected]</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br> > -----BEGIN PGP SIGNED MESSAGE-----<br> > Hash: SHA1<br> ><br> > On 04/25/2014 07:58 PM, Alexandra Yates wrote:<br> >> Hi Zero,<br> >><br> >> Based on Sergey's feedback can you send a revision for your patches?<br> >><br> >> thank you,<br> >> Alex<br> >> On 04/16/2014 03:54 PM, Sergey Senozhatsky wrote:<br> >>>>> On (04/16/14 12:41), Kok, Auke-jan H wrote:<br> >>>>>> ncurses by itself does not provide a pkgconfig check, it is however<br> >>>>>> manually added by various distributions, but not all of them.<br> >>>>>><br> >>>>>> So, the patch below breaks building powertop for those<br> >>>>>> distributions.<br> >>>>>><br> >>>>><br> >>>>> yes. good point. apparently ncurses provides pkg-config files these<br> >>>>> days.<br> >>>>> but there still may be distributions that use older ncurses versions.<br> >><br> >><br> >> pkgconfig support was added on 20090103 according to the changelog here:<br> >> <a href="http://invisible-island.net/ncurses/NEWS.html" target="_blank">http://invisible-island.net/ncurses/NEWS.html</a>.<br> >><br> >> Is is really a major concern to to require a version of ncurses released<br> >> within the last 5 years?<br> ><br> > I believe these comments stand for themselves. If a user isn't on a<br> > modern ncurses I fail to see why they would be on a modern powertop<br> > either. Supporting things >5 years old building against modern things<br> > is past my point of caring. If someone else would like to amend the<br> > patch to fall back to hardcoded libs that's fine, but I'm not going to<br> > invest my time in this. Sadly, my autotools skills are unimpressive and<br> > there is no justification for the amount of time this would take me.<br> ><br> > Accept the patch, don't accept the patch, modify the patch as you see<br> > fit, whatever you like.<br> ><br> > Thanks,<br> > Zero<br> <br> Hi Zero,<br> <br> Unfortunately, at the moment I don't have the bandwidth to fix your patch.<br> <br> Additionally, PowerTOP doesn't accept patches that break the tool, even if<br> that is in older technologies. Therefore, I'm simply rejecting your<br> submission.<br> <br> Thank you,<br> Alexandra.<br> <br> <br> >><br> >> -Zero<br> >>>>><br> >>>>> -ss<br> >>>>><br> >>>>>> I suggest that if you really want to make it use pkg-config, you<br> >>>>>> write<br> >>>>>> it in such a way that if pkg-config checking fails, it will still<br> >>>>>> attempt to search for the appropriate libs instead.<br> >>>>>><br> >>>>>> Auke<br> >>>>>><br> >>>>>><br> >>>>>><br> >>>>>> On Wed, Apr 16, 2014 at 8:20 AM, Rick "Zero_Chaos" Farina<br> >>>>>> <<a href="mailto:[email protected]">[email protected]</a>> wrote:<br> >>>>> Original bug report: <a href="https://bugs.gentoo.org/show_bug.cgi?id=486124" target="_blank">https://bugs.gentoo.org/show_bug.cgi?id=486124</a><br> >>>>><br> >>>>> Depending on how ncurses is built, it may require different<br> >>>>> information<br> >>>>> passed to the linker. Use pkg-config to detect the correct<br> >>>>> information:<br> >>>>><br> >>>>> --- a/<a href="http://configure.ac" target="_blank">configure.ac</a><br> >>>>> +++ b/<a href="http://configure.ac" target="_blank">configure.ac</a><br> >>>>> @@ -46,7 +46,7 @@<br> >>>>> AC_FUNC_STRTOD<br> >>>>> AC_CHECK_FUNCS([fdatasync getpagesize gettimeofday memmove memset<br> >>>>> mkdir<br> >>>>> munmap pow realpath regcomp select setlocale socket sqrt strcasecmp<br> >>>>> strchr strdup strerror strncasecmp strstr strtoul strtoull])<br> >>>>><br> >>>>> -AC_SEARCH_LIBS([delwin], [ncursesw ncurses], [],<br> >>>>> AC_MSG_ERROR([ncurses<br> >>>>> is required but was not found]), [])<br> >>>>> +PKG_CHECK_MODULES(ncurses, ncurses, [LIBS="$LIBS $ncurses_LIBS"],<br> >>>>> AC_MSG_ERROR([ncurses is required but was not found]))<br> >>>>><br> >>>>> has_libpci=0<br> >>>>> PKG_CHECK_MODULES([PCIUTILS], [libpci],[has_libpci=1],[<br> >>>>><br> >>>>><br> >>>>> Original patch:<br> >>>>> <a href="http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-power/powertop/files/powertop-2.4-tinfo.patch?revision=1.1&view=markup" target="_blank">http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/sys-power/powertop/files/powertop-2.4-tinfo.patch?revision=1.1&view=markup</a><br> >>>>><br> >>>>> Please include this fix.<br> >>>>><br> >>>>> thanks,<br> >>>>> Zero<br> >>>>>>> _______________________________________________<br> >>>>>>> PowerTop mailing list<br> >>>>>>> <a href="mailto:[email protected]">[email protected]</a><br> >>>>>>> <a href="https://lists.01.org/mailman/listinfo/powertop" target="_blank">https://lists.01.org/mailman/listinfo/powertop</a><br> >>>>>> _______________________________________________<br> >>>>>> PowerTop mailing list<br> >>>>>> <a href="mailto:[email protected]">[email protected]</a><br> >>>>>> <a href="https://lists.01.org/mailman/listinfo/powertop" target="_blank">https://lists.01.org/mailman/listinfo/powertop</a><br> >>>>>><br> >>>>><br> >><br> >>> _______________________________________________<br> >>> PowerTop mailing list<br> >>> <a href="mailto:[email protected]">[email protected]</a><br> >>> <a href="https://lists.01.org/mailman/listinfo/powertop" target="_blank">https://lists.01.org/mailman/listinfo/powertop</a><br> >>><br> >><br> >><br> >> Thank you,<br> >> Alexandra.<br> >><br> ><br> > -----BEGIN PGP SIGNATURE-----<br> > Version: GnuPG v2.0.22 (GNU/Linux)<br> > Comment: Using GnuPG with Thunderbird - <a href="http://www.enigmail.net/" target="_blank">http://www.enigmail.net/</a><br> ><br> > iQIcBAEBAgAGBQJTX7T7AAoJEKXdFCfdEflKMpwP/A3ajGdX9nzIN9qelCT6B1Zh<br> > EfwGI+aNQ+ae9GP7BMYx9Dzirrg7g///cTv3oXxnSpX4XiQIj7oozwLOF1DgEcs8<br> > XdmoTSONx6gEiGlYU60jrMKokml+bJoABxM4R6tBMYM2XUD+Zx28TdM76SCx2cGq<br> > CiWI6dvK7x5afyLbrjRtNvkBQ2k5qMej4s/4fDC/yr1XNvaLxEq4RQyohF+5dAk8<br> > T9rD6Yq0B8EvyrXT09TD03cNm/GH+I4Fzuo/h7Ivun10TM40nsXHuNq67LPhYgVa<br> > ox28MsyRcaRnHyoPzuuMOhz+/QIeUgDHOu1lTFBDNcJgCuox+OPf1O9flw/HTEZ/<br> > +YQewdYIgjIiv9tVjwdvXlkr/JSgCl0CdjaJT6MN+VhXz2aMdyQh9TV5Ph8+KBIH<br> > 3+R3pUGKh+mTEyJ5mwBXMsL9jqQa8TTwFp9OGRjmnqyvyqRJ7z4CRQrnLRfS+D99<br> > 5FaZkS2NL/5XDnLAZcNqrRkV4w+UFjuJK5yrZxiYWXgX1n6IqX8eY8Q66SMfBRMG<br> > 6XKtGD53ku7DV6H+/dlfzOZTD8B+emOJQXprT5O9/QPX1R1bbpC3DSEzMTadtRPi<br> > CVhMEPfdY/UllH+pIAVNP3ORo4vgRJwOfZNhcqLke7sDrSjqTa5KnAbjb+4Qb5nK<br> > nBQKYIQfN92Mb7fxF3ve<br> > =dGdt<br> > -----END PGP SIGNATURE-----<br> ><br> <br> <br> Thank you,<br> Alexandra.<br> _______________________________________________<br> PowerTop mailing list<br> <a href="mailto:[email protected]">[email protected]</a><br> <a href="https://lists.01.org/mailman/listinfo/powertop" target="_blank">https://lists.01.org/mailman/listinfo/powertop</a><br> </blockquote></div>