ld error

ld error

Post by masked.slac.. » Mon, 13 Feb 2006 16:10:56



What does this error mean?

ld: warning empty table of contents:
/Users/username/MPI/lib/libmpichf90.a (can't load from it)

I'm trying to compile a code and get this error from the MPI compiler.
Note MPI is installed to /Users/username/MPI(./configure
--prefix=/Users/username/MPI), not under /.

 
 
 

ld error

Post by Bruce Barnet » Mon, 13 Feb 2006 21:56:59



> What does this error mean?

> ld: warning empty table of contents:
> /Users/username/MPI/lib/libmpichf90.a (can't load from it)

try
        ls -l /Users/username/MPI/lib/libmpichf90.a
        nm /Users/username/MPI/lib/libmpichf90.a

and let us know what happens.

--
Sending unsolicited commercial e-mail to this account incurs a fee of
$500 per message, and acknowledges the legality of this contract.

 
 
 

ld error

Post by masked.slac.. » Tue, 14 Feb 2006 02:55:23




> > What does this error mean?

> > ld: warning empty table of contents:
> > /Users/username/MPI/lib/libmpichf90.a (can't load from it)

> try
>         ls -l /Users/username/MPI/lib/libmpichf90.a
>         nm /Users/username/MPI/lib/libmpichf90.a

> and let us know what happens.

> --
> Sending unsolicited commercial e-mail to this account incurs a fee of
> $500 per message, and acknowledges the legality of this contract.

$ $HOME/MPI/lib/libmpichf90.a
-rw-r--r--   1 username  staff  880 Feb 11 22:49
/Users/username/MPI/lib/libmpichf90.a

$ nm $HOME/MPI/lib/libmpichf90.a

/Users/username/MPI/lib/libmpichf90.a(mpi.o):
0000001c C _mpipriv1_
00000018 C _mpipriv2_
00000002 C _mpiprivc_

 
 
 

1. CodeWarrior Linux and ld error messages

I received a lovely copy of Metrowerks CW 6.0 Linux Edition by courier
today....mmmmm..

But when building an OpenGL app which used to compile, link & work fine
with my Makefile which I used to use, I received about 148 errors.

I've now managed to get it down to 1 error, but don't understand enough
about what it means in order to sort it out. The message is:

Link error:  model.c.o (.data+0x0): multiple definition of
'lightposition'
grow.c.o (.data+0x24): first defined here
model.c.o (.data+0x10): multiple definition of 'lightdirection'
grow.c.o (.data+0x34): first defined here
model.c.o (.data+0x1c): multiple definition of 'grnd'
grow.c.o (.data+0x40): first defined here
collect2: ld returned exit 1 status
collect2: ld returned exit 1 status

The three variables that it refers to are defined (ONCE) in model.h (not
model.c) and nowhere else. I've spent hours trying to figure this out,
and I think the cheif problem is that I don't quite understand how
CodeWarrior is linking all this stuff together.

Can anyone help me figure out what's going on here? Or at least point me
to a document which explains ld's error messages, because it's driving
me nuts.

Would it be better if I uninstalled CodeWarrior and installed it with
the GCC version that comes with it? I am using version 2.95.3 and I
believe that the version that comes with it is 2.95.2.

Thanks in anticipation,

Peter Mantell

--

"Life would be so much easier if we could just look at the source code."

       -- Dave Olson

2. QNX

3. GCC/ld error linking shared X libs

4. compatibility of large IDE drive

5. GCC/LD error values-Xa.o on Solaris 7 (Sparc)

6. amdk6/ficpa2007

7. Weird ld error when compiling

8. What's the newest LinuxPPC CD-ROM?

9. ld error message

10. ld Error on g++ compile - Help needed!

11. ld error while compiling fvwm

12. Wierd ld error - can't find -ldl

13. XPilot compile give ld error