Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.7.0
    • Lustre 2.6.0
    • 3
    • 15069

    Description

      Newer versions of readline have removed (or hidden) CPPFunction, leading to the following compilation issue:

      util/parser.c: In function 'init_input':
      util/parser.c:308:45: error: 'CPPFunction' undeclared (first use in this function)
               rl_attempted_completion_function = (CPPFunction *)command_completion; 
      

      The affects Ubuntu 14.04.

      Attachments

        Issue Links

          Activity

            [LU-5418] compile fix for code using readline

            Could this be merged into b2_6 as well? Ran into this issue building on an Ubuntu 14.04 system with libreadline-dev-6.3-4.

            blakecaldwell Blake Caldwell added a comment - Could this be merged into b2_6 as well? Ran into this issue building on an Ubuntu 14.04 system with libreadline-dev-6.3-4.

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12447/
            Subject: LU-5418 echo: replace lov_stripe_md with lov_oinfo
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: eecdcf3004952f5d3a7126e0d6790c0be82f0a56

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12447/ Subject: LU-5418 echo: replace lov_stripe_md with lov_oinfo Project: fs/lustre-release Branch: master Current Patch Set: Commit: eecdcf3004952f5d3a7126e0d6790c0be82f0a56
            pjones Peter Jones added a comment -

            It looks like the follow on patch has landed to master now

            pjones Peter Jones added a comment - It looks like the follow on patch has landed to master now

            to correct my earlier comment the readline-devel rpm does exist in el6 & el7 too. just never saw a problem there as all our builder nodes have both readline and readline-devel rpms installed. until the mod lands a simple workaround is to just install the readline-devel rpm. as far as I know that works everywhere.

            bogl Bob Glossman (Inactive) added a comment - to correct my earlier comment the readline-devel rpm does exist in el6 & el7 too. just never saw a problem there as all our builder nodes have both readline and readline-devel rpms installed. until the mod lands a simple workaround is to just install the readline-devel rpm. as far as I know that works everywhere.

            Putting the actual error messages from the build in here so others can find this more easily (as I failed to):

            cc1: warnings being treated as errors
            util/parser.c:286: error: 'noop_int_fn' defined but not used
            util/parser.c:287: error: 'noop_void_fn' defined but not used
            make[5]: *** [libcfsutil_a-parser.o] Error 1
            make[5]: *** Waiting for unfinished jobs....
            make[4]: *** [all-recursive] Error 1
            make[3]: *** [all-recursive] Error 1
            make[2]: *** [all-recursive] Error 1
            make[1]: *** [all] Error 2
            error: Bad exit status from /var/tmp/rpm-tmp.nePJql (%build)

            paf Patrick Farrell (Inactive) added a comment - Putting the actual error messages from the build in here so others can find this more easily (as I failed to): cc1: warnings being treated as errors util/parser.c:286: error: 'noop_int_fn' defined but not used util/parser.c:287: error: 'noop_void_fn' defined but not used make [5] : *** [libcfsutil_a-parser.o] Error 1 make [5] : *** Waiting for unfinished jobs.... make [4] : *** [all-recursive] Error 1 make [3] : *** [all-recursive] Error 1 make [2] : *** [all-recursive] Error 1 make [1] : *** [all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.nePJql (%build)
            fzago Frank Zago (Inactive) added a comment - http://review.whamcloud.com/11252

            The build failure due to lack of libreadline.so may be caused by rpm changes. In earlier el6 and el7 there wasn't any readline-devel rpm, the required lib was in the readline rpm. If the additional readline-devel rpm is installed on fc20 then libreadline.so is present, HAVE_LIBREADLINE is #define'd, and the build is OK. That said the new libcfs code does fail to build when HAVE_LIBREADLINE is #undef'ed.

            bogl Bob Glossman (Inactive) added a comment - The build failure due to lack of libreadline.so may be caused by rpm changes. In earlier el6 and el7 there wasn't any readline-devel rpm, the required lib was in the readline rpm. If the additional readline-devel rpm is installed on fc20 then libreadline.so is present, HAVE_LIBREADLINE is #define'd, and the build is OK. That said the new libcfs code does fail to build when HAVE_LIBREADLINE is #undef'ed.

            Sorry about that I'll send a fix shortly.

            fzago Frank Zago (Inactive) added a comment - Sorry about that I'll send a fix shortly.
            bogl Bob Glossman (Inactive) added a comment - - edited

            The fix recently landed to master, http://review.whamcloud.com/#/c/11231, breaks the build in some newer kernels. In particular there are now some new functions declared unconditionally:

            static void noop_int_fn(int unused) { }
            static void noop_void_fn(void) { }
            

            These functions are only used in code that is #ifdef HAVE_LIBREADLINE. When building where HAVE_LIBREADLINE is #undef'ed, for example on fc20, this causes build errors and build failure even in client only builds.

            bogl Bob Glossman (Inactive) added a comment - - edited The fix recently landed to master, http://review.whamcloud.com/#/c/11231 , breaks the build in some newer kernels. In particular there are now some new functions declared unconditionally: static void noop_int_fn(int unused) { } static void noop_void_fn(void) { } These functions are only used in code that is #ifdef HAVE_LIBREADLINE. When building where HAVE_LIBREADLINE is #undef'ed, for example on fc20, this causes build errors and build failure even in client only builds.
            pjones Peter Jones added a comment -

            Landed for 2.7

            pjones Peter Jones added a comment - Landed for 2.7

            People

              cliffw Cliff White (Inactive)
              fzago Frank Zago (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: