From bug-request at octave dot org Tue Jan 25 14:18:48 2005 Subject: Re: Serious memory leak in octave (this may be a duplicate bug report) From: Dan Nessett To: "John W. Eaton" CC: Per Persson , Martin Costabel , Date: Tue, 25 Jan 2005 12:12:08 -0800 On 1/25/05 11:34 AM, "John W. Eaton" wrote: > On 25-Jan-2005, Dan Nessett wrote: > > | I can't seem to find the right combination of configure options to get a > | full version of octave built with libncurses coming from /usr/lib. I have > | tried: > | > | ./configure --enable-shared --enable-dl --disable-static > | LDFLAGS="/usr/lib/libncurses.5.dylib /sw/lib/libreadline.4.dylib > | /sw/lib/libhdf5.0.dylib" FLIBS=/sw/lib/libg2c.a > | > | ./configure --enable-shared --enable-dl --disable-static > | LDFLAGS="/usr/lib/libncurses.5.dylib /sw/lib/libreadline.4.dylib > | /sw/lib/libhdf5.0.dylib -I/sw/include/readline.h" FLIBS=/sw/lib/libg2c.a > | > | and > | > | ./configure --enable-shared --enable-dl --disable-static > | LDFLAGS="/usr/lib/libncurses.5.dylib /sw/lib/libreadline.a > | /sw/lib/libhdf5.0.dylib -I/sw/include/readline.h" FLIBS=/sw/lib/libg2c.a > | > | All of these result in the following error during the configure phase: > | > | checking for rl_set_keyboard_input_timeout in -lreadline... no > | configure: WARNING: I need GNU Readline 4.2 or later > | configure: error: this is fatal unless you specify --disable-readline > | > | I would like to have a full workaround before I report the bug to Fink. Any > | suggestions? > > You should look in config.log to see why the readline check is > failing. My guess is that some function is not defined or declared > properly. Another guess is that -I/sw/include/readline.h is not > right. First, a -I option doesn't make much sense in LDFLAGS, and > second, the directory name looks wrong (I would expect > /sw/include/readline, not /sw/include/readline.h). > > jwe I caught the CPPFLAGS bug about 15 minutes after I sent the email. However, I missed the readline.h fumble. I am not an autoconf expert, so I am not sure what is going on, but here is what seems to be the relevant part of config.log: configure:20157: checking for rl_set_keyboard_input_timeout in -lreadline configure:20195: gcc -o conftest -g -O2 -I/sw/include/readline/ /usr/lib/libncurses.5.dylib /sw/lib/libreadline.a /sw/lib/libhdf5.0.dylib conftest.c -lreadline -lncurses -lm >&5 ld: can't locate file for: -lreadline It seems that the -lreadline is causing the problem, even though /sw/lib/libreadline.a is on the compile line. If so, I'm not sure how to get rid of -lreadline using a suitable configure option. The ./configure execution was: ./configure --enable-shared --enable-dl --disable-static LDFLAGS="/usr/lib/libncurses.5.dylib /sw/lib/libreadline.a /sw/lib/libhdf5.0.dylib" CPPFLAGS=-I/sw/include/readline/ FLIBS=/sw/lib/libg2c.a I checked to ensure libreadline.a has rl_set_keyboard_input_timeout, and it appears to. Here is the relevant part from an otool -vt libreadline.a execution: 000003b0 lmw r28,0xfff0(r1) 000003b4 blr _rl_set_keyboard_input_timeout: 000003b8 mfspr r0,lr 000003bc bcl 20,31,0x3c0 Dan ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------