#42347 closed defect (fixed)
adduser/addgroup fails because of "launchctl: Couldn't stat /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist"
Reported by: | j.orlandomurillo@… | Owned by: | jeremyhu (Jeremy Huddleston Sequoia) |
---|---|---|---|
Priority: | Normal | Milestone: | MacPorts 2.3.0 |
Component: | base | Version: | 2.2.1 |
Keywords: | Cc: | MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), patrick@…, whcordis@…, cooljeanius (Eric Gallager) | |
Port: |
Description (last modified by neverpanic (Clemens Lang))
When building VLC, I get this error... (from the log file)
/wrong logfile, redacted; see below for the right one/
Attachments (2)
Change History (27)
comment:1 Changed 11 years ago by j.orlandomurillo@…
comment:5 Changed 11 years ago by neverpanic (Clemens Lang)
Cc: | j.orlandomurillo@… removed |
---|---|
Description: | modified (diff) |
Owner: | changed from macports-tickets@… to jeremyhu@… |
Port: | vlc added |
You don't need to Cc yourself if you're the reporter. We'd appreciate if you'd attach large outputs instead of pasting it into the ticket next time. Please also set the port field when reporting bugs that are specific to a single port and Cc the maintainer, if any. I've done this for you now.
comment:6 follow-up: 7 Changed 11 years ago by neverpanic (Clemens Lang)
The logfile looks weird to me. First, it contains lines that I can't explain, e.g. ":info:main .:debug:main xorg-videoproto has no conflicts". Second, it contains no information whatsoever what went wrong.
Can you try running sudo port clean vlc
, sudo port -v selfupdate
and try again? If you see any error messages during the selfupdate, please attach the output of this command.
comment:7 Changed 11 years ago by j.orlandomurillo@…
Replying to cal@…:
The logfile looks weird to me. First, it contains lines that I can't explain, e.g. ":info:main .:debug:main xorg-videoproto has no conflicts". Second, it contains no information whatsoever what went wrong.
Can you try running
sudo port clean vlc
,sudo port -v selfupdate
and try again? If you see any error messages during the selfupdate, please attach the output of this command.
I did a clean and selfupdate and received no errors. I tried installing 'vlc' again and got the same error...
---> Computing dependencies for VLC ---> Dependencies to be installed: avahi dbus-python27 dbus dbus-glib py27-gobject py27-cairo gtk3 at-spi2-atk at-spi2-core xorg-libXevie xorg-evieproto xorg-libXtst xorg-recordproto libdaemon libglade2 py27-gdbm py27-pygtk py27-numpy fftw-3 py27-nose nosetests_select py27-setuptools faad2 ffmpeg XviD lame libass enca fribidi libbluray libmodplug libogg libopus libsdl libtheora libvorbis libvpx openjpeg15 jbigkit lcms2 schroedinger orc speex x264 flac fluidsynth jack libsamplerate libsndfile libcddb libcdio libdc1394 libusb libdca libdvdnav libdvdread libdvdcss libebml libid3tag libmad libmatroska libmpcdec libmpeg2 xorg-libXv xorg-videoproto libproxy gconf gtk-doc docbook-xml docbook-xml-4.1.2 docbook-xml-4.2 xmlcatmgr docbook-xml-4.3 docbook-xml-4.4 docbook-xml-4.5 docbook-xml-5.0 docbook-xsl fop gnome-doc-utils iso-codes py27-libxml2 rarian openjade opensp intltool p5.16-getopt-long perl5.16 p5.16-pathtools p5.16-scalar-list-utils p5.16-xml-parser orbit2 libidl policykit libssh2 libupnp taglib twolame ---> Installing dbus @1.6.12_0+startupitem Error: org.macports.install for port dbus returned: launchctl: Couldn't stat("/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist"): No such file or directory nothing found to load Error: Failed to install dbus Please see the log file for port dbus for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_dbus/dbus/main.log Error: The following dependencies were not installed: avahi dbus-python27 dbus dbus-glib py27-gobject py27-cairo gtk3 at-spi2-atk at-spi2-core xorg-libXevie xorg-evieproto xorg-libXtst xorg-recordproto libdaemon libglade2 py27-gdbm py27-pygtk py27-numpy fftw-3 py27-nose nosetests_select py27-setuptools faad2 ffmpeg XviD lame libass enca fribidi libbluray libmodplug libogg libopus libsdl libtheora libvorbis libvpx openjpeg15 jbigkit lcms2 schroedinger orc speex x264 flac fluidsynth jack libsamplerate libsndfile libcddb libcdio libdc1394 libusb libdca libdvdnav libdvdread libdvdcss libebml libid3tag libmad libmatroska libmpcdec libmpeg2 xorg-libXv xorg-videoproto libproxy gconf gtk-doc docbook-xml docbook-xml-4.1.2 docbook-xml-4.2 xmlcatmgr docbook-xml-4.3 docbook-xml-4.4 docbook-xml-4.5 docbook-xml-5.0 docbook-xsl fop gnome-doc-utils iso-codes py27-libxml2 rarian openjade opensp intltool p5.16-getopt-long perl5.16 p5.16-pathtools p5.16-scalar-list-utils p5.16-xml-parser orbit2 libidl policykit libssh2 libupnp taglib twolame To report a bug, follow the instructions in the guide: http://guide.macports.org/#project.tickets Error: Processing of port vlc failed
According to that, I can't install 'dbus'. When I try to install 'dbus' by itself, I get this...
Error: org.macports.install for port dbus returned: launchctl: Couldn't stat("/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist"): No such file or directory nothing found to load
comment:8 follow-up: 9 Changed 11 years ago by neverpanic (Clemens Lang)
Can you please attach /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_dbus/dbus/main.log
? It might contain more information on what went wrong.
Am I correct in assuming /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist
does in fact not exist? I wonder why the install step executes launchctl at all - it shouldn't do that and it should especially not load any launchd plists unless you explicitly request it to.
Changed 11 years ago by j.orlandomurillo@…
Attachment: | main_dbus.log added |
---|
comment:9 Changed 11 years ago by j.orlandomurillo@…
Replying to cal@…:
Can you please attach
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_dbus/dbus/main.log
? It might contain more information on what went wrong.Am I correct in assuming
/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist
does in fact not exist? I wonder why the install step executes launchctl at all - it shouldn't do that and it should especially not load any launchd plists unless you explicitly request it to.
The file in /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist
does not exist and I am not requesting anything else during the installation. I attached the main_dbus.log file.
comment:10 Changed 11 years ago by j.orlandomurillo@…
I can't reproduce this error in another Mac though.
comment:11 follow-up: 13 Changed 11 years ago by neverpanic (Clemens Lang)
From what I can see, the install phase in MacPorts never explicitly calls launchctl
, so I have to assume the problem is somehow caused by some other tool called by MacPorts that uses launchd's socket activation feature to start the daemon that should be declared in /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist
, but that fails because the file doesn't exist.
I think MacPorts might be trying to create a user for the dbus port and fails to do that (that would explain why it wants to talk to directory services).
Can you try running sudo dscl
on your system? Does that work and give you a command prompt, or does it fail with the same message? Can you try restoring the com.apple.DirectoryServicesLocal.plist
from a backup and see if that fixes the problem? This file is an integral part of any OS X system, it should really not be missing.
comment:12 Changed 11 years ago by neverpanic (Clemens Lang)
Cc: | mcalhoun@… added |
---|---|
Port: | dbus added; vlc removed |
Summary: | Can't build VLC @2.1.2_1 → dbus: launchctl: Couldn't stat /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist |
Let's keep the discussion in this ticket. I've modified the summary accordingly.
comment:13 Changed 11 years ago by j.orlandomurillo@…
Replying to cal@…:
From what I can see, the install phase in MacPorts never explicitly calls
launchctl
, so I have to assume the problem is somehow caused by some other tool called by MacPorts that uses launchd's socket activation feature to start the daemon that should be declared in/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist
, but that fails because the file doesn't exist.I think MacPorts might be trying to create a user for the dbus port and fails to do that (that would explain why it wants to talk to directory services).
Can you try running
sudo dscl
on your system? Does that work and give you a command prompt, or does it fail with the same message? Can you try restoring thecom.apple.DirectoryServicesLocal.plist
from a backup and see if that fixes the problem? This file is an integral part of any OS X system, it should really not be missing.
I downloaded dbus and recompiled manually, VLC installation now completes successfully.
comment:14 follow-up: 16 Changed 11 years ago by neverpanic (Clemens Lang)
Resolution: | → worksforme |
---|---|
Status: | new → closed |
That's fixing the symptom, not the problem.
There's a viable file missing in your OS installation. If you're fine with leaving that broken, that's up to you, though. I don't think this is an issue caused by or otherwise related to MacPorts. I'm closing this ticket, since the problem is an OS misconfiguration.
comment:15 Changed 11 years ago by cooljeanius (Eric Gallager)
comment:16 Changed 11 years ago by j.orlandomurillo@…
Replying to cal@…:
That's fixing the symptom, not the problem.
There's a viable file missing in your OS installation. If you're fine with leaving that broken, that's up to you, though. I don't think this is an issue caused by or otherwise related to MacPorts. I'm closing this ticket, since the problem is an OS misconfiguration.
I checked my two other Mac computers both running Mavericks 10.9.1 and they also do not have the "com.apple.DirectoryServicesLocal.plist" file. Also, running "sudo dscl", on the computer with the issue, runs with not problems and gives me a prompt.
However, on both of my other two Mac's I can successfully install dbus directly through Macports.
comment:17 Changed 11 years ago by neverpanic (Clemens Lang)
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
Oh, the problem might actually just be the message itself, even though it is harmless! Tcl has a notion of considering the execution of a program to have failed if the program prints anything to stderr – where this error message might very well be going.
Changed 11 years ago by neverpanic (Clemens Lang)
Attachment: | portutil-handle-dscl-failure.diff added |
---|
Proposed patch against port1.0/portutil.tcl
comment:18 follow-up: 20 Changed 11 years ago by neverpanic (Clemens Lang)
Can you please apply the attached patch in /opt/local/share/macports/Tcl/port1.0/
(by running sudo patch -p0 /path/to/patch/file
there), clean dbus and try again?
The patch can be un-done by running sudo port -f selfupdate
.
comment:19 Changed 11 years ago by neverpanic (Clemens Lang)
Cc: | patrick@… whcordis@… added |
---|
comment:20 follow-up: 21 Changed 11 years ago by j.orlandomurillo@…
Replying to cal@…:
Can you please apply the attached patch in
/opt/local/share/macports/Tcl/port1.0/
(by runningsudo patch -p0 /path/to/patch/file
there), clean dbus and try again?The patch can be un-done by running
sudo port -f selfupdate
.
I applied the patch you provided, reinstalled dbus, and it worked. I had to uninstall a lot of dependencies, but I was able to reinstall them all with no problems. What does that patch do exactly and why didn't the dbus installation affect my other computers?
comment:21 Changed 11 years ago by neverpanic (Clemens Lang)
Replying to j.orlandomurillo@…:
I applied the patch you provided, reinstalled dbus, and it worked.
Great, thanks for testing! I'll commit the patch and it'll be released with MacPorts 2.3 then.
What does that patch do exactly
To create new system users, MacPorts executes dscl
, a low-level tool provided by OS X to manage users. To execute this tool, MacPorts uses the Tcl function exec
, which normally considers the execution of a tool to have failed, if the tool prints any output to stderr. My patch improves the error handling of user creation and avoids exec
to cause an error when dscl
prints a message to stderr.
why didn't the dbus installation affect my other computers?
Because your other computers don't print launchctl: Couldn't stat("/System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist"): No such file or directory
on stderr when executing dscl
. As to why your other computers don't print this (or rather, why one of them does), I have no idea. dscl
is an Apple tool that we're merely using and I don't know enough about its internals to be able to diagnose why it prints this (apparently harmless) message. I suppose this could be considered a bug in dscl
and should be filed with Apple.
comment:23 Changed 11 years ago by neverpanic (Clemens Lang)
Component: | ports → base |
---|---|
Milestone: | → MacPorts Future |
Port: | dbus removed |
Resolution: | → fixed |
Status: | reopened → closed |
Summary: | dbus: launchctl: Couldn't stat /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist → adduser/addgroup fails because of "launchctl: Couldn't stat /System/Library/LaunchDaemons/com.apple.DirectoryServicesLocal.plist" |
Committed in r116751. This will land in MacPorts 2.3. For anybody experiencing the problem meanwhile, applying the patch from comment:18 should help.
comment:24 Changed 11 years ago by jmroot (Joshua Root)
Milestone: | MacPorts Future → MacPorts 2.3.0 |
---|
I provided the wrong log file, this is the correct one.