Re: [sigc] Universal (fat) version of libsigc++ libraries



John,

I'm interested in that as well (VMware Fusion's UI uses libsigc++, and I want to port it to 64-bit), so please let me know about your findings.

On Nov 26, 2009, at 1:01 AM, john blair wrote:

I am trying to build libgigc++- on my mac 10.5.5. I want to build a universal binary so I am passing the following options to configure:

--disable-dependency-tracking \
   CXXFLAGS="-arch i386 -arch x86_64" \
   CFLAGS="-arch i386 -arch x86_64" \
   LDFLAGS="-arch i386 -arch x86_64"

But this results in the following error:
ld warning: in ../sigc++/.libs/libsigc-2.0.dylib, file is not of required architecture
Undefined symbols for architecture x86_64:
 "sigc::trackable::trackable()", referenced from:
sigc::internal::slot_rep::slot_rep(void* (*)(void*), void* (*) (void*), void* (*)(void*))in test_trackable.o
     my_class::my_class()in test_trackable.o
...
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status


Can someone suggest me a way to build a univeral libsigcc++?

In many cases, I have found that packages are not well equipped to deal with building multiple architectures in one invocation. What I usually end up doing is:

1) Choose your installation directory, let's say foo.
2) Build and install using -arch i386. _Move_ the install directory from foo to foo.i386 3) Build and install using -arch x86_64. _Copy_ the install directory from foo to foo.x86_64 4) Identify all the binaries inside foo (that is the only step where a human is needed). For each binary identified,
   delete the (64-bit) binary,
create the (fat) binary by invoking 'lipo' on the corresponding binaries from foo.i386 (32-bit) and foo.x86_64 (64-bit)

The end result is that you end up with a working fat version of the package, installed in foo. You can now delete foo.i386 and foo.x86_64.

I hope it helps,
--
hpreg


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]