[LU-5448] Compilation without libreadline broken by LU-5418 Created: 04/Aug/14  Updated: 07/Aug/14  Resolved: 07/Aug/14

Status: Closed
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Patrick Farrell (Inactive) Assignee: WC Triage
Resolution: Duplicate Votes: 0
Labels: None
Environment:

CentOS 6.5, latest master.


Issue Links:
Duplicate
is duplicated by LU-5418 compile fix for code using readline Resolved
is duplicated by LU-5445 fail to build util/parser.c Closed
Severity: 3
Rank (Obsolete): 15166

 Description   

The two void declarations added by LU-5418 (http://review.whamcloud.com/11231):
static void noop_int_fn(int unused) { }
static void noop_void_fn(void) { }

Are not used if HAVE_LIBREADLINE is not defined, which results in a compilation error:

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)

Fix is easy, just wrap those declarations in #ifdef HAVE_LIBREADLINE.

Patch coming momentarily.



 Comments   
Comment by Bob Glossman (Inactive) [ 04/Aug/14 ]

patch is already in flight: http://review.whamcloud.com/#/c/11252

Comment by Bob Glossman (Inactive) [ 04/Aug/14 ]

as a workaround, just install the readline-devel rpm. with that installed HAVE_LIBREADLINE gets #define'd and the noop routines get used.

Comment by Patrick Farrell (Inactive) [ 04/Aug/14 ]

http://review.whamcloud.com/11318

Comment by Patrick Farrell (Inactive) [ 04/Aug/14 ]

Whoops - Thanks, Bob. I searched but didn't find your ticket, obviously. Nevermind, then. I'll abandon the patch.

Generated at Sat Feb 10 01:51:34 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.