I just update my ports tree and try to install the latest (1.0) `lang/rust` port, however, it fails with the following errors: ...skip... cfg: including install rules gmake: stat: GNUmakefile: 拒绝访问 (Access denied) gmake: stat: makefile: 拒绝访问 (Access denied) gmake: stat: Makefile: 拒绝访问 (Access denied) gmake: stat: prepare_install: 拒绝访问 (Access denied) gmake: *** No rule to make target 'prepare_install'。 停止 (Stopped)。 /usr/ports/lang/rust/work/rustc-1.0.0/mk/install.mk:14: recipe for target 'install' failed gmake[2]: *** [install] Error 2 gmake[2]: Leaving directory '/usr/ports/lang/rust/work/rustc-1.0.0' *** Error code 2 Stop. make[1]: stopped in /usr/ports/lang/rust *** Error code 1 Stop. make: stopped in /usr/ports/lang/rust ===>>> make stage failed for lang/rust ===>>> Aborting update ===>>> You can restart from the point of failure with this command line: portmaster <flags> lang/rust My computer runs FreeBSD 10.1 amd64, upgraded from 10.0 by compiling from source using GENERIC kernel. If more information is needed, don't hesitate to tell me. Thanks.
as a bystander: 1) I think "(Access denied)" is probably the issue 2) You are using portmaster which is known to be crap. Try to reproduce the error using poudriere. In other words, the second that it's apparent that portmaster is being used, just automatically assume that's the issue.
Thanks! I just go into the `/usr/ports/lang/rust` and run `make clean && make install clean`, it goes without any issues and installs rust successfully. So I guess maybe it's the `portmaster` that leads to this issue.
Hi, I'm back. I find the issue is raised by `sudo` rather than `portmaster`. If I go into the `/usr/ports/lang/rust` and run `sudo make install clean`, it will fail with errors "Access denied" shown. However, if I run it as root, say, just `make install clean`, it builds and installs without any problems. A bit strange. P.S.: My `sudo` version is 1.8.13, compiled from ports: justin@darkgeek-freebsd.pts/1 ~ % pkg info sudo sudo-1.8.13 Name : sudo Version : 1.8.13 Installed on : Tue Mar 24 09:58:09 CST 2015 Origin : security/sudo Architecture : freebsd:10:x86:64 Prefix : /usr/local Categories : security Licenses : sudo Maintainer : garga@FreeBSD.org WWW : http://www.sudo.ws/ Comment : Allow others to run commands as root Options : AUDIT : on DISABLE_AUTH : off DISABLE_ROOT_SUDO: off DOCS : on INSULTS : off LDAP : off NLS : on NOARGS_SHELL : off OPIE : off SSSD : off Shared Libs required: libintl.so.8 Shared Libs provided: libsudo_util.so.0 Annotations : Flat size : 3.22MiB Description : This is the CU version of sudo.
I was looking at this for use in another project. I ran into the same issue. I'll have a patch [to correct this] shortly. --Chris
If you're anxious. It's the permissions of the source. changing the Make file from: post-extract: @${MKDIR} ${WRKSRC}/dl ${LN} -sf ${DISTDIR}/${RUST_BOOT} ${WRKSRC}/dl to: post-extract: cd ${WRKSRC} find . -type d -exec chmod 0755 {} \; @${MKDIR} ${WRKSRC}/dl ${LN} -sf ${DISTDIR}/${RUST_BOOT} ${WRKSRC}/dl worked for me. :) --Chris
Created attachment 156979 [details] Allow installation by more than just root lang/rust PATCH to allow installation by normal users. The permissions in the [source] tar ball are [currently] too restrictive. The attached patch corrects that. --Chris
Created attachment 156991 [details] Same as above. But with files. Same as above. But I previously neglected to include file perms. This one takes care of the files rooted in those directories.
Hi, Thanks for your patch. I applied it to my ports tree and tried to build it. However, it failed with the following errors: ...skip... cleaning destination tmp/dist/rustc-1.0.0-dev-x86_64-unknown-freebsd-image prepare: tmp/dist/rustc-1.0.0-dev-x86_64-unknown-freebsd-image/bin mkdir: tmp/dist: Permission denied /usr/ports/lang/rust/work/rustc-1.0.0/mk/dist.mk:208: recipe for target 'prepare-host-dirs-dir-x86_64-unknown-freebsd' failed gmake: *** [prepare-host-dirs-dir-x86_64-unknown-freebsd] Error 1 /usr/ports/lang/rust/work/rustc-1.0.0/mk/install.mk:14: recipe for target 'install' failed gmake[2]: *** [install] Error 2 gmake[2]: Leaving directory '/usr/ports/lang/rust/work/rustc-1.0.0' *** Error code 2 Stop. make[1]: stopped in /usr/ports/lang/rust *** Error code 1 Stop. make: stopped in /usr/ports/lang/rust Looks we still miss something?
(In reply to Justin Yang from comment #8) > Hi, > > Thanks for your patch. I applied it to my ports tree and tried to build it. > However, it failed with the following errors: > > ...skip... > cleaning destination tmp/dist/rustc-1.0.0-dev-x86_64-unknown-freebsd-image > prepare: tmp/dist/rustc-1.0.0-dev-x86_64-unknown-freebsd-image/bin > mkdir: tmp/dist: Permission denied > /usr/ports/lang/rust/work/rustc-1.0.0/mk/dist.mk:208: recipe for target > 'prepare-host-dirs-dir-x86_64-unknown-freebsd' failed > gmake: *** [prepare-host-dirs-dir-x86_64-unknown-freebsd] Error 1 > /usr/ports/lang/rust/work/rustc-1.0.0/mk/install.mk:14: recipe for target > 'install' failed > gmake[2]: *** [install] Error 2 > gmake[2]: Leaving directory '/usr/ports/lang/rust/work/rustc-1.0.0' > *** Error code 2 > > Stop. > make[1]: stopped in /usr/ports/lang/rust > *** Error code 1 > > Stop. > make: stopped in /usr/ports/lang/rust > > Looks we still miss something? Bummer. Just in case. Did you perform the following: cd /usr/ports/lang/rust make deinstall make clean make rmconfig before you attempted the make install? Oh, and you used the second patch that included the file permissions, right? Not the first one I posted. If so. You may want to wait for 1.0.0b4, which won't come with a prebuilt clang. But use the version in BASE. You can follow along here: https://reviews.freebsd.org/D2466 Best wishes. --Chris
(In reply to Chris Hutchinson from comment #9) Thanks, and yes, I did deinstall the package and clean it before installing. In addition, I use the second patch you provide. I think I'd better wait for the next update.
Hi! I believe this is fixed in the Ports tree. Can you confirm this? Thanks!
(In reply to Jean-Sebastien Pedron from comment #11) Hi, If I build `lang/rust` in poudriere, everything is fine. However, if I have `lang/rust` installed on computer and then compile it from ports by `make install clean`, it throws the following errors: === ...skip... note: /usr/bin/ld: warning: libedit.so.7, needed by /usr/local/lib/librustc_driver-7d23ff90.so, may conflict with libedit.so.0 x86_64-unknown-freebsd/stage0/lib/rustlib/x86_64-unknown-freebsd/bin/rustc.o: In function `main::ha415815a2dd502c0faa': driver.0.rs:(.text._ZN4main20ha415815a2dd502c0faaE+0x1): undefined reference to `main::heb37d758b258944e7cd' x86_64-unknown-freebsd/stage0/lib/rustlib/x86_64-unknown-freebsd/bin/rustc.o: In function `main': driver.0.rs:(.text.main+0x14): undefined reference to `rt::lang_start::ha870adcc74760422qgw' cc: error: linker command failed with exit code 1 (use -v to see invocation) error: aborting due to previous error /usr/ports/lang/rust/work/rustc-1.1.0/mk/target.mk:170: recipe for target 'x86_64-unknown-freebsd/stage0/lib/rustlib/x86_64-unknown-freebsd/bin/rustc' failed gmake[2]: *** [x86_64-unknown-freebsd/stage0/lib/rustlib/x86_64-unknown-freebsd/bin/rustc] Error 101 gmake[2]: Leaving directory '/usr/ports/lang/rust/work/rustc-1.1.0' ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/lang/rust *** Error code 1 Stop. make: stopped in /usr/ports/lang/rust === Not sure how to deal with it. Thanks.
Hi Justin! Yeah, rust can't compile if there is an incompatible version installed because it picks the incompatible libraries first. However, this is indicated in the port's Makefile: CONFLICTS_BUILD= rust \ rust-nightly The port should refuse to compile from the beginning. Is your Ports tree up-to-date?
(In reply to Jean-Sebastien Pedron from comment #13) Hi, Sorry for my delay. I have updated my ports tree to the latest and try to build `lang/rust` port. However. it won't stop at the beginning but proceed to build. I have rust installed before this building: justin@darkgeek.pts/2 ~ % pkg info | grep rust rust-1.1.0 Language with a focus on memory safety and concurrency The Makefile does have an entry about conflict: justin@darkgeek.pts/2 ~ % grep 'CONFLICTS_BUILD' /usr/ports/lang/rust/Makefile CONFLICTS_BUILD= rust \ Thanks.
You're right, apparently a port can't conflict with itself, I missed that part. I will prepare another fix. Thank you!
The directory permission patch has been incorporated a while ago, as well as the CONFLICTS handling.
This is still an issue on 10.2, rust 1.7, with either portmaster or root clean install. cleaning destination tmp/dist/rustc-1.7.0-x86_64-unknown-freebsd-image prepare: tmp/dist/rustc-1.7.0-x86_64-unknown-freebsd-image/bin mkdir: tmp/dist: Permission denied /usr/ports/lang/rust/work/rustc-1.7.0/mk/dist.mk:126: recipe for target 'prepare-host-dirs-dir-x86_64-unknown-freebsd' failed gmake: *** [prepare-host-dirs-dir-x86_64-unknown-freebsd] Error 1 /usr/ports/lang/rust/work/rustc-1.7.0/mk/install.mk:20: recipe for target 'install' failed gmake[2]: *** [install] Error 2 gmake[2]: Leaving directory '/usr/ports/lang/rust/work/rustc-1.7.0' *** Error code 2 Stop. make[1]: stopped in /usr/ports/lang/rust *** Error code 1 Stop. make: stopped in /usr/ports/lang/rust
(In reply to synthmeat from comment #17) continue tracking the issue via bug 207930