-
-
Notifications
You must be signed in to change notification settings - Fork 452
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
Cygwin: problem with DLL search order when using system Python #30149
Comments
comment:1
In
But this first check is useless because we currently don't support native Windows. It should say |
comment:2
Thanks for catching this! Are you preparing a branch? |
comment:3
This seems to have partially fixed the problem, but only partially. Now there's something really bizarre happening, which is that if I run This shouldn't be, since in both cases it's still running the same Python interpreter executable. |
comment:4
I cannot for the life of me find any logical explanation for this discrepancy. |
comment:5
Tried with strace? |
comment:6
rpy2 does weird things with loading libR and blas/lapack, they need a correct order of this. |
comment:7
Before getting into the depths of what rpy2 may be doing on Cygwin, I'd suggest to try the rpy2 update first - #29441 is waiting for review |
comment:8
This doesn't have anything to directly with rpy2 |
comment:9
See #30157 |
comment:10
For now I'll create a patch for this issue. It's actually a totally separate issue from #30157. |
New commits:
|
Branch: u/embray/ticket-30149 |
Commit: |
Author: Erik Bray |
Reviewer: Matthias Koeppe |
Changed branch from u/embray/ticket-30149 to |
I noticed a problem when trying to run the tests for the latest Sage, that the wrong version of
libR.dll
was being loaded, because I have R installed via Sage, but I also have the R package for Cygwin installed.My path starts with:
so when importing
rpy2
it should link with thelibR.dll
that's in$SAGE_LOCAL/lib/R/lib
. Normally this has been the case.But when using the system Python this is not so. This is because according to the standard DLL search path the first place it looks is:
Well, when running the system Python that's
/usr/bin
wherepython3.7m.exe
lives. However, that's also where the system'slibR.dll
lives.This is just an example, but it's a broader problem: For any DLL linked to by a compiled Python module, it will always privilege the one in
/usr/bin
over a copy provided by Sage.What we might have to do is, at least on Cygwin, when creating the venv it should actually copy the Python executable instead of just symlinking to it. I believe venv has an option for this.
CC: @dimpase @mkoeppe
Component: porting: Cygwin
Author: Erik Bray
Branch/Commit:
f7213c5
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/30149
The text was updated successfully, but these errors were encountered: