-
-
Notifications
You must be signed in to change notification settings - Fork 559
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
Resolve ecl.dll conflict on Cygwin #9167
Comments
comment:1
I don't know if it's related, but gcc reports are couple of rather serious looking warning messages with ecl.
I'm surprised that gcc does not reject such code and refuse to compile it. Dave |
comment:2
I can confirm this on the most recent versions of everything at the port wiki page. That is bad, because now the default Maxima (and hence ECL) for calculus is the library one. |
comment:3
Two possibly irrelevant data points:
|
comment:4
A possibly useful explanation of something similar from the Cygwin list:
|
comment:5
This stackoverflow question also might have a useful piece of information. I don't know how to open/read dlls, though, nor exactly how to trace why it is that it's not finding things. |
comment:6
Cygwin's cygcheck information was much more helpful, and I find two things.
shows up a lot. I have
This file is in |
comment:7
Replying to @kcrisman:
Mine, at least, does NOT have |
comment:8
I can't even figure out where this is created! Unless
and a few similar things in the configure and aclocal files. I can't quite parse those sed things, though I am pretty sure this wouldn't produce that - but I'm not sure what |
comment:9
Replying to @kcrisman:
Where does this come from? ECL? This might be the cause of the problem, since the |
comment:10
P.S.: The I vaguely remember there was also |
comment:11
Replying to @nexttime:
No! This is from the configure file for libgc-6.4.1 or so - the Boehm GC, ported to Cygwin. I have libgc, just not cyggc.
Right, that is why I pointed to it. But it doesn't seem to replace the I'm almost done upgrading and adding As to the tools, I think that cygcheck helped a lot, so for now I'm going to stick with that because I actually sort of understand it :) |
comment:12
I think that libgc-devel was what it took to get this file. However, the upgrade upgraded too much - see this Cygwin list thread - so I had to downgrade libgfortran as described there, and gcc, and .... Not for the last time, I have to say that Cygwin definitely is a moving target. |
comment:13
Replying to @kcrisman:
...and I managed to toast my Cygwin lapack. As far as I can tell I downgraded everything necessary to the right version, rebuilt lapack, rebooted, but still no go.
Nuts. Note that fixing this for the Cygwin Python should fix it for Sage, I think, since we use the same Fortran stuff and even lapack (?), certainly BLAS/ATLAS. |
comment:14
After a lot of trouble managing to get Cygwin shell to find lapack again, I definitely have the right files now. We definitely need as at least part of the fix to add However, there is also still a problem that This might be a |
comment:15
Yeah, after a |
comment:16
Replying to @kcrisman:
In
Well, before editing |
comment:17
Well, I have good news and bad news.
|
comment:18
For some reason this is not actually in Sage's path, gotten by |
comment:19
Another possibility, suggested by this thread, is that there could be two of some file making things hard. Interestingly, there are several ecl.dll's floating around (everywhere a libecl.{dylib,so} would live, I guess) and cygcheck gives different dependencies for each. |
comment:20
Replying to @kcrisman:
if [ "$UNAME" = "CYGWIN" ]; then
PATH="$PATH:$SAGE_LOCAL/lib" && export PATH
fi Yep, but this should IMHO be moved up in the file (including the definition of if [ "$1" = "-short" ]; then
return 0
fi and
No idea. What does I also don't know if we have to add some more or different things to Note that e.g. |
comment:21
That sounds like a good idea. But should it be before
This gives what I would expect - Sage root, Sage local bin, usr/bin, some Cygwin stuff, a Lapack thing I had to add due to my carelessness, and then Sage local lib.
This is very sparse. It is just the directory below.
It looks like it's the same on Cygwin. Another interesting thing is that there are libntl.dll files in /local/bin and /local/lib. Moving just one doesn't seem to do much - note that the bin one is the one imported usually, as in your comment above. Furthermore, apparently only the ecl.dll in devel/sage/build/sage/libs needs libntl.dll and cyggmp, while the one in local/{bin,lib} just wants cyggmp-3.dll. Anyway, I guess I can move files around all day but I'm not getting any nearer. |
comment:22
Question for Dima or others; is it possible that we have too many copies of the dlls? Either that the ecl.dll files are in too many places - local/lib and local/bin - or that the extra libntl.dll files also are causing problems? See #11635 for where this started - perhaps this is the cause of all the trouble? |
comment:23
Replying to @kcrisman:
for the record, 2 different copies of ecl.dll in SAGE_ROOT/local/ are created; one in local/lib (and/or local/bin), created from ecl spkg, the other in local/lib/python2.6/site-packages/sage/libs/, which contains Sage/Python interface to ecl (I don't know details about how and when it is built). |
comment:24
Right, and the third one is the one which which yields "No such process". Although just by chance I tried (in
from the import from
works fine. Still going to take a while to track all this down, sigh... What do you think about the possibility that it's just a path problem suggested above? I just don't know enough about how all this works to be sure. |
comment:25
Here's something interesting.
Or maybe it's boring. At any rate, I find this weird. And here is the cygcheck for the offending dll.
That's a lot of things not to find. |
comment:26
Scratch that - in private comm. Dima points out that we should be in the subshell.
But doing it outside its own directory yields the same "could not find" message as before. It only finds it if I'm already in site-packages/sage/. |
Changed work issues from use matching autoconf to none |
comment:110
Done (I'm aware about the not changed date in SPKG.txt but whatever). |
comment:111
Beware with timestamps when patching You must ensure that the timestamp of One solution is to edit the patch file such that |
comment:112
True indeed, doing that now, sorry for being that lame on this one. |
comment:113
Should be ok now (I've even taken the time to actually try to build it (on Linux)). |
Attachment: ecl-12.12.1.p1.diff.gz Spkg diff, for review only. |
comment:114
Grmph, the train's wifi cut me off... Short version: is there anything actually different from the previous spkg that did work? I also can't see any configure changes in the patch, maybe that's a good thing. |
comment:115
Okay, all relevant tests pass with this (and a rebuilt Maxima) on Mac. I say positive review, assuming JP clarifies my dumb comment about configure and he confirms that he fixed the timestamp issue (I think he is saying that he did in comment:112). |
comment:116
The implib.patch I posted here only touches the autotools file (you then need to somehow regenerate the build system, let's say autoreconf -i). I've done this for the spkg, so the one included in the spkg (and in the diff posted here) is the same plus the changes to the build system (after runing autoreconf -i using matching versions of autotools). And I've indeed reordered the spkg's patch hunks so that autotools files are patched before the build system one to ensure that autotools does not decide to regenerate everything on the fly. |
Changed reviewer from Karl-Dieter Crisman to Karl-Dieter Crisman, Jeroen Demeyer |
comment:117
I can no longer check this due to horrible BLODA issues but my comment:115 stands, and if Jeroen agrees that these are stamped in the correct order, then let's get this in, since it does work. |
comment:118
Is it possible one might get a doctest error on this? I did a weird upgrade where I already had this ticket, from 5.6.rc0 to 5.6, and then got this.
Note the one-character difference (on Mac, anyway). Can someone check this? I think it might be due to my having done the upgrade and thus not important. |
comment:119
That's expected, the first patch from #13324 should fix that. |
comment:120
Hmm, that sounds familiar. Great. |
Merged: sage-5.7.beta1 |
Changed upstream from None of the above - read trac for reasoning. to Reported upstream. No feedback yet. |
comment:123
How did you report this? |
comment:124
IIRC this was reported on sourceforge.net where ECL used to be hosted. |
comment:125
well, yes, but it seems to be lost... |
comment:126
At least there is a copy of the discussion on the former ECL list here:
|
comment:127
Could you repost that bug report to upstream? |
comment:128
Done: |
Though the C-library interface to ECL builds on Cygwin, it does not work at all. All tests fail:
The reason of this is a name clash: there are two different libraries called
ecl.dll
.One in
SAGE_LOCAL/lib/
and one inSAGE_LOCAL/lib/python/site-packages/sage/libs/
.It is the second one whose importing fails because it should be linked to the first one, but
cygcheck
shows that this dependency is resolved to itself!This is of course dysfunctional, whence the import failure.
The easiest solution would be to rename
sage/libs/ecl.pyx
to something else, thus avoiding a name clash.The solution proposed here is different and more indirect:
Patch ECL build system so that it follows the name convention proposed by Cygwin.
The shared library itself is now in
SAGE_LOCAL/bin/cygecl.dll
.In addition, an import file is created in
SAGE_LOCAL/lib/libecl.dll.a
.An updated spkg, based on the one in #13324, is available at
http://boxen.math.washington.edu/home/jpflori/ecl-12.12.1.p1.spkg
Reported upstream: https://gitlab.com/embeddable-common-lisp/ecl/issues/235
Depends on #13324
Depends on #13860
Upstream: Reported upstream. No feedback yet.
CC: @mwhansen @dimpase @jpflori @jdemeyer
Component: porting: Cygwin
Keywords: cygwin spkg ecl
Author: Jean-Pierre Flori
Reviewer: Karl-Dieter Crisman, Jeroen Demeyer
Merged: sage-5.7.beta1
Issue created by migration from https://trac.sagemath.org/ticket/9167
The text was updated successfully, but these errors were encountered: