Opened 8 years ago

Closed 8 years ago

#52163 closed defect (fixed)

rust 1.11 build failed

Reported by: earl.lapus@… Owned by: g5pw (Aljaž Srebrnič)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: Cc: mopihopi, r.keoni@…
Port: rust

Description (last modified by mf2k (Frank Schima))

I updated the rust port installed on my machine to 1.11. I encountered a build error (see attached).

Steps:

  • sudo port self update
  • sudo port upgrade outdated (rust build failed)
  • sudo port clean rust
  • sudo port upgrade outdated (rust build failed)

Attachments (4)

rust-main.log.tgz (104.2 KB) - added by earl.lapus@… 8 years ago.
main.log of the build
main.log.gz (97.0 KB) - added by r.keoni@… 8 years ago.
stage0 compiler libarena linkage issue main.log.gz
Portfile-rust-missing-arena.diff (402 bytes) - added by jboone (Jared Boone) 8 years ago.
Patch for Portfile to address libarena missing from stage0.
patch-missing-arena.diff (647 bytes) - added by jboone (Jared Boone) 8 years ago.
Patch to src/etc/local_stage0.sh to fix missing libarena.

Download all attachments as: .zip

Change History (21)

Changed 8 years ago by earl.lapus@…

Attachment: rust-main.log.tgz added

main.log of the build

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Keywords: rust removed
Owner: changed from macports-tickets@… to g5pw@…

In the future, please use WikiFormatting and Cc the port maintainers (port info --maintainers rust), if any.

comment:2 Changed 8 years ago by mf2k (Frank Schima)

Description: modified (diff)
Summary: [rust] [1.11] [build failed]rust 1.11 build failed

comment:3 Changed 8 years ago by mopihopi

Cc: mopihopi@… added

Cc Me!

comment:4 Changed 8 years ago by g5pw (Aljaž Srebrnič)

Hmm... that doesn't look right. Is rust 1.9.0 still installed on your system? Could you try uninstalling it and installing it again instead of upgrading?

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

Status: newassigned

comment:6 Changed 8 years ago by mopihopi

I encounter the same issue. Updating from rust @1.9.0_0 to @1.11.0_0, it takes a while and then fails. If rust and its dependents are cleaned and deactivated then installing rust @1.11.0_0 fails right away, during configure:

:info:configure configure: error: no local rust to use

The buildbot also failed to build rust on every OS X version.

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

Do you see it fetching rustc-1.10.0-x86_64-apple-darwin.tar.gz from https://static.rust-lang.org/dist/2016-07-05/?

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

Aha yes, I can reproduce it now. I confirm it as a regression.

comment:9 Changed 8 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: assignedclosed

There was an error in the stage0 compiler name, it should be fixed in r152343.

comment:10 Changed 8 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: closedreopened

Cmake dependency is missing, I'm going to look if we can avoid building llvm since I'm at it.

comment:11 in reply to:  description Changed 8 years ago by r.keoni@…

Replying to earl.lapus@…:

I updated the rust port installed on my machine to 1.11. I encountered a build error (see attached).

Steps:

  • sudo port self update
  • sudo port upgrade outdated (rust build failed)
  • sudo port clean rust
  • sudo port upgrade outdated (rust build failed)

I'm also encountering build errors. Executive summary is that the stage0 compiler doesn't seem to have all its dylibs available during the build.

With the most recent Portfile, plus deactivating existing rust 1.9.0, instead of the syntax errors (presumably from compiling 1.11 using 1.9) I'm getting a linkage error on a missing libarena. Specifically /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.11.0/x86_64-apple-darwin/stage0/bin/rustc looking for libarena-e8edd0fd.dylib .

root#: otool -L /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.11.0/x86_64-apple-darwin/stage0/bin/rustc
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.11.0/x86_64-apple-darwin/stage0/bin/rustc:
	@rpath/librustc_driver-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_passes-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_borrowck-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_lint-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_resolve-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_typeck-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_plugin-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_privacy-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_trans-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_platform_intrinsics-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_incremental-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libsyntax_ext-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_mir-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_const_eval-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_metadata-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_save_analysis-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_const_math-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libgetopts-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libflate-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_back-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librbml-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_data_structures-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libsyntax-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libserialize-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/liblog-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libterm-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libfmt_macros-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libarena-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/librustc_llvm-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libgraphviz-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libstd-e8edd0fd.dylib (compatibility version 0.0.0, current version 0.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
	/usr/lib/libedit.3.dylib (compatibility version 2.0.0, current version 3.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)

root# cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work/rustc-1.11.0/x86_64-apple-darwin/stage0/lib
root# ls -l
total 160056
-rw-------  1 macports  admin     57556 Sep  4 12:51 libflate-e8edd0fd.dylib
-rw-------  1 macports  admin     68296 Sep  4 12:51 libfmt_macros-e8edd0fd.dylib
-rw-------  1 macports  admin    151564 Sep  4 12:51 libgetopts-e8edd0fd.dylib
-rw-------  1 macports  admin     74048 Sep  4 12:51 libgraphviz-e8edd0fd.dylib
-rw-------  1 macports  admin     66100 Sep  4 12:51 liblog-e8edd0fd.dylib
-rw-------  1 macports  admin    241224 Sep  4 12:51 librbml-e8edd0fd.dylib
-rw-------  1 macports  admin  11909424 Sep  4 12:51 librustc-e8edd0fd.dylib
-rw-------  1 macports  admin    317376 Sep  4 12:51 librustc_back-e8edd0fd.dylib
-rw-------  1 macports  admin    811764 Sep  4 12:51 librustc_borrowck-e8edd0fd.dylib
-rw-------  1 macports  admin    680508 Sep  4 12:51 librustc_const_eval-e8edd0fd.dylib
-rw-------  1 macports  admin    165488 Sep  4 12:51 librustc_const_math-e8edd0fd.dylib
-rw-------  1 macports  admin    349160 Sep  4 12:51 librustc_data_structures-e8edd0fd.dylib
-rw-------  1 macports  admin   2081628 Sep  4 12:51 librustc_driver-e8edd0fd.dylib
-rw-------  1 macports  admin    441360 Sep  4 12:51 librustc_incremental-e8edd0fd.dylib
-rw-------  1 macports  admin    497384 Sep  4 12:51 librustc_lint-e8edd0fd.dylib
-rw-------  1 macports  admin  32176676 Sep  4 12:51 librustc_llvm-e8edd0fd.dylib
-rw-------  1 macports  admin   2412844 Sep  4 12:51 librustc_metadata-e8edd0fd.dylib
-rw-------  1 macports  admin   1196684 Sep  4 12:51 librustc_mir-e8edd0fd.dylib
-rw-------  1 macports  admin    222552 Sep  4 12:51 librustc_passes-e8edd0fd.dylib
-rw-------  1 macports  admin    544240 Sep  4 12:51 librustc_platform_intrinsics-e8edd0fd.dylib
-rw-------  1 macports  admin     65848 Sep  4 12:51 librustc_plugin-e8edd0fd.dylib
-rw-------  1 macports  admin    141416 Sep  4 12:51 librustc_privacy-e8edd0fd.dylib
-rw-------  1 macports  admin    794452 Sep  4 12:51 librustc_resolve-e8edd0fd.dylib
-rw-------  1 macports  admin   1432552 Sep  4 12:51 librustc_save_analysis-e8edd0fd.dylib
-rw-------  1 macports  admin   3480544 Sep  4 12:51 librustc_trans-e8edd0fd.dylib
-rw-------  1 macports  admin   2815680 Sep  4 12:51 librustc_typeck-e8edd0fd.dylib
-rw-------  1 macports  admin   3766976 Sep  4 12:51 librustdoc-e8edd0fd.dylib
-rw-------  1 macports  admin    856948 Sep  4 12:51 libserialize-e8edd0fd.dylib
-rw-------  1 macports  admin   4337080 Sep  4 12:51 libstd-e8edd0fd.dylib
-rw-------  1 macports  admin   8554660 Sep  4 12:51 libsyntax-e8edd0fd.dylib
-rw-------  1 macports  admin    905976 Sep  4 12:51 libsyntax_ext-e8edd0fd.dylib
-rw-------  1 macports  admin    255832 Sep  4 12:51 libterm-e8edd0fd.dylib
drwxr-xr-x  3 macports  admin       102 Sep  4 12:50 rustlib

Looking into that a bit further, it appears that not all the dependencies of the stage0 compiler are getting into the right relative position in the stage0 directory?

root# cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_rust/rust/work
root# find . -name 'libarena*'
./rustc-1.10.0-x86_64-apple-darwin/rustc/lib/libarena-e8edd0fd.dylib
./rustc-1.11.0/src/libarena

Raava:work root# openssl sha1 $(find . -name librustc_llvm-e8edd0fd.dylib)
SHA1(./rustc-1.10.0-x86_64-apple-darwin/rustc/lib/librustc_llvm-e8edd0fd.dylib)= 62d43220727350ee8b4b851bfc89cdfc6fcdd193
SHA1(./rustc-1.11.0/x86_64-apple-darwin/stage0/lib/librustc_llvm-e8edd0fd.dylib)= 62d43220727350ee8b4b851bfc89cdfc6fcdd193

Raava:work root# openssl sha1 $(find . -name rustc -type f)
SHA1(./rustc-1.10.0-x86_64-apple-darwin/rustc/bin/rustc)= 3105ce55ad7183254dda28c81a2b5461dde41d3b
SHA1(./rustc-1.11.0/x86_64-apple-darwin/stage0/bin/rustc)= 3105ce55ad7183254dda28c81a2b5461dde41d3b

I'll attach a main.log.gz in case it's helpful.

Changed 8 years ago by r.keoni@…

Attachment: main.log.gz added

stage0 compiler libarena linkage issue main.log.gz

comment:12 Changed 8 years ago by r.keoni@…

Cc: r.keoni@… added

Cc Me!

comment:13 in reply to:  10 Changed 8 years ago by larryv (Lawrence Velázquez)

Replying to g5pw@…:

Cmake dependency is missing, I'm going to look if we can avoid building llvm since I'm at it.

The last time I looked into this (which was admittedly years ago), it was untenable because the Rust project significantly modified their LLVM. I don’t know whether that’s still the case.

comment:14 Changed 8 years ago by jboone (Jared Boone)

I am attempting a patch based on this Rust issue: https://github.com/rust-lang/rust/pull/35151

I'm building it now, so will know in a few minutes if it worked, and will report here.

comment:15 Changed 8 years ago by jboone (Jared Boone)

Oops, that last URL was their patch. This is the issue: https://github.com/rust-lang/rust/issues/35149

comment:16 Changed 8 years ago by jboone (Jared Boone)

Build succeeded, rustc --version is alive.

Portfile patch and patch file for src/etc/local_stage0.sh attached in a moment.

Changed 8 years ago by jboone (Jared Boone)

Patch for Portfile to address libarena missing from stage0.

Changed 8 years ago by jboone (Jared Boone)

Attachment: patch-missing-arena.diff added

Patch to src/etc/local_stage0.sh to fix missing libarena.

comment:17 Changed 8 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: reopenedclosed

Thanks for doing the legwork for me jboone! :) commited in r152382.

Note: See TracTickets for help on using tickets.