python - ncurses shared library errors

Hi,

I am trying to upgrade Python on a FreeBSD 8.3 server (rel14) but I am getting the following errors even though ncurses is already installed. I am using the new pkg(8) format and portmaster(8) for updating ports.
Code:
====> Compressing man pages (compress-man)
===>  Installing for python27-2.7.6_2
===>  Checking if lang/python27 already installed
===>   Registering installation for python27-2.7.6_2
pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dynload/_curses.so): No such file or directory
pkg-static: lstat(/usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dynload/_curses_panel.so): No such file or directory
*** Error code 74

Stop in /usr/ports/lang/python27.
*** Error code 1

Stop in /usr/ports/lang/python27.

===>>> Installation of python27-2.7.6_2 (lang/python27) failed
===>>> Aborting update

===>>> Killing background jobs
Terminated

===>>> You can restart from the point of failure with this command line:
       portmaster <flags> lang/python27 

===>>> Exiting
I also did a make deinstall in /usr/ports/lang/python27 and then make reinstall but I get the same error as above. make deinstall seems to have completely removed python from the system.

Any help is appreciated.
 
Do a make clean, then a make configure and post the output. It looks like the port failed to build them, not sure why though.
 
freebsdhelp said:
There were no errors with make clean and configure.
I wasn't expecting any errors at this stage. I was wondering if Python's configure would pick up the installed ncurses. It may not have detected it and silently turned building support for it off. But it looks like it's detected properly.

Code:
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
{...}
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
 
Give it some time on this forum for other members to see. Someone else may have a suggestion. I see no reason why those two files would be missing. I checked my 10.0 machine and I have both files. So, it may be something version specific.
 
Solved it!

Found this error message after redirecting the output of make reinstall to a file:

Code:
/usr/bin/ld:/usr/local/lib/libncurses.so: file format not recognized; treating as linker script
/usr/bin/ld:/usr/local/lib/libncurses.so:1: syntax error
So, I did the following:

Code:
$ cd /usr/local/lib
$ cat libncurses.so
INPUT(libncurses.so.5 AS_NEEDED(-ltinfo)
$ rm libncurses.so file
$ ln -s libncurses.so.5.9 libncurses.so
$ rm libncursesw.so file
$ ln -s libncursesw.so.5.9 libncursesw.so
python installs fine after creating the links above.

Just out of curiosity I reinstalled ncurses again (with portmaster devel/ncurses) and, voila, it output the following two lines just before the final step of installation:

Code:
echo "INPUT(libncurses.so.5 AS_NEEDED(-ltinfo))" > /usr/ports/devel/ncurses/work/stage/usr/local/lib/libncurses.so
echo "INPUT(libncursesw.so.5 AS_NEEDED(-ltinfow))" > /usr/ports/devel/ncurses/work/stage/usr/local/lib/libncursesw.so
So, is ncurses port the culprit? Can anybody shed more light on this, please? What do these echo lines even mean?
 
Back
Top