Opened 7 years ago

Closed 7 years ago

#13351 closed defect (fixed)

Cannot import sage.libs.lcalc.lcalc_Lfunction

Reported by: jpflori Owned by: tbd
Priority: major Milestone: sage-5.9
Component: porting: Cygwin Keywords: cygwin spkg lcalc
Cc: kcrisman, dimpase Merged in: sage-5.9.beta0
Authors: Jean-Pierre Flori Reviewers: Dmitrii Pasechnik
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jpflori)

Cygchecking the package shows that it looks for an inexistent libLfunction.so. Indeed, this file is moved to libLfunction.dll on Cygwin to let Sage build. But at runtime, it is the original .so file which is looked for (surely some DT_SONAME equivalent). Letting libLfunction.so in place and symlinking it from libLfunction.dll seems more functional.

A better solution would to tell lcalc to build directly a .dll file on Cygwin (and .dylib on Mac OS X, etc.). Updated spkg doing so at http://perso.telecom-paristech.fr/~flori/sage/lcalc-1.23.p11.spkg or http://www.infres.enst.fr/~flori/sage/lcalc-1.23.p11.spkg

Apply trac_13351.patch

Attachments (2)

trac_13351.patch (767 bytes) - added by jpflori 7 years ago.
lcalc.diff (17.8 KB) - added by jpflori 7 years ago.
Spkg diff, for review only.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 7 years ago by jpflori

Update lcalc spkg, modifying lot of the Makefile (that we already modify and which is not that nice) available at http://perso.telecom-paristech.fr/~flori/sage/lcalc-1.23.p11.spkg

This will also need a Sage library patch.

Changed 7 years ago by jpflori

Changed 7 years ago by jpflori

Spkg diff, for review only.

comment:2 Changed 7 years ago by jpflori

  • Authors set to Jean-Pierre Flori
  • Description modified (diff)
  • Status changed from new to needs_review

comment:3 Changed 7 years ago by jpflori

  • Description modified (diff)

comment:4 Changed 7 years ago by kcrisman

Does this fix #9165?

comment:5 Changed 7 years ago by jpflori

No idea :) give it a try.

comment:6 Changed 7 years ago by jpflori

  • Cc kcrisman dimpase added

comment:7 follow-up: Changed 7 years ago by jpflori

I think its the last ticket needed to correctly build Sage and get a working version except for a few doctests. It would be great to have it for 5.8, nobody wants to have a look?

comment:8 Changed 7 years ago by kcrisman

I'm sorry, Jean-Pierre - I agree, but I simply have had no time at work to deal with my XP box (esp. since the 32-bit issue apparently is preventing proper rebasing, as discussed somewhere). I hope to try again over spring break in a couple weeks.

comment:9 in reply to: ↑ 7 Changed 7 years ago by dimpase

Replying to jpflori:

I think its the last ticket needed to correctly build Sage and get a working version except for a few doctests. It would be great to have it for 5.8, nobody wants to have a look?

I'm away at a conference, and don't have access to a WIndows machine, until Sunday. And then I'll have jetlag :-) So it has to wait for few days, sorry.

comment:10 Changed 7 years ago by jpflori

No hurry, it's just that its been rottijg around for some monthes, so Id like to get it ressurected :)

comment:11 follow-up: Changed 7 years ago by dimpase

I still get import problems:

$ ./sage -t -long devel/sage/sage/libs/lcalc/
sage -t -long "devel/sage/sage/libs/lcalc/lcalc_Lfunction.pyx"
**********************************************************************
File "/usr/local/src/sage/sage-5.7.beta2/devel/sage/sage/libs/lcalc/lcalc_Lfunction.pyx", l 55:
    sage: from sage.libs.lcalc.lcalc_Lfunction import *
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/src/sage/sage-5.7.beta2/local/bin/ncadoctest.py", line 1231, in run__test
        self.run_one_example(test, example, filename, compileflags)
      File "/usr/local/src/sage/sage-5.7.beta2/local/bin/sagedoctest.py", line 38, in run_oexample
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/usr/local/src/sage/sage-5.7.beta2/local/bin/ncadoctest.py", line 1172, in run__example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_1[2]>", line 1, in <module>
        from sage.libs.lcalc.lcalc_Lfunction import *###line 55:
    sage: from sage.libs.lcalc.lcalc_Lfunction import *
    ImportError: No such file or directory

etc etc etc

indeed:

sage: import sage.libs.lcalc.lcalc_Lfunction
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-a629fe51f139> in <module>()
----> 1 import sage.libs.lcalc.lcalc_Lfunction

ImportError: No such file or directory
sage:

note that

sage: import sage.libs.lcalc

works.

comment:12 Changed 7 years ago by dimpase

  • Status changed from needs_review to needs_work

comment:13 in reply to: ↑ 11 Changed 7 years ago by jpflori

Replying to dimpase:

I still get import problems:

$ ./sage -t -long devel/sage/sage/libs/lcalc/
sage -t -long "devel/sage/sage/libs/lcalc/lcalc_Lfunction.pyx"
**********************************************************************
File "/usr/local/src/sage/sage-5.7.beta2/devel/sage/sage/libs/lcalc/lcalc_Lfunction.pyx", l 55:
    sage: from sage.libs.lcalc.lcalc_Lfunction import *
Exception raised:
    Traceback (most recent call last):
      File "/usr/local/src/sage/sage-5.7.beta2/local/bin/ncadoctest.py", line 1231, in run__test
        self.run_one_example(test, example, filename, compileflags)
      File "/usr/local/src/sage/sage-5.7.beta2/local/bin/sagedoctest.py", line 38, in run_oexample
        OrigDocTestRunner.run_one_example(self, test, example, filename, compileflags)
      File "/usr/local/src/sage/sage-5.7.beta2/local/bin/ncadoctest.py", line 1172, in run__example
        compileflags, 1) in test.globs
      File "<doctest __main__.example_1[2]>", line 1, in <module>
        from sage.libs.lcalc.lcalc_Lfunction import *###line 55:
    sage: from sage.libs.lcalc.lcalc_Lfunction import *
    ImportError: No such file or directory

etc etc etc

indeed:

sage: import sage.libs.lcalc.lcalc_Lfunction
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-a629fe51f139> in <module>()
----> 1 import sage.libs.lcalc.lcalc_Lfunction

ImportError: No such file or directory
sage:

Did you install the patch to the Sage library and rebuilt it as well?

note that

sage: import sage.libs.lcalc

works.

That's expected, this file is not touched and does not depend on the spkg.

comment:14 follow-up: Changed 7 years ago by dimpase

yes, I certainly applied trac_13351.patch and ran sage -b. (on 5.7.beta2, but I guess it should not matter).

comment:15 in reply to: ↑ 14 Changed 7 years ago by dimpase

  • Status changed from needs_work to positive_review

Replying to dimpase:

yes, I certainly applied trac_13351.patch and ran sage -b. (on 5.7.beta2, but I guess it should not matter).

what happened is that the Python extension didn't get rebuilt, as the patch didn't touch the corresponding pyx file! So I touched this file, and now everything works. Positive review.

comment:16 Changed 7 years ago by jdemeyer

  • Milestone changed from sage-5.8 to sage-5.9
  • Reviewers set to Dmitrii Pasechnik

comment:17 Changed 7 years ago by kcrisman

It works on XP too!

comment:18 Changed 7 years ago by jdemeyer

  • Merged in set to sage-5.9.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.