[Help-gnutls] Re: duplicate symbols complaint on Mac OS X 10.5.2

David Reiser dbreiser at gmail.com
Tue Mar 18 17:05:34 CET 2008

On Mar 18, 2008, at 5:32 AM, Ludovic Courtès wrote:

> Hi,
> David Reiser <dbreiser at gmail.com> writes:
>> ld: duplicate symbol ___gmpz_abs in
>> .libs/libguile_gnutls_v_1_la-errors.o and
>> .libs/libguile_gnutls_v_1_la-core.o
> That's weird since `__gmpz_abs' is supposedly inline.
> Can you try compiling something like:
>  #include <gmp.h>
>  void
>  foo (mpz_t a, mpz_t b)
>  {
>    mpz_abs (a, b);
>  }
> And then run:
>  $ nm -g the-file.o | grep mpz_abs
> Thanks,
> Ludovic.

It turns out I am incapable of accomplishing that. Sorry. I can muddle  
through patches and packaging, but seem unable to resolve simple C  
problems. Using your fragment, I get:

Undefined symbols:
   "_main", referenced from:
       start in crt1.10.5.o
   "___gmpz_abs", referenced from:
       _foo in ccfgyRYz.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

If I throw in a 'main ()' to quiet the first error, I end up with  
'error: syntax error before ‘{’ token'

That said, there have been other problems with inline functions and  
Apple's linker in OS X 10.5.2. I'll try building on 10.4 to see if  
that works.

Thanks for the help.

David Reiser
dbreiser at gmail.com

More information about the Gnutls-help mailing list