Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS Compatibility #165

Open
rgov opened this issue Dec 6, 2021 · 2 comments
Open

macOS Compatibility #165

rgov opened this issue Dec 6, 2021 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@rgov
Copy link

rgov commented Dec 6, 2021

Rocker 0.2.7 is not compatible with macOS. If you came here to report a problem, consider it unnecessary.


The current issues I've identified on macOS Monterrey are:

  1. ERROR: test_pulse_extension (test_extension.PulseExtensionTest)

    The proximate cause of the error is that macOS doesn't have an audio group. Even if this were the case, though, the volume mapping etc. would not work. It is possible to achieve forwarding of audio from a container to the host but it would require significant changes to the extension.

  2. FAIL: test_git_extension (test_git_extension.GitExtensionTest)

    The test is flawed in that it assumes that

     user_gitconfig_target = os.path.expanduser('~/.gitconfig')
    

    will result in a path like /home/user/.gitconfig but on macOS it resolves to /Users/user/.gitconfig. This can easily be resolved.

  3. FAIL: test_x11_xpdyinfo (test_nvidia.X11Test)

    You cannot mount the Unix sockets under /tmp/.X11-unix into the container because Docker for Mac doesn't support sharing Unix sockets. (Providing the volume mount seems harmless nonetheless.) Instead we need to send the environment variable DISPLAY=host.docker.internal:0 to the container and have it connect over the network. (Details on configuring XQuartz or Xauthority omitted here.)

  4. FAIL: test_nvidia_glmark2 (test_nvidia.NvidiaTest)

    Nvidia GPUs are no longer supported on macOS, however in theory you should be able to point Docker's backend to a remote Linux server that does have a GPU, so a simple platform check isn't sufficient here.

  5. OpenGL support in XQuartz

    I added a snippet for the X11 extension that installs the OpenGL SW renderer to the container image:

     RUN apt-get update \
         && apt-get install -y mesa-utils libgl1-mesa-glx \
         && apt-get clean
    
     ENV LIBGL_ALWAYS_INDIRECT=1
    

    Then enabled OpenGL drawing in XQuartz with defaults write org.xquartz.X11 enable_iglx -bool true per this answer. This gets us further, but rviz2 for example generates:

     [rviz2-4] [ERROR] [rviz2]: RenderingAPIException: OpenGL 1.5 is not supported in GLRenderSystem::initialiseContext at /tmp/binarydeb/ros-eloquent-rviz-ogre-vendor-7.0.3/obj-x86_64-linux-gnu/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GL/src/OgreGLRenderSystem.cpp (line 1203)
    
@tfoote
Copy link
Collaborator

tfoote commented Dec 7, 2021

Thanks for detailing out these issues. PRs that improve support for any of these corners would be appreciated. I don't have a macOS machine to develop or test on, but am happy to consider any improvements in cross platform support that doesn't regress the main functionality.

@tfoote tfoote added the help wanted Extra attention is needed label Dec 7, 2021
@rgov
Copy link
Author

rgov commented Dec 7, 2021

I spent a while trying to get VirtualGL to work unsuccessfully but perhaps that is the right way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants