blah.a has no table of contents

mtidwell

Registered
Howdy,

i'm trying to compile some programs (Simple Socket Library) and when it gets to ld i get the message:

/usr/bin/ld: archive: ../simpleskts.a has no table of contents, add one with ranlib(1) (can't load from it)


i've tried running ranlib, make clean (and recompile), and nothing seems to work. help!


\\//_
 
If you're doing a make clean after the ranlib, isn't that destroying the results of ranlib? Try the ranlib, then just make again, it should pick up where it left off.
 
Howdy,

well, my intent wasn't to show the order what i had tried. just a few of the things that had tried.

however, i followed your suggestion and got the this response:

table of contents for archive: ../simpleskts.a is out of date; rerun ranlib(1) (can't load from it)


which lead me to the discovery that there is something whacky with regards to the time. if i do a 'date' command i get: ...14:37... yet, if i touch a (non existant) file, it is created with the time (as reported by ls) as ...15:37...

any clues??


\\//_
 
This has something to do with building of the archive (.a) file, as many products I've run into which complain about the file just need to have ranlib run against it, then the build continues just fine.

Did you try to ranlib simpleskts.a (or whatever the path to simpleskts.a is) then run make again? That should take care of it...
 
Often/usually, running ranlib and THEN mv'ing
the library destroys the table of contents.

Put the .a in its final location and then
do the ranlib (probably need to sudo the
operation).
 
Howdy,

tried all the suggestions and i still get one of the two (below) error messages.

(1) ...has no table of contents...
(2) ...is out of date; rerun ranlib(1)...

i've worked around this problem by replacing the references to blah.a with a list of the *.o files.


\\//_
 
Hi,

I'm encountering exactly the same problem and don't know how to solve it.
I tried several things including the ones posted previously, none of them solved the problem.

Could somebody give some advise ?
Thanks
 
Back
Top