Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#478 Shared libraries on Darwin don't work

build problems
closed-out-of-date
Bruno Haible
ffcall (13)
5
2008-06-03
2008-06-03
Tomaz Slivnik
No

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

Discussion

  • Tomaz Slivnik
    Tomaz Slivnik
    2008-06-03

     
    Attachments
  • Sam Steingold
    Sam Steingold
    2008-06-03

    Logged In: YES
    user_id=5735
    Originator: NO

    moving to ffcall savannah
    https://savannah.gnu.org/bugs/index.php?23474

    note that 1.10 is rather ancient.
    use the cvs head version

     
  • Sam Steingold
    Sam Steingold
    2008-06-03

    • status: open --> closed-out-of-date