Re: [Python-Dev] readline not getting built when .so symlink doesn't exist
Skip Montanaro <skip@pobox.com> writes:
I recently upgraded to Mandrake 8.0. I find that the readline module is no longer getting built. When building, it builds rgbimb followed immediately by crypt. Readline, which is tested for in between, is not built. Apparently, it can't find one of the libraries required to build it. On my system, both readline and termcap are in /lib. Neither has a static version available and neither as a plain .so file available. The .so file always has a version number tacked onto the end:
% ls -l /lib/libtermcap* /lib/libreadline* lrwxrwxrwx 1 root root 18 May 29 10:53 /lib/libreadline.so.4 -> libreadline.so.4.1 -rwxr-xr-x 1 root root 152440 Mar 25 01:26 /lib/libreadline.so.4.1 lrwxrwxrwx 1 root root 19 May 29 10:53 /lib/libtermcap.so.2 -> libtermcap.so.2.0.8 -rwxr-xr-x 1 root root 11608 Mar 26 10:32 /lib/libtermcap.so.2.0.8
If I create the necessary .so symlinks it builds okay.
Perhaps this is a bug in Mandrake 8.0 (it wouldn't be the first one), but if it is valid for shared libraries to be installed with only a version-numbered .so file, then it seems to me that distutils ought to handle that.
Hmm. Does compiling a proggie $ gcc foo.c -lreadline work? It doesn't here if I move libreadline.so & libreadline.a out of the way. If the C compiler isn't going to find readline, there ain't much point distutils trying to find it...
There are several programs in /usr/bin on my machine that seem to be dynamically linked to libreadline.
Those things will be directly linked to libreadline.so.whatever; I believe the libfoo.so files are only for the (compile time) linker's benefit.
In addition, /usr/lib/python2.0/lib-dynload/readline.so exists, which suggests that the .so-without version number is valid as far as ld is concerned.
ld != ld.so. Do you need a readline-devel package or something? Cheers, M. -- It's actually a corruption of "starling". They used to be carried. Since they weighed a full pound (hence the name), they had to be carried by two starlings in tandem, with a line between them. -- Alan J Rosenthal explains "Pounds Sterling" on asr
[my readline woes snipped] Michael> Hmm. Does compiling a proggie Michael> $ gcc foo.c -lreadline Michael> work? It doesn't here if I move libreadline.so & libreadline.a Michael> out of the way. Yup, it does: beluga:tmp% cc -o foo foo.c -lreadline -ltermcap beluga:tmp% ./foo >>sdfsdfsdf sdfsdfsdf (This after deleting both /lib/libreadline.so and /lib/libhistory.so.) In this case, foo.c is #include <stdio.h> #include <readline/readline.h> #include <readline/history.h> main() { printf("%s\n", readline(">>" )); } Michael> Do you need a readline-devel package or something? Got that. I just noticed that "rpm -q --whatprovides /lib/libreadline.so" does list readline-devel as the provider. I just reinstalled it using --force. Now the .so symlinks are there. Go figure... Oh well, probably ought to drop it unless another Mandrake user complains. I'm really amazed at how many packages Mandrake chose *not* to install even though I selected all the groups during install and was installing into fresh / and /usr partitions. I've been dribbling various packages in bit-by-bit as I've discovered omissions. In the past I've also noticed files apparently not installed even though the packages that were supposed to provide them were installed. Skip
participants (2)
-
Michael Hudson
-
Skip Montanaro