On 08/30/2017 01:57 PM, Gabriel Ganne wrote:

https://gerrit.fd.io/r/#/c/8260/

It adds bc to the dependency list, but also replaces a $(shell $(echo …)) by $(shell `echo …`)

They should be the same, but it seems to change the way the Makefile variables are interpreted.

The problem I saw was on Fedora and Centos both of which have bc. The problem it needs a double $ to escape the "$(....)" from make because it "thinks" it is a reference to a variable.

commit 14afc64629e9b35a2e5c5941232236a78c2ecd75
Author: Thomas F Herbert <therb...@redhat.com>
Date:   Wed Aug 30 10:13:51 2017 -0400

    Fix shell error.

    Change-Id: I06af51eef20c2191199613f951f569ef1727b9c4
    Signed-off-by: Thomas F Herbert <therb...@redhat.com>

diff --git a/Makefile b/Makefile
index 1548f36..ef92e2f 100644
--- a/Makefile
+++ b/Makefile
@@ -78,7 +78,7 @@ ifeq ($(OS_ID)-$(OS_VERSION_ID),fedora-25)
        RPM_DEPENDS += python-devel
        RPM_DEPENDS += python2-virtualenv
        RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'
-else ifeq ($(shell if [ $(echo "$(OS_VERSION_ID) > 25" | bc) -eq 1 ] ; then echo "y" ; fi),"y") +else ifeq ($(shell if [ $$(echo "$(OS_VERSION_ID) > 25" | bc) -eq 1 ] ; then echo "y" ; fi),"y")
        RPM_DEPENDS += python2-devel
        RPM_DEPENDS += python2-virtualenv
        RPM_DEPENDS_GROUPS = 'C Development Tools and Libraries'

I tested on rhel 7, Ubuntu 16.04, and debian 8.

Best regards,

--

Gabriel Ganne

*From:*Dave Wallace [mailto:dwallac...@gmail.com]
*Sent:* mercredi 30 août 2017 16:27
*To:* Burt Silverman <bur...@gmail.com>; Gabriel Ganne <gabriel.ga...@enea.com> *Cc:* Thomas F Herbert <therb...@redhat.com>; vpp-dev <vpp-dev@lists.fd.io>
*Subject:* Re: [vpp-dev] https://gerrit.fd.io/r/#/c/8236/

I agree.

@Gabriel, please push a patch which adds bc to DEB_DEPENDS in vpp/Makefile.

Thanks,
-daw-

On 08/30/2017 09:14 AM, Burt Silverman wrote:

    To me, it doesn't seem to be a crime to add bc to the
    dependencies. I guess another approach would be to remove the dot
    in 16dot04 and then just use shell arithmetic. The release numbers
    are always in the same format, 2 digits DOT 2 digits, so I would
    think that should work.

    Burt

    On Wed, Aug 30, 2017 at 3:47 AM, Gabriel Ganne
    <gabriel.ga...@enea.com <mailto:gabriel.ga...@enea.com>> wrote:

        Hi,

        This probably is be because you don't have bc.

        It is not in the dependency list. I'm so used to having it
        around that I did not think to check.

        Sorry.

        If so, the best thing probably is to revert and not to
        increase the dependency list just to silence a warning.

        Regards,

        --

        Gabriel Ganne

        ------------------------------------------------------------------------

        *From:*Dave Wallace <dwallac...@gmail.com
        <mailto:dwallac...@gmail.com>>
        *Sent:* Wednesday, August 30, 2017 6:25:32 AM
        *To:* Thomas F Herbert; Gabriel Ganne
        *Cc:* vpp-dev
        *Subject:* Re: [vpp-dev] https://gerrit.fd.io/r/#/c/8236/
        
<https://url10.mailanyone.net/v1/?m=1dn3xX-0006Hd-50&i=57e1b682&c=cStJh6yQU2F9FWBIKNcsjRgTf-ntcQfeHTWOgVHSer9pSh1n2Ke77HoWikhOjcSWh0z-O2rHVl18yF2FOHhjhruUhq8VyojK4u6e0BbsFIHZleaRifwRLCWsosaGdVw__FJqiQlIB_Gvaa1w9Jm_gQAlPYBetc4L-9HozLkobTyK5775Sj6qZDN6ijVpzsIcF1ulKmuWUEnw9sNtRAXHMyDXYthGBQFz_EFyNSgCszs>


        Tom,

        What OS are you running?

        Thanks,
        -daw-

        On 08/29/2017 07:58 PM, Thomas F Herbert wrote:

            This patch creates may have fixed one problem with Ubuntu
            16.04 but created another:

            $ make
            /bin/sh: line 0: [: -eq: unary operator expected

            ...

-- *Thomas F Herbert*
            NFV and Fast Data Planes
            Office of Technology
            *Red Hat*



            _______________________________________________

            vpp-dev mailing list

            vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>

            https://lists.fd.io/mailman/listinfo/vpp-dev
            
<https://url10.mailanyone.net/v1/?m=1dmuZP-0007YU-5v&i=57e1b682&c=Qsrdfe_DPl_SvvWzv--VtKCBJOKVTEg4VL0ZnkHG2v411y213_M9DM_3rjAI_f7X2ifYtM6xQxMwYWfBDcZTqZxJaNy5yHnZcs5MFE_YJQCWz0i2q6fT4KpnC8m_c_MsVfHOcIcUpBQ7dUboUbtyy5Ey7roG_YlGZSbaOR7rmgDeloqmgdxJ1d-Duo6FX-6ARriIWYlW9895XudmB85pM0kVgfReq85yx9Z-4QG_addHGYW74uqlKVoVuMF6O6ni>


        _______________________________________________
        vpp-dev mailing list
        vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>
        https://lists.fd.io/mailman/listinfo/vpp-dev
        
<https://url10.mailanyone.net/v1/?m=1dn3xX-0006Hd-50&i=57e1b682&c=EqcMBcwLbPIpILbjmEVtzuPv1tv4iapVkLyJrlkzz0UhLpP0wGZLZTNDpeO9UJwtlk5EUSaYSRG16iZ7f2x6tCkRecTwkKo0B_NuE_yrCrMiUQkJOqx1KujPdKYakBj_Atb8EfOWXBZKXVyuTR9G29RBJTGbbvTxPxqont1wC6CbeyJKvJl38VYK9MYuVFMgA_-dnpOGR8Z9eXz6SHF8BJiilA1Y4WPLHciUK_1mBxXF3894rogQEQxZSVdIRm8q>


--
*Thomas F Herbert*
NFV and Fast Data Planes
Office of Technology
*Red Hat*
_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to