On Dec 13, 2014, at 7:07 PM, Clemens Lang <[email protected]> wrote:
> Hi, > >> It still works since I’m using sudo. > > Well, MacPorts doesn't, it drops privileges while building. It's possible the > test should be doing that as well and fails to do it, in which case it should > be fixed. > I looked at portutil’s dropPrivileges and evaluateToRoot. The dropPrivileges needed some macports:: added to some variables and the debug line commented out when called from doctor.tcl. I wasn’t sure this was the way to do it as I’m not familiar with how the normal “build” works. >> If I try to use ‘port doctor’ I get >> "Error: Insufficient privileges to write to MacPorts install prefix.” >> >> I can generate the “cache error” if I do "clang test.c -o main_test “ from >> the >> command-line. >> >> I’m not clear on what system setup having this test in doctor is worthwhile. > > See above. The test might be missing a priv drop. > > >> It should be using the system *C compiler*, which may or may not be clang. > > The bug is clang-specific. The test can be skipped if the system C compiler > isn't > clang – but that does not mean /usr/bin/clang won't be affected by the > problem, > so I'm all for using /usr/bin/clang for the test if it exists, and skip it > otherwise. > The attached patch will at least prevent port doctor from crashing. If we want to skip if no compiler installed, the current output proc would need fixed to allow a SKIP return value. Kurt
doctor2.tcl.diff
Description: Binary data
_______________________________________________ macports-dev mailing list [email protected] https://lists.macosforge.org/mailman/listinfo/macports-dev
