buglibffcall - foreign function call libraries - Bugs: bug #23474, Shared libraries on Darwin don't...

 
 

bug #23474: Shared libraries on Darwin don't work

Submitted by:  Sam Steingold <sds>
Submitted on:  Tue 03 Jun 2008 10:17:22 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: Bruno Haible <haible>
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 03 Jun 2008 10:17:22 PM UTC, original submission:

Dynamic libraries created on *-apple-darwin8 don't work. This seems to be due to libavcall and libcallback both defining ___structcpy. Static libraries are not affected.

Building the attached file with

cc callback2.c -lavcall -lvacall -ltrampoline -lcallback -o callback2

gives

/usr/bin/ld: multiple definitions of symbol ___structcpy
/usr/local/lib/libavcall.dylib(libavcall.0.0.0.dylib-master.o) definition of ___structcpy
/usr/local/lib/libcallback.dylib(libcallback.0.0.0.dylib-master.o)
definition of ___structcpy
/usr/bin/ld: warning multiple definitions of symbol ___va_error1
/usr/local/lib/libvacall.a(misc.o) definition of ___va_error1 in section (__TEXT,__text)
/usr/local/lib/libcallback.dylib(libcallback.0.0.0.dylib-master.o)
definition of ___va_error1
/usr/bin/ld: warning multiple definitions of symbol ___va_error2
/usr/local/lib/libvacall.a(misc.o) definition of ___va_error2 in section (__TEXT,__text)
/usr/local/lib/libcallback.dylib(libcallback.0.0.0.dylib-master.o)
definition of ___va_error2
collect2: ld returned 1 exit status
make: *** [callback2] Error 1

Replacing each -l<lib> with /usr/local/lib/lib<lib>.a builds without problems and produces a fully functioning executable.
-------------

uname -a

Darwin apple2.local 8.11.0 Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC Power Macintosh powerpc

cc --version

powerpc-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build 5363)

ffcall 1.10

from:
https://sourceforge.net/tracker/?func=detail&atid=101355&aid=1983932&group_id=1355

Sam Steingold <sds>
Project Administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #15790:  callback2.c added by sds (305B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by sds (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 03 Jun 2008 10:19:18 PM UTCsdsAttached File-=>Added callback2.c, #15790

    Back to the top


    Powered by Savane 3.1-cleanup