Opened 6 years ago

Closed 5 years ago

#56985 closed defect (fixed)

rust: Failed to destroot rust

Reported by: Dave-Allured (Dave Allured) Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: Cc: Dave-Allured (Dave Allured)
Port: rust

Description

I am attempting a private build of Macports in my home directory, without root privileges. Starting from a clean build of Macports 2.5.3, port -v install rust completes 44 ports, ending with llvm-6.0 @6.0.1_0. Next, rust @1.27.2 builds successfully, then fails on a copy in install/destroot with "no such file or directory". In the copy arguments, the source directory exists, but the destination directory does not exist. See the specific paths in the code box below.

Port clean followed by a second port install failed in the same way.

MacOS version 10.13.6, High Sierra. Xcode version 9.4.

Here are brief excerpts near the end of console output. Also attached is the full main.log from the rust work directory.

Install rustc stage2 (Some("x86_64-apple-darwin"))
running: "sh" "/Volumes/User/dallured/macports/var/macports/build/" <snip>
install: creating uninstall script at <snip>
install: installing component 'rustc'

    Rust is ready to roll.

< Rustc { stage: 2, target: "x86_64-apple-darwin", host: "x86_64-apple-darwin" }
Build completed successfully in 0:02:08
make: Leaving directory <snip>
Error: Failed to destroot rust: error copying "/Volumes/User/dallured/macports/var/macports/build/_Volumes_User_dallured_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/rustc-1.27.2-src/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps/save-analysis" to "/Volumes/User/dallured/macports/var/macports/build/_Volumes_User_dallured_macports_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_rust/rust/work/destroot/Users/dallured/macports/lib/rustlib/x86_64-apple-darwin/analysis": no such file or directory
  <snip>

Attachments (2)

main.log (254.1 KB) - added by Dave-Allured (Dave Allured) 6 years ago.
main.log from rust work directory
main.2.log (314.3 KB) - added by Dave-Allured (Dave Allured) 6 years ago.
main.log from "port install" of rust@1.29.0

Download all attachments as: .zip

Change History (9)

Changed 6 years ago by Dave-Allured (Dave Allured)

Attachment: main.log added

main.log from rust work directory

comment:1 Changed 6 years ago by Dave-Allured (Dave Allured)

Summary: rust @1.27.2: Failed to destroot rustrust: Failed to destroot rust

rust@1.29.0 fails in the same way, "Failed to destroot rust" due to missing directory. Attaching main.log from "port install" of rust@1.29.0.

Changed 6 years ago by Dave-Allured (Dave Allured)

Attachment: main.2.log added

main.log from "port install" of rust@1.29.0

comment:2 Changed 6 years ago by Dave-Allured (Dave Allured)

A workaround is to manually create the single missing directory before running "port install rust". This caused my private install of rust@1.29.0 to complete successfully.

comment:3 Changed 6 years ago by Dave-Allured (Dave Allured)

If I am not mistaken, there are two mkdir commands missing from the rust@1.29.0 portfile. Maintainer, if you agree, please add these commands in Portfile, just in front of the two matching "file copy" commands.

file mkdir ${destroot}${prefix}/lib/rustlib/${rust_platform}/analysis
...
file mkdir ${destroot}-${arch}${prefix}/lib/rustlib/${rust_platform}/analysis

comment:4 Changed 6 years ago by Dave-Allured (Dave Allured)

I think I forgot to CC port maintainer. @g5pw, doing it now.

comment:5 Changed 6 years ago by Dave-Allured (Dave Allured)

Rust @1.29.1 fails in the same way on macports 2.5.4.

comment:6 Changed 5 years ago by Dave-Allured (Dave Allured)

This issue resolved itself by magic several months ago, around the time when Macports base went from 2.5.4 to 2.6.2.

I do not know what changed. I can build rust now without hacking. It is okay to close this ticket.

comment:7 Changed 5 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: assignedclosed

Ok, thanks for reporting it! Closing.

Note: See TracTickets for help on using tickets.