Date: Sat, 1 Mar 2014 15:20:38 +0100 From: Christoph Moench-Tegeder <cmt@burggraben.net> To: bug-followup@FreeBSD.org, ohartman@zedat.fu-berlin.de, python@freebsd.org, koobs.freebsd@gmail.com Subject: Re: ports/187174: lang/python27: pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dynload/readline.so): No such file or directory Message-ID: <20140301142037.GA89147@elch.exwg.net>
next in thread | raw e-mail | index | archive | help
Hi, the relevant portion of the build log is here: : building 'readline' extension : cc -fPIC -fno-strict-aliasing -O2 -pipe -march=core2 -fno-strict-aliasing -DNDEBUG -I. -IInclude -I./../Include -I/usr/local/include -I/usr/ports/lang/python27/work/Python-2.7.6/Include -I/usr/ports/lang/python27/work/Python-2.7.6/portbld.static -c /usr/ports/lang/python27/work/Python-2.7.6/Modules/readline.c -o build/temp.freebsd-10.0-RELEASE-amd64-2.7/usr/ports/lang/python27/work/Python-2.7.6/Modules/readline.o : /usr/ports/lang/python27/work/Python-2.7.6/Modules/readline.c:914:24: error: use of undeclared identifier 'Function' : rl_startup_hook = (Function *)on_startup_hook; : ^ : /usr/ports/lang/python27/work/Python-2.7.6/Modules/readline.c:914:34: error: expected expression : rl_startup_hook = (Function *)on_startup_hook; : ^ : /usr/ports/lang/python27/work/Python-2.7.6/Modules/readline.c:916:26: error: use of undeclared identifier 'Function' : rl_pre_input_hook = (Function *)on_pre_input_hook; : ^ : /usr/ports/lang/python27/work/Python-2.7.6/Modules/readline.c:916:36: error: expected expression : rl_pre_input_hook = (Function *)on_pre_input_hook; : ^ : /usr/ports/lang/python27/work/Python-2.7.6/Modules/readline.c:919:41: error: use of undeclared identifier 'CPPFunction'; did you mean 'PyCFunction'? : rl_attempted_completion_function = (CPPFunction *)flex_complete; : ^ : /usr/ports/lang/python27/work/Python-2.7.6/Modules/readline.c:919:54: error: expected expression : rl_attempted_completion_function = (CPPFunction *)flex_complete; : ^ : 6 errors generated. The "old-style" typedefs (Function, VFunction, CPFunction and CPPFunciton) where removed from readline 6.3. Here's a patch which "works for me" (by using the "new-style" typedefs if available), ready for being used as ports/lang/python27/files/patch-Modules-readline.c . In case some mail system mangles this patch, it's also here: http://burggraben.net/hacks/patch-Modules-readline.c.gz --- Modules/readline.c.orig 2014-03-01 14:59:16.000000000 +0100 +++ Modules/readline.c 2014-03-01 15:04:48.000000000 +0100 @@ -911,12 +911,24 @@ rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap); rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap); /* Set our hook functions */ +#ifdef _RL_FUNCTION_TYPEDEF + rl_startup_hook = (rl_hook_func_t *)on_startup_hook; +#else rl_startup_hook = (Function *)on_startup_hook; +#endif #ifdef HAVE_RL_PRE_INPUT_HOOK +#ifdef _RL_FUNCTION_TYPEDEF + rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook; +#else rl_pre_input_hook = (Function *)on_pre_input_hook; #endif +#endif /* Set our completion function */ +#ifdef _RL_FUNCTION_TYPEDEF + rl_attempted_completion_function = (rl_completion_func_t *)flex_complete; +#else rl_attempted_completion_function = (CPPFunction *)flex_complete; +#endif /* Set Python word break characters */ completer_word_break_characters = rl_completer_word_break_characters = I haven't checked if this has been fixed upstream (I'll have to check their repo). If not I'll report it there, and in any case I'll report back with a link to the issue in the python tracker and/or repo. In the meantime, please review and test my patch :) I believe this or something very similar should fix the issue in the other python verions (e.g. PR ports/187176). Regards, Christoph -- Spare Space
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140301142037.GA89147>