numerous undefined symbols while linking kernel

numerous undefined symbols while linking kernel

Post by Sanjiv Sh » Tue, 09 Jan 1996 04:00:00



  I am trying to compile the linux 1.2.13 kernel using gcc 2.7.0
and ld version cygnus/linux-2.5.21.17.

  I was able to make all the kernel .o files but have a problem
while trying to link. I get numerous error messages saying
'undefined reference to xxxxx'.

  After some reading up, I could gather these may be due to
ld not recognising the .o formats. However, I could not find
the options to be supplied to ld to overcome this problem.

  Could anyone please let me know how to correct this problem
or direct me to some material for the same?


  Thanks in advance.

Sanjiv Shet.

 
 
 

numerous undefined symbols while linking kernel

Post by David J. L » Wed, 10 Jan 1996 04:00:00


#   I am trying to compile the linux 1.2.13 kernel using gcc 2.7.0
# and ld version cygnus/linux-2.5.21.17.

#   I was able to make all the kernel .o files but have a problem
# while trying to link. I get numerous error messages saying
# 'undefined reference to xxxxx'.

The elf patch, available from many ftp sites, is necessary for
compiling with the elf version of GNU C.

 
 
 

1. undefined symbol when linking bash

I'm trying to make bash 1.12 on an AT&T 3B2/400
running System V 3.2.2.  After a little tinkering
around, all the libraries and object files are done.
However, when it comes to link time, the make dies
with ....

        cc     -g -L./lib/readline/  -L./lib/glob/ \
           -o bash shell.o y.tab.o general.o make_cmd.o print_cmd.o   dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o  expr.o flags.o jobs.o subst.o hash.o mailcheck.o test.o  trap.o alias.o ./lib/malloc/malloc.o  braces.o unwind_prot.o  siglist.o  version.o bashline.o builtins/libbuiltins.a -lreadline -ltermcap -lglob -lPW
undefined                       first referenced
 symbol                             in file
opendir                             ./lib/readline//libreadline.a
readdir                             ./lib/readline//libreadline.a
closedir                            ./lib/readline//libreadline.a
ld fatal: Symbol referencing errors. No output written to bash
*** Error code 13
`all' not remade because of errors

Earlier, the readline library wouldn't make until I snarfed a
sys/ndir.h file from another box (SCO).  (It was dying with references
to syntax errors on lines 5172 and 5257 of readline.c)  In case
it helps, here are those 2 lines:

  5172: static DIR *directory;

  5255:  {
  5256:  closedir (directory);
  5257:  directory = (DIR *)NULL;
  5258:  }

The 3 functions readdir, opendir, and closedir seem to have been
defined in the ndir.h file.  I also had to pull in sys/dirent.h
from another box, as the dirent.h on the AT&T box didn't have
DIR defined.  

Anyone know a way around these obstacles?

Thanks!
--
Randall W. Hron
Roswell, GA  USA
uunet!gatech!kd4nc!vdbsan!willard!hrandoz!hronr

2. How to make RH 7.2 recognize 3com 3c509 ?

3. Dynamic linking using dlopen(): undefined symbols

4. there's no space for install packages???

5. Undefined Symbol XSolarisIASetProcessInfo When Linking

6. man -> html conversion problem

7. Dynamic Link library and undefined symbols?

8. Quick question on autofs...

9. Undefined symbols with Forte link : std::basic_ostream/std::string etc...

10. undefined symbol itoa when linking shared library to -lm and -lc

11. Undefined symbols after static link

12. Problems linking gcc/sun : Undefined Symbol

13. Undefined symbol while linking on Solaris