Hi Keith,
> I'm trying to compile some programs that I've downloaded but I keep
> getting messages at the linking stage such as:
> "vfilesel.o(.text+0x944):undefined reference to '_xstat'".
> To me this means that the linker cannot find the xstat function but ...
> why? This was not a problem several weeks ago but now this is happening
> with attempts to compile several programs. Have you had any experience
> with this type of problem.
Yes, the linker won't find the corresponding routine. First you have to
locate the library that contains 'xstat'. Look in the makefile. Maybe there
is a path that is different on your system. Next look in /usr/lib. I
usually use the following to find text in libraries:
strings libfoo.a | grep xstat
or better to scan in all libraries
for i in *; do echo $i; strings $i | grep xstat; done
Maybe you also have older libraries that do not contain this routine.
CHeck the README of the program that you are trying to compile for
references.
If you found the library in a path that is not normal you can instruct the
compiler to look for the library 'libfoo.a' as follows:
gcc -L/path/to/library -lfoo
Alternatively, if you are using shared libraries, the system need to find
the code at runtime, add the path to your
/etc/ld.so.config
file and reinitialize the runtime linker by running:
ldconfig
> Also, when I log in on an Xterm I get the message "_setutent:can't
> open utmp file: No such file or directory". I don't know if this has
> anything to do with the other problem.
The utmp goes into /var/adm under Slackware. You could create an empty file
with
touch /var/adm/utmp
The file get's updates from login, getty and xterms as far as I know and
stores the users that use/used the system. Try the touch thing and reboot.
Then check with
last | less
Hope that helps
Bye
Andreas
Received on Fri Apr 26 09:15:30 1996
This archive was generated by hypermail 2.1.8 : Sun Jan 09 2005 - 13:53:45 CST