-
Notifications
You must be signed in to change notification settings - Fork 224
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
Fix issues for running on Windows #313
Conversation
for libname in libnames: | ||
try: | ||
libgmt = ctypes.CDLL(os.path.join(libpath, libname)) | ||
check_libgmt(libgmt) |
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.
If both ctypes.CDLL and check_libgmt don't raise any errors, it means we find the library, then we should break out of the loop. Right?
check_libgmt(libgmt) | |
check_libgmt(libgmt) | |
break |
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.
Of course! Thanks, Dongdong. I stopped coding yesterday because I couldn't even see this basic error anymore :)
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 just realized that this change is part of what's been causing our Windows builds to fail... Since we have a list of dll files to check, if one of the dll fails, the variable error
turns True
and stays True
even if a later dll works. Our Linux and MacOS tests work because there's only one item in the list.
Co-Authored-By: Dongdong Tian <seisman.info@gmail.com>
I managed to track down the failures to GMT API session creation causing a crash. It might be something that Windows is a bit more sensitive to. Need to investigate. |
Just provide more information: I tried pygmt with the latest master branch of GMT. It works well. Running I also tried GMT 6.0.0rc1 provided by conda-forge. GMT itself works well on Windows, but |
Yeah, I'm still scratching my head over this one. I wondered if it's a compiler flag on the conda recipe that is messing things up. |
I just noticed that the conda-forge build log has |
No. It only means installing the header files ( |
Yeah I figured we wouldn't be this lucky. Thanks |
Oh good. Now with rc2 the Linux build is failing. |
It's crashing on this line: Line 348 in da2cfec
|
Yes, but as I said in previous comments, pygmt works with self-built GMT on Windows, but fails with the GMT provided by conda-forge. So it's really difficult to track down the crash. |
@weiji14 😢 yeah, this has bugged me quite a bit. I don't think it's a ctypes issue. I suspect it might be something to do with our conda-forge build. I'm going to work hard on this and some other major issues this week. Hopefully we can get the major blocking points for 0.1 done before AGU 🤞 |
It doesn't seem to like loading from a clone. It parses the templates before actually running anything.
Hey guys, |
Hi @michaelgrund thanks for sharing! Yeah, we might just have to stick with that for now. It's not the ideal solution since it wouldn't integrate with a user's existing setup. |
The issue was fixed in #434. |
Description of proposed changes
Trying to fix the issues for running on Windows now that we have CI.
Fixes #46
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.