• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Produce working, fat binary dynamic library from command line?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Produce working, fat binary dynamic library from command line?


  • Subject: Re: Produce working, fat binary dynamic library from command line?
  • From: "mal content" <email@hidden>
  • Date: Mon, 11 Jun 2007 23:42:16 +0100

On 11/06/07, Andrew Pinski <email@hidden> wrote:
On 6/11/07, mal content <email@hidden> wrote:
> t.dylib: t.h t1.o t2.o t3.o
>         libtool -dynamic -o t.dylib t1.o t2.o t3.o -lSystemStubs -lc

Just do:
gcc -dynamiclib -arch i386 -arch ppc  -isysroot
/Developer/SDKs/MacOSX10.4u.sdk   t1.o t2.o t3.o

Instead of invoking libtool directly.

Thanks,
Andrew Pinski


Hello.

Thanks for the quick reply.

I ran that exact command but the resulting library
wasn't usable (strange linker errors when trying to
link a program with the library). Running otool
on the file shows:

$ otool -L t.dylib
t.dylib:
       /var/tmp//cc6PeQdg.out (compatibility version 0.0.0, current
version 0.0.0)
       /var/tmp//ccLx3yTF.out (compatibility version 0.0.0, current
version 0.0.0)
       /var/tmp//ccNA71ae.out (compatibility version 0.0.0, current
version 0.0.0)
       /var/tmp//ccz9o0Bo.out (compatibility version 0.0.0, current
version 0.0.0)
       /usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.3.3)

The complete command pipeline that the compiler ran was:

cc -v -dynamiclib -arch i386 -arch ppc -isysroot
/Developer/SDKs/MacOSX10.4u.sdk -o t.dylib t1.o t2.o t3.o
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=powerpc-apple-darwin8 --host=powerpc-apple-darwin8
--target=powerpc-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5367)
Using built-in specs.
/usr/bin/libtool -dynamic -arch_only ppc -noall_load -syslibroot
/Developer/SDKs/MacOSX10.4u.sdk -weak_reference_mismatches non-weak -o
/var/tmp//ccb9c00K.out -L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1
-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1
-L/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../.. t1.o t2.o t3.o
-final_output t.dylib -lgcc -lSystemStubs -lSystem
Target: i686-apple-darwin8
Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure
--disable-checking -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=powerpc-apple-darwin8 --enable-werror-always
--with-arch=nocona --with-tune=generic
--program-prefix=i686-apple-darwin8- --host=powerpc-apple-darwin8
--target=i686-apple-darwin8
Thread model: posix
gcc version 4.0.1 (Apple Computer, Inc. build 5367)
/usr/bin/libtool -dynamic -arch_only i386 -noall_load -syslibroot
/Developer/SDKs/MacOSX10.4u.sdk -weak_reference_mismatches non-weak -o
/var/tmp//cc25nNpR.out -L/usr/lib/gcc/i686-apple-darwin8/4.0.1
-L/usr/lib/gcc/i686-apple-darwin8/4.0.1
-L/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../.. t1.o t2.o t3.o
-final_output t.dylib -lgcc -lSystem
lipo -create -o t.dylib /var/tmp//cc25nNpR.out /var/tmp//ccb9c00K.out

Any idea what I can do about this?

MC
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Produce working, fat binary dynamic library from command line?
      • From: "Andrew Pinski" <email@hidden>
References: 
 >Produce working, fat binary dynamic library from command line? (From: "mal content" <email@hidden>)
 >Re: Produce working, fat binary dynamic library from command line? (From: "Andrew Pinski" <email@hidden>)

  • Prev by Date: Re: Produce working, fat binary dynamic library from command line?
  • Next by Date: Re: Produce working, fat binary dynamic library from command line?
  • Previous by thread: Re: Produce working, fat binary dynamic library from command line?
  • Next by thread: Re: Produce working, fat binary dynamic library from command line?
  • Index(es):
    • Date
    • Thread