Skip Montanaro firstname.lastname@example.org writes:
[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.)
Odd. What does the output of
$ gcc -o foo foo.c -lreadline -ltermcap -Wl,--verbose
look like? In particular the bit at the end where you get things like:
attempt to open /usr/lib/gcc-lib/i386-redhat-linux/2.95.1/libreadline.so failed attempt to open /usr/lib/gcc-lib/i386-redhat-linux/2.95.1/libreadline.a failed attempt to open /usr/i386-redhat-linux/lib/libreadline.so failed attempt to open /usr/i386-redhat-linux/lib/libreadline.a failed attempt to open /usr/bin/../lib/libreadline.so succeeded -lreadline (/usr/bin/../lib/libreadline.so)
(this is more for my personal curiosity than any important reason).
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.
>> (This after deleting both /lib/libreadline.so and >> /lib/libhistory.so.)
Michael> Odd. What does the output of
Michael> $ gcc -o foo foo.c -lreadline -ltermcap -Wl,--verbose
Michael> look like?
Well, what it looks like is "Skip's a dunce...". Turns out there was a libreadline.so symlink /usr/lib also. It found that. When I deleted that it found /usr/lib/libreadline.a. Getting rid of that caused the link to (finally) fail. With just the version-based .so files cc apparently can't do the trick.
Sorry to have wasted the bandwidth.