[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shared library linking on Darwin
From: |
Gary V . Vaughan |
Subject: |
Re: shared library linking on Darwin |
Date: |
Fri, 20 Apr 2001 21:33:21 +0100 |
On Friday 20 April 2001 4:50 am, Chris Leishman wrote:
> On Friday, April 20, 2001, at 08:05 AM, Kevin Ryde wrote:
> > Chris Leishman <address@hidden> writes:
> >> Everything compiles ok, but the dlopen fails with the error "not a
> >> Mach-O MH_BUNDLE file type" (this error message is output by dlcompat
> >> when NSCreateObjectFileImageFromFile returns
> >> NSObjectFileImageInapproriateFile).
> >
> > Perhaps the backtick quoting problem (other thread) is making it miss
> > out on -bundle, instead using -dynamiclib, due to the test in
> > archive_cmds being evaluated too early. You might want to check the
> > cc command that gets run.
>
> No cc commands get run to link (output below). Libtool has decided that
> it couldn't satisfy all inter-library dependencies for the module (even
> though the only dependency is a single libtool convenience library), and
> is hence building a static archive using ar and ranlib.
>
> The .a archive is obviously not a bundle library, hence it spits the
> error.
>
>
> Chris
>
>
> /bin/sh ./libtool --mode=link cc -W -Wall -O0 -g -o module.la -rpath
> /usr/local/lib -module -release 0-1 module.lo extra/libextra.la
> rm -fr .libs/module.la .libs/module.* .libs/module-0-1.*
>
> *** Warning: inter-library dependencies are not known to be supported.
> *** All declared inter-library dependencies are being dropped.
>
> *** Warning: libtool could not satisfy all declared inter-library
> *** dependencies of module module. Therefore, libtool will create
> *** a static module, that should work as long as the dlopening
> *** application is linked with the -dlopen flag.
> rm -fr .libs/module.lax
> mkdir .libs/module.lax
> rm -fr .libs/module.lax/libextra.al
> mkdir .libs/module.lax/libextra.al
> (cd .libs/module.lax/libextra.al && ar x
> /Users/caleishm/work/test_mod/extra/.libs/libextra.al)
> ~/work/test_mod/.libs/module.lax/libextra.al
> ar cru .libs/module.a module.o .libs/module.lax/libextra.al/extra.lo
> ranlib .libs/module.a
> rm -fr .libs/module.lax
> creating module.la
> (cd .libs && rm -f module.la && ln -s ../module.la module.la)
> ~/work/test_mod/.libs
Have either of you had any success with my workaround?
make ECHO="/bin/sh `pwd`/libtool --fallback-echo"
Or something equivalent...
Cheers,
Gary.
--
___ _ ___ __ _ mailto: address@hidden
/ __|__ _ _ ___ _| | / / | / /_ _ _ _ __ _| |_ __ _ ___ address@hidden
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
\___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
home page: /___/ /___/ gpg public key:
http://www.oranda.demon.co.uk http://www.oranda.demon.co.uk/key.asc
- shared library linking on Darwin, Chris Leishman, 2001/04/16
- Re: shared library linking on Darwin, Alexandre Oliva, 2001/04/16
- Re: shared library linking on Darwin, Chris Leishman, 2001/04/17
- Re: shared library linking on Darwin, Kevin Ryde, 2001/04/19
- Re: shared library linking on Darwin, Chris Leishman, 2001/04/19
- Re: shared library linking on Darwin,
Gary V . Vaughan <=
- Re: shared library linking on Darwin, Kevin Ryde, 2001/04/21
- Re: shared library linking on Darwin, Gary V . Vaughan, 2001/04/23
- Re: shared library linking on Darwin, Kevin Ryde, 2001/04/25