-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
OSX Catalina (10.15) Issues/Fixes #173
Comments
Have you considered the It addresses some of those issues. |
I had these issues specific to 10.15 on the Macos branch as specified in the post - everything is working well prior to 10.15 on the macos branch. |
Ah, I see, sorry! Is 10.15 available on Travis? |
No worries! I don't believe it is yet - at least according to https://docs.travis-ci.com/user/reference/osx/ |
What are the actual errors with my replacement |
The realpath implementation isn't locating the asset files - that is, it produces a file not found/cannot be resolved error. I'll get the actual bazel debug logs when I'm next in front of my home PC. I believe the issue may have to do with the realpath not resolving symlinks correctly - I experimented some with it, and it seemed that when the path of a file is hidden behind a symlink, the realpath implementation provided could not find the file. |
The short form:
Verbose Failure here: https://gist.github.com/DavidMChan/ca1c9b443d6d6056c35916968be98972 |
I'd like to understand why the diff --git a/deepmind/support/BUILD b/deepmind/support/BUILD
index c369673..860ba3a 100644
--- a/deepmind/support/BUILD
+++ b/deepmind/support/BUILD
@@ -32,5 +32,6 @@ cc_binary(
"-std=c99",
"-D_DEFAULT_SOURCE",
"-D_POSIX_C_SOURCE",
+ "-D_DARWIN_BETTER_REALPATH",
],
)
diff --git a/deepmind/support/realpath.c b/deepmind/support/realpath.c
index aad9512..5522dcc 100644
--- a/deepmind/support/realpath.c
+++ b/deepmind/support/realpath.c
@@ -21,24 +21,27 @@
// step. This implements the equivalent of "realpath -e" on Linux.
#include <errno.h>
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+char p_storage[PATH_MAX] = {};
+
int main(int argc, char* argv[]) {
int num_errors = 0;
errno = 0;
for (int i = 1; i < argc; ++i) {
- char* p = realpath(argv[i], NULL);
+ char* p = realpath(argv[i], p_storage);
+ p_storage[PATH_MAX - 1] = '\0';
if (p == NULL) {
- fprintf(stderr, "Error resolving path '%s', error was: '%s'\n",
- argv[i], strerror(errno));
+ fprintf(stderr, "Error resolving path '%s', error was: '%s', details: '%s'\n",
+ argv[i], strerror(errno), p_storage);
errno = 0;
++num_errors;
} else {
fprintf(stdout, "%s\n", p);
- free(p);
}
}
|
After testing this morning, I can confirm, this patch does seem to fix the realpath issues. |
Wonderful, thanks! That's a very trivial fix then :-) I'll get that committed. |
(It's hard to know who's being portable and who isn't here. The linux manual says that the use of |
I committed this change in 760ab54, and I've cherrypicked that onto the |
Yep! The realpath implementation is working now on 10.15. There are still issues with SDL2 2.0.10, but there's nothing really that we can do about that until they release a new stable version. |
Great :-) Yes, SDL isn't under our control at all, I just set some reasonable defaults for Travis to work. But you need to adapt it to whatever you have locally. |
While OSX is not officially supported - I wanted to point out the issues and solutions I found necessary to get Deepmind lab running on 10.15 on the macos branch with python3 for those who are interested. I'm not sure if any of these should be merged, but the documentation could be adapted.
Issues (Or at least, those I was able to find)
RESOLVED (AS OF 12/6):
The "//:deepmind/support:realpath" script no longer functions on 10.15. Fix: Install the coreutils brew package (which includes a functioning realpath) and replace all lines in BUILD of the formln -s $$($(location //deepmind/support:realpath) ...
withln -s $$(realpath ...
. The patch file is here: https://gist.github.com/DavidMChan/6654a82c658480f8b983b9afabe4502cSDL 2.0.10 renders the window in only 1/4 of the screen. Fix: Use SDL 2.0.12 by installing with --HEAD on brew. This is related to high DPI support in the upstream (See: https://hg.libsdl.org/SDL/rev/46b094f7d20e and macOS Catalina: Only bottom left quarter of the screen is used by the game ioquake/ioq3#422)
The text was updated successfully, but these errors were encountered: