Opened 12 years ago

Closed 11 years ago

#36788 closed defect (duplicate)

clang-3.1: tries to chown when not installing as root

Reported by: renaud@… Owned by: jeremyhu (Jeremy Huddleston Sequoia)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: no-root-privileges haspatch Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: clang-3.1

Description

--->  Staging clang-3.1 into destroot
Error: org.macports.destroot for port clang-3.1 returned: command execution failed

Macport installed from sources using

--prefix="${HOME}/depinxi/macports" --with-no-root-privileges

Attachments (3)

main.log (140.4 KB) - added by renaud@… 12 years ago.
Makefile.patch (496 bytes) - added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) 12 years ago.
Portfile.diff (525 bytes) - added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) 12 years ago.

Download all attachments as: .zip

Change History (13)

Changed 12 years ago by renaud@…

Attachment: main.log added

comment:1 Changed 12 years ago by renaud@…

Configuration: Mac OS X 10.6.8 on a Mac mini

Darwin miniao.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: clang staging destroot removed
Owner: changed from macports-tickets@… to jeremyhu@…
Summary: clang-3.1 @3.1 org.macports.destroot: command execution failedclang-3.1: Operation not permitted

The only errors in the log are "Operation not permitted", which is odd. (Are you sure you're using "sudo"?) Since the log also shows this was not a clean attempt, please "sudo port clean clang-3.1", then try again, then attach the new main.log if it fails again.

comment:3 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

The user is using --with-no-root-privileges, and the error is from trying to chown to root:

:info:destroot chown -R root:wheel /Users/renaud/depinxi/macports/var/macports/build/_Users_renaud_depinxi_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/clang-3.1/work/destroot/Users/renaud/depinxi/macports/libexec/llvm-3.1/lib/c++
:info:destroot chown: /Users/renaud/depinxi/macports/var/macports/build/_Users_renaud_depinxi_macports_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_llvm-3.1/clang-3.1/work/destroot/Users/renaud/depinxi/macports/libexec/llvm-3.1/lib/c++/v1/__bit_reference: Operation not permitted
...

comment:4 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Keywords: no-root-privileges added

comment:5 Changed 12 years ago by renaud@…

I confirm I (voluntary) does not give macports the root privileges (I doesn't have admin access on all machines I have to deal with)

comment:6 Changed 12 years ago by jmroot (Joshua Root)

Summary: clang-3.1: Operation not permittedclang-3.1: tries to chown when not installing as root

comment:7 Changed 12 years ago by macports@…

I'm also running into this problem. The bug looks to be on Clang's end. The installheaders target is not parameterized for whether or not to chown. If I comment out the chown line for the version of the file in my work directory, then the install is able to complete successfully as far as I can tell.

Relative path to patch: clang-3.3/work/trunk/projects/libcxx/Makefile

Clang file with issue: http://llvm.org/svn/llvm-project/libcxx/trunk/Makefile

Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Attachment: Makefile.patch added

Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Attachment: Portfile.diff added

comment:12 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

It is perhaps not the loveliest of fixes, but we could just let MacPorts handle ownership instead of clang (see attached patch).

comment:13 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: mcalhoun@… added
Keywords: haspatch added

comment:14 Changed 11 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.