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

 
 

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

Submitter:  Sam Steingold <sds>
Submitted:  Tue 03 Jun 2008 10:17:22 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  build Status:  Fix Released
Privacy:  Public Assigned to:  haible
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 30 Dec 2016 01:30:34 AM UTC, comment #1: 

The collision of '__structcpy' between libavcall and libcallback should be fixed by http://git.savannah.gnu.org/gitweb/?p=libffcall.git;a=commitdiff;h=24b4a84a135250259ae3e0336dbdede0f2326def

The collision of '__va_error1' and '__va_error2' between libvacall and libcallback should not be a problem in practice: No program should link with both libvacall and libcallback. libvacall is for programs that are not multithread-safe. libcallback is for programs that are multithread-safe.

Bruno Haible <haible>
Group administrator
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>
Group administrator

 

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

Attach Files:
   
   
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
  • -email is unavailable- added by haible (Posted a comment)
  • -email is unavailable- added by sds (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-01-04 haible StatusFixed Fix Released
    2016-12-30 haible Item GroupNone build
        StatusNone Fixed
        Open/ClosedOpen Closed
    2008-06-03 sds Attached File- Added callback2.c, #15790

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code