thrift-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peace <p...@yahoo.com>
Subject Re: OSX - building universal library binaries
Date Fri, 30 Dec 2011 17:24:54 GMT
Jake,

That would be terrific if you would consider adding an option to build
universal
binaries.  I'll create a ticket in JIRA.

Thanks for the tip on setting the architecture. It's reporting link error
mismatches between i386 and x86_64.  I ran cleanup.sh and started from
scratch to rule out stale object files. Is there another argument to inform
the linker of the architecture?

The 'make' output follows (preceding were dozens of similar ld warnings for
other .o files)
------------------------------------------------------------------------------------------------------------------------
....
ld: warning: ignoring file thrift-t_delphi_generator.o, file was built for
i386 which is not the architecture being linked (x86_64)
ld: warning: ignoring file thrift-t_go_generator.o, file was built for i386
which is not the architecture being linked (x86_64)
Undefined symbols for architecture x86_64:
  "_yylex", referenced from:
      _main in libfl.a(libmain.o)
  "failure(char const*, ...)", referenced from:
      t_generator_registry::register_generator(t_generator_factory*)
in thrift-t_generator.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[3]: *** [thrift] Error 1
....
------------------------------------------------------------------------------------------------------------------------


-Peace

  ------------------------------
*From:* Jake Farrell <jfarrell@apache.org>
*To:* "user@thrift.apache.org" <user@thrift.apache.org>
*Sent:* Thursday, December 29, 2011 5:01 PM
*Subject:* Re: OSX - building universal library binaries

The thrift build is not setup to create a universal binary currently. if
you would like to create a ticket for this we can take a look at making
this a global configure option. To set the arch you can pass
CPPFLAGS='-arch i386' to configure.  You should be able to use this for
each arch you want to create and then use lipo to combine them into a
universal binary.

-Jake


On Dec 29, 2011, at 2:43 PM, Peace wrote:

> What is the procedure for creating a universal binary on OSX? That is, a
> libthrift binary that supports i386, x86_64 and ppc. I built it on an OSX
> 10.7.1 system which produces x86_64 binaries by default and configure.sh
> doesn't accept -arch arguments.
>
> Hope I didn't miss an existing thread on this. Searched online and scanned
> the list but haven't found a good way to search it.
>
> Thanks,
> Peace

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message