Permissions settings for prebuilt binaries on Mac
Hi, I downloaded the latest prebuilt binary for Mac and noticed a handful of issues.
First, it looks like file permissions are incorrect inside the zip. Looks like all the executable/binary files and scripts lack the execute bit so they don't run (e.g., bin/MaterialXView is chmod 650 and won't run until u+x is set, the python files lack as well). Setting the exec bit fixes that, but then there's a separate issue.
Second issue is the MaterialXView GUI displays correctly with the menu, the 3D model displays very briefly, and then a dialog displays saying "Failed to generate albedo table shader" and "GLSL program creation error" that cannot be dismissed.
Is there something that can be done to work around the issues to check out the GUI? I tried manually specifying different shaders and different geometry, but the error persists.
Hi Christopher, I think you're running into an issue that has been fixed with this check-in https://github.com/materialx/MaterialX/pull/807
Alright, I can try compiling from source, but sounds good if the second issue is already known and fixed.
Thanks for this report, @brlcad, and I believe @bernardkwok is correct that it's fixed in the main branch. Let us know if you run into any additional issues on macOS, and we'll plan to incorporate the fix in the upcoming 1.38.4 release.
The only other aspect is that the permissions in the zip file were set wrong (no execute bits set anywhere), so nothing would actually run without chmod'ing the files.
@brlcad That's a good point, and I'd be open to ideas on how we might set per-platform permissions on our binaries before they're uploaded via GitHub Actions.
Here's the step in our GitHub Actions process that currently uploads binaries (on all platforms), if you or other developers have recommendations:
https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/.github/workflows/main.yml#L259
@brlcad That's a good point, and I'd be open to ideas on how we might set per-platform permissions on our binaries before they're uploaded via GitHub Actions.
According to https://github.com/actions/upload-artifact#zipped-artifact-downloads it's a limitation of the upload-artifact-v3 being used. As described on their page, they suggest tar'ing the files prior to upload in order to preserve permissions.