Hi, 

I have code on https://github.com/okazymyrov/sbox. It works fine with sage 
7.1 . However, in SageMath 8.1 I get warnings like:
/Users/okazymyrov/bin/sage8.1/local/lib/python2.7/site-packages/sage/misc/
cython.py:313: DeprecationWarning: the Sage-specific Cython pragma '#clang' 
is deprecated;
use '# distutils: language' instead
but the code is running. When I change "# cfile 
/Users/okazymyrov/Downloads/sbox/C/CI.c" to "# distutils: sources = 
/Users/okazymyrov/Downloads/sbox/C/CI.c" in Cython/CFunc.spyx 
<https://github.com/okazymyrov/sbox/blob/master/Cython/CFunc.spyx> I get 
the error 
Compiling /Users/okazymyrov/Downloads/sbox/Sage/../Cython/CFunc.spyx...
/Users/okazymyrov/bin/sage8.1/local/lib/python2.7/site-packages/sage/misc/cython.py:322:
 
DeprecationWarning: the Sage-specific Cython pragma '#cfile' is deprecated;
use '# distutils: sources' instead
See http://trac.sagemath.org/24105 for details.
  additional_source_files, s = _parse_keywords('cfile', s)
Traceback (most recent call last):
  File "./Main.sage.py", line 27, in <module>
    load("./TestFunctions.sage")
  File "sage/structure/sage_object.pyx", line 1057, in 
sage.structure.sage_object.load 
(build/cythonized/sage/structure/sage_object.c:12915)
  File 
"/Users/okazymyrov/bin/sage8.1/local/lib/python2.7/site-packages/sage/repl/load.py",
 
line 247, in load
    exec(preparse_file(open(fpath).read()) + "\n", globals)
  File "<string>", line 21, in <module>
  File "sage/structure/sage_object.pyx", line 1057, in 
sage.structure.sage_object.load 
(build/cythonized/sage/structure/sage_object.c:12915)
  File 
"/Users/okazymyrov/bin/sage8.1/local/lib/python2.7/site-packages/sage/repl/load.py",
 
line 247, in load
    exec(preparse_file(open(fpath).read()) + "\n", globals)
  File "<string>", line 41, in <module>
  File "sage/structure/sage_object.pyx", line 1057, in 
sage.structure.sage_object.load 
(build/cythonized/sage/structure/sage_object.c:12915)
  File 
"/Users/okazymyrov/bin/sage8.1/local/lib/python2.7/site-packages/sage/repl/load.py",
 
line 251, in load
    exec(load_cython(fpath), globals)
  File "<string>", line 1, in <module>
ImportError: 
dlopen(/Users/okazymyrov/.sage/temp/hamsin.local/37857/spyx/_Users_okazymyrov_Downloads_sbox_Cython_CFunc_spyx/_Users_okazymyrov_Downloads_sbox_Cython_CFunc_spyx_0.so,
 
2): Symbol not found: _CI
  Referenced from: 
/Users/okazymyrov/.sage/temp/hamsin.local/37857/spyx/_Users_okazymyrov_Downloads_sbox_Cython_CFunc_spyx/_Users_okazymyrov_Downloads_sbox_Cython_CFunc_spyx_0.so
  Expected in: flat namespace
 in 
/Users/okazymyrov/.sage/temp/hamsin.local/37857/spyx/_Users_okazymyrov_Downloads_sbox_Cython_CFunc_spyx/_Users_okazymyrov_Downloads_sbox_Cython_CFunc_spyx_0.soe
 
here...

The load sequence is the following:

   1. Main.sage loads Sbox.sage
   2. Sbox.sage loads CFunc.spyx
   3. CFunc.spyx must be compiled with other C files located in ./C 

System info:
bash-3.2$ sage --version
SageMath version 8.1, Release Date: 2017-12-07
bash-3.2$ uname -a
Darwin hamsin.local 17.5.0 Darwin Kernel Version 17.5.0: Mon Mar  5 
22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64 x86_64

Might it be a bug in the Cython parse class?

Kind regards,
Oleksandr

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to