-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use Conan system requirements to install open gl dependencies on ubuntu #297
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've only tested the change to the conanfile.py locally after doing a quick reinstall of linux. It does the trick, assuming I also make a change to my .conf file, as per my comment below.
Wondering if the conan conf should be changed via python behind the scenes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reinstalled ubuntu on my machine so I could start from scratch.
Once I'd cloned Morpheus, I then edited conanfile.py as per this PR. Here is my output:
dpkg-query: no packages found matching libgl-dev
dpkg-query: no packages found matching libgl1-mesa-dev
opengl/system: WARN: System requirements: 'libgl-dev' are missing but can't install because tools.system.package_manager:mode is 'check'.Please update packages manually or set 'tools.system.package_manager:mode' to 'install' in the [conf] section of the profile, or in the command line using '-c tools.system.package_manager:mode=install'
opengl/system: WARN: System requirements: 'libgl1-mesa-dev' are missing but can't install because tools.system.package_manager:mode is 'check'.Please update packages manually or set 'tools.system.package_manager:mode' to 'install' in the [conf] section of the profile, or in the command line using '-c tools.system.package_manager:mode=install'
ERROR: opengl/system: Error in system_requirements() method, line 33
apt.install_substitutes(["libgl-dev"], ["libgl1-mesa-dev"], update=True, check=True)
ConanException: None of the installs for the package substitutes succeeded.
I needed these lines set.
$ cat ~/.conan2/global.conf
tools.system.package_manager:mode = install
tools.system.package_manager:sudo = True
No, I don't believe it should as that would result in Morpheus installing dependencies on a users machine without them necessarily wanting that. I think a more sensible option would be to provide a useful error message when the dependency is missing and provide the user with the steps to follow if they do wish to follow it. Also if it does fail to install OpenGL, then Vulkan could still be available on Linux so it should continue successfully as long as at least one under lying render system is available. Any failure to provide one when there is another viable option should just be a warning the user can choose to address. |
I think what probably makes sense is to encourage users to set the check mode in their config as follows:
Then failures are reported when packages are missing. Then users can upgrade it to install if they want to install the packages: Does that sound reasonable? |
Yes I think that’s a good idea - any other gaps to be filled could be addressed via a FAQ for example. I agree that there’s a limit to the amount of auto-downloading that should be done on a users system |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Fixes: #296