[LU-5418] compile fix for code using readline Created: 25/Jul/14 Updated: 30/Dec/14 Resolved: 26/Aug/14 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.6.0 |
| Fix Version/s: | Lustre 2.7.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Frank Zago (Inactive) | Assignee: | Cliff White (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | patch | ||
| Issue Links: |
|
||||||||||||||||
| Severity: | 3 | ||||||||||||||||
| Rank (Obsolete): | 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. |
| Comments |
| Comment by Frank Zago (Inactive) [ 25/Jul/14 ] |
| Comment by Peter Jones [ 28/Jul/14 ] |
|
Landed for 2.7 |
| Comment by Bob Glossman (Inactive) [ 28/Jul/14 ] |
|
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. |
| Comment by Frank Zago (Inactive) [ 28/Jul/14 ] |
|
Sorry about that I'll send a fix shortly. |
| Comment by Bob Glossman (Inactive) [ 28/Jul/14 ] |
|
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. |
| Comment by Frank Zago (Inactive) [ 28/Jul/14 ] |
| Comment by Patrick Farrell (Inactive) [ 04/Aug/14 ] |
|
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 |
| Comment by Bob Glossman (Inactive) [ 04/Aug/14 ] |
|
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. |
| Comment by Peter Jones [ 26/Aug/14 ] |
|
It looks like the follow on patch has landed to master now |
| Comment by Gerrit Updater [ 21/Nov/14 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/12447/ |
| Comment by Blake Caldwell [ 30/Dec/14 ] |
|
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. |