[Python-bugs-list] [ python-Bugs-436130 ] solaris2.6 problems with readline

noreply@sourceforge.net noreply@sourceforge.net
Sat, 13 Oct 2001 02:20:29 -0700


Bugs item #436130, was opened at 2001-06-25 10:18
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=436130&group_id=5470

Category: Build
Group: Platform-specific
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Fredrik Stenberg (fredriks)
Assigned to: Nobody/Anonymous (nobody)
Summary: solaris2.6 problems with readline

Initial Comment:
having problem with compiling python2.0.1 2.0 (i think
i always had this problem after 1.5.2) on solaris 2.6

gcc  -g -O2 -Wall -Wstrict-prototypes -fPIC
-I./../Include -I.. -DHAVE_CONFIG_H -c ./readline.c
./readline.c: In function `setup_readline':
./readline.c:414: `CPPFunction' undeclared (first use
in this function)
./readline.c:414: (Each undeclared identifier is
reported only once
./readline.c:414: for each function it appears in.)
./readline.c:414: parse error before `)'
*** Error code 1

I have always used to exchange Modules/readline.c with
the old file from the 1.5.2 release.

I finally got around to checking whats wrong, (or
atleast browse around the code).

readline.c Line 414 in void setup_readline states,
rl_attempted_completion_function = (CPPFunction
*)flex_complete;

should this not be;
rl_attempted_completion_function = (Function
*)flex_complete;


I have no problems if i change CPPfunction into
Function, i'm no readline expert but i think this is
the problem.


*sysinfo*
gcc 2.95.2
solaris 2.6
readline4.1

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

>Comment By: Martin v. Löwis (loewis)
Date: 2001-10-13 02:20

Message:
Logged In: YES 
user_id=21627

Closing it as fixed, then.


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

Comment By: Fredrik Stenberg (fredriks)
Date: 2001-07-05 06:34

Message:
Logged In: YES 
user_id=5299

Had no problems after using the latest version of readline.c
from the CVS...
So the problem is fixed (in the future)....(not in the
current dist)

/fredriks

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

Comment By: Fredrik Stenberg (fredriks)
Date: 2001-06-27 04:10

Message:
Logged In: YES 
user_id=5299

I tried it on solaris2.8 later that night, 
I installed readline 4.2 also (no problems with the
installetion, all testprograms worked fine)

But python Module/readline.c refused to compile once again.
I could (as I always have) copy the old readline.c from
1.5.2 and get
it to work..... Is it only me?

/fredriks 





gcc  -I/tmp/su96-fst/include -g -O2 -Wall
-Wstrict-prototypes -fPIC -I./../Include -I..
-DHAVE_CONFIG_H -c ./readline.c
In file included from
/tmp/su96-fst/include/readline/keymaps.h:37,
                 from
/tmp/su96-fst/include/readline/readline.h:36,
                 from ./readline.c:28:
/tmp/su96-fst/include/readline/rltypedefs.h:35: warning:
function declaration isn't a prototype
/tmp/su96-fst/include/readline/rltypedefs.h:36: warning:
function declaration isn't a prototype
/tmp/su96-fst/include/readline/rltypedefs.h:37: warning:
function declaration isn't a prototype
/tmp/su96-fst/include/readline/rltypedefs.h:38: warning:
function declaration isn't a prototype
In file included from ./readline.c:28:
/tmp/su96-fst/include/readline/readline.h:350: warning:
function declaration isn't a prototype
./readline.c:31: conflicting types for `rl_read_init_file'
/tmp/su96-fst/include/readline/readline.h:303: previous
declaration of `rl_read_init_file'
./readline.c:32: conflicting types for `rl_insert_text'
/tmp/su96-fst/include/readline/readline.h:363: previous
declaration of `rl_insert_text'
./readline.c: In function `set_completer_delims':
./readline.c:227: warning: passing arg 1 of `free' discards
qualifiers from pointer target type
./readline.c: In function `flex_complete':
./readline.c:399: warning: implicit declaration of function
`completion_matches'
./readline.c:399: warning: return makes pointer from integer
without a cast
*** Error code 1
make: Fatal error: Command failed for target `readline.o'
Current working directory /tmp/su96-fst/Python-2.0.1/Modules
*** Error code 1
make: Fatal error: Command failed for target `Modules'


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

Comment By: Martin v. Löwis (loewis)
Date: 2001-06-26 15:07

Message:
Logged In: YES 
user_id=21627

CPPFunction is defined in readline 4.2, so one solution 
would be to update to 4.2. The real type of this variable 
is rl_completion_func_t. So if this typedef is already 
available in 4.1, we should probably change the cast to 
rl_completion_func_t.


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

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=436130&group_id=5470