[rust-dev] Rust universal build issues
banderson at mozilla.com
Thu Jul 17 11:08:12 PDT 2014
Thanks for your work on MacPorts. Did you use any flags to configure or
arguments to make? What version of OS X, clang/gcc?
On 07/17/2014 01:17 AM, Aljaž Srebrnič wrote:
> Hello list,
> I’m ono of the maintainers of rust on MacPorts, and I found some issues with the build. The script in src/compiler-rt/make/platform/clang_darwin.mk has a comment on line 135:
> # Forcibly strip off any -arch, as that totally breaks our universal support.
> Now, it looks like that script strips any -arch flags and adds -arch flags for *all* the supported architectures by the host compiler. As a result, some of the files are compiled as x86_64 only (the original arch flags) and some as a fat binary (i386 and x86_64). In stage3, linking fails:
I don't believe the build system is supposed to build stage3 on OS X.
> error: ar 'x' '/opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_dports_lang_rust/rust/work/rust-0.11.0/i686-apple-darwin/rt/libjemalloc.a' failed with: exit code: 1
> note: stdout ---
> note: stderr ---
> ar: /opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_dports_lang_rust/rust/work/rust-0.11.0/i686-apple-darwin/rt/libjemalloc.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it)
> ar: /opt/local/var/macports/build/_opt_local_var_macports_sources_svn.macports.org_dports_lang_rust/rust/work/rust-0.11.0/i686-apple-darwin/rt/libjemalloc.a: Inappropriate file type or format
> I saw a env variable, $RC_SUPPORTED_ARCHS and tried to set RC_SUPPORTED_ARCHS=“x86_64”, but to no avail. How can I instruct compiler-rt to build for my architecture only?
> Aljaž Srebrnič a.k.a g5pw
> My public key: http://bit.ly/g5pw_pubkey
> Rust-dev mailing list
> Rust-dev at mozilla.org
More information about the Rust-dev