Skip to content

rust 1.10 fails to build with local rust on OS X #35149

Closed
@bcully

Description

@bcully

I'm the maintainer of fink's rust package, trying to update it to 1.10.0. It currently fails trying to run the stage0 compiler:

rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libcore
dyld: Library not loaded: @rpath/libarena-d16b8f0e.dylib
  Referenced from: /Users/brendan/tmp/rustc-1.10.0/x86_64-apple-darwin/stage0/bin/rustc
  Reason: image not found
make: *** [x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/stamp.core] Trace/BPT trap: 5

As far as I can tell, this is due to a bug in src/etc/local_stage0.sh. The following patch fixes it for me:

diff --git a/src/etc/local_stage0.sh b/src/etc/local_stage0.sh
index 354be34..9109df0 100755
--- a/src/etc/local_stage0.sh
+++ b/src/etc/local_stage0.sh
@@ -59,6 +59,7 @@ case "$TARG_DIR" in
 cp ${PREFIX}/bin/rustc${BIN_SUF} ${TARG_DIR}/stage0/bin/
 cp ${PREFIX}/${LIB_DIR}/${RUSTLIBDIR}/${TARG_DIR}/${LIB_DIR}/* ${TARG_DIR}/stage0/${LIB_DIR}/
 cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}extra*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
+cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}arena*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
 cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}rust*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
 cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}std*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/
 cp ${PREFIX}/${LIB_DIR}/${LIB_PREFIX}syntax*${LIB_SUF} ${TARG_DIR}/stage0/${LIB_DIR}/

though honestly it looks a bit fragile this way and I wonder if there's a reason not to copy everything in that matches ${LIB_PREFIX}*${LIB_SUF}.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions