源码地址:
http://www.jasoncantarella.com/wordpress/software/plcurve/
版本为 7.4.1
问题:
下载后,./configure 编译,提示缺少gsl包
gsl安装成功,再次编译,成功
然后make时报错
错误信息:
[1/5] Cythonizing /home/sun/Downloads/libplcurve-7.4.1/pysrc/libpl/pdcode/components.pyx
[2/5] Cythonizing /home/sun/Downloads/libplcurve-7.4.1/pysrc/libpl/pdcode/diagram.pyx
Error compiling Cython file:
------------------------------------------------------------
...
import weakref
from .pdisomorphism cimport (
pd_iso_t, pd_build_diagram_isotopies,
pd_build_isos, pd_build_map_isomorphisms)
from .isomorphism cimport PlanarIsomorphism
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:21:0: 'libpl/pdcode/isomorphism.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
import weakref
from .pdisomorphism cimport (
pd_iso_t, pd_build_diagram_isotopies,
pd_build_isos, pd_build_map_isomorphisms)
from .isomorphism cimport PlanarIsomorphism
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:21:0: 'libpl/pdcode/isomorphism/PlanarIsomorphism.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from .pdisomorphism cimport (
pd_iso_t, pd_build_diagram_isotopies,
pd_build_isos, pd_build_map_isomorphisms)
from .isomorphism cimport PlanarIsomorphism
from .pd_invariants cimport *
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:22:0: 'libpl/pdcode/pd_invariants.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
from .plctopology cimport *
from .components cimport *
from .homfly cimport *
from .planarmap cimport *
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:28:0: 'libpl/pdcode/planarmap.pxd' not found
Error compiling Cython file:
------------------------------------------------------------
...
never have precisely 1 component.
:type dia_type: str or None
"""
import os
cdef pmMap plmap
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1300:13: 'pmMap' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
:type dia_type: str or None
"""
import os
cdef pmMap plmap
cdef pmSize size
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1301:13: 'pmSize' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
"""
import os
cdef pmMap plmap
cdef pmSize size
cdef pmMethod meth
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1302:13: 'pmMethod' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
import os
cdef pmMap plmap
cdef pmSize size
cdef pmMethod meth
cdef pmMemory mem
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1303:13: 'pmMemory' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
import os
cdef pmMap plmap
cdef pmSize size
cdef pmMethod meth
cdef pmMemory mem
cdef pm_edge *cur_e
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1304:13: 'pm_edge' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef pmMap plmap
cdef pmSize size
cdef pmMethod meth
cdef pmMemory mem
cdef pm_edge *cur_e
cdef pm_vertex *cur_v
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1305:13: 'pm_vertex' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef pd_iso_t **isos
isos = pd_build_diagram_isotopies(self.p, other_pd.p, &nisos)
ret = tuple(PlanarIsomorphism() for _ in range(nisos))
for i in range(nisos):
(<PlanarIsomorphism>ret[i]).p = isos[i]
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:296:14: 'PlanarIsomorphism' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef pd_iso_t **isos
isos = pd_build_diagram_isotopies(self.p, other_pd.p, &nisos)
ret = tuple(PlanarIsomorphism() for _ in range(nisos))
for i in range(nisos):
(<PlanarIsomorphism>ret[i]).p = isos[i]
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:296:48: Cannot convert 'pd_iso_t *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
cdef pd_iso_t **isos
isos = pd_build_map_isomorphisms(self.p, other_pd.p, &nisos)
ret = tuple(PlanarIsomorphism() for _ in range(nisos))
for i in range(nisos):
(<PlanarIsomorphism>ret[i]).p = isos[i]
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:307:14: 'PlanarIsomorphism' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef pd_iso_t **isos
isos = pd_build_map_isomorphisms(self.p, other_pd.p, &nisos)
ret = tuple(PlanarIsomorphism() for _ in range(nisos))
for i in range(nisos):
(<PlanarIsomorphism>ret[i]).p = isos[i]
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:307:48: Cannot convert 'pd_iso_t *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
cdef pd_iso_t **isos
isos = pd_build_isos(self.p, other_pd.p, &nisos)
ret = tuple(PlanarIsomorphism() for _ in range(nisos))
for i in range(nisos):
(<PlanarIsomorphism>ret[i]).p = isos[i]
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:321:14: 'PlanarIsomorphism' is not a type identifier
Error compiling Cython file:
------------------------------------------------------------
...
cdef pd_iso_t **isos
isos = pd_build_isos(self.p, other_pd.p, &nisos)
ret = tuple(PlanarIsomorphism() for _ in range(nisos))
for i in range(nisos):
(<PlanarIsomorphism>ret[i]).p = isos[i]
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:321:48: Cannot convert 'pd_iso_t *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
"""
return pd_unsigned_linking_number(self.p, c1, c2)
def interlaced_crossings(self):
cdef int i
cdef int *c_ret = pd_interlaced_crossings(self.p)
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:978:49: undeclared name not builtin: pd_interlaced_crossings
Error compiling Cython file:
------------------------------------------------------------
...
"""
return pd_unsigned_linking_number(self.p, c1, c2)
def interlaced_crossings(self):
cdef int i
cdef int *c_ret = pd_interlaced_crossings(self.p)
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:978:54: Cannot convert 'pd_code_t *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
"""
return pd_unsigned_linking_number(self.p, c1, c2)
def interlaced_crossings(self):
cdef int i
cdef int *c_ret = pd_interlaced_crossings(self.p)
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:978:49: Cannot convert Python object to 'int *'
Error compiling Cython file:
------------------------------------------------------------
...
"""
return pd_unsigned_linking_number(self.p, c1, c2)
def interlaced_crossings(self):
cdef int i
cdef int *c_ret = pd_interlaced_crossings(self.p)
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:978:13: Storing unsafe C derivative of temporary Python reference
Error compiling Cython file:
------------------------------------------------------------
...
free(c_ret)
return ret
def interlaced_crossings_unsigned(self):
cdef int i
cdef unsigned int *c_ret = pd_interlaced_crossings_unsigned(self.p)
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:985:67: undeclared name not builtin: pd_interlaced_crossings_unsigned
Error compiling Cython file:
------------------------------------------------------------
...
free(c_ret)
return ret
def interlaced_crossings_unsigned(self):
cdef int i
cdef unsigned int *c_ret = pd_interlaced_crossings_unsigned(self.p)
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:985:72: Cannot convert 'pd_code_t *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
free(c_ret)
return ret
def interlaced_crossings_unsigned(self):
cdef int i
cdef unsigned int *c_ret = pd_interlaced_crossings_unsigned(self.p)
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:985:67: Cannot convert Python object to 'unsigned int *'
Error compiling Cython file:
------------------------------------------------------------
...
free(c_ret)
return ret
def interlaced_crossings_unsigned(self):
cdef int i
cdef unsigned int *c_ret = pd_interlaced_crossings_unsigned(self.p)
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:985:13: Storing unsafe C derivative of temporary Python reference
Error compiling Cython file:
------------------------------------------------------------
...
size.f = 0 # #faces
size.r = 0 # #"red"
size.g = 0 # #"green"
size.d = 0 # something to do with degree on other types of maps
size.t = 0 # allowed error on size
size.dgArr = NULL
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1316:21: Cannot convert 'void *' to Python object
Error compiling Cython file:
------------------------------------------------------------
...
meth.core = 0
meth.pic = 0
meth.seed = int(os.urandom(5).encode('hex'), 16) # TODO: Make randomish, 0 for testing
meth.verbose = 0
if not pmInitRND(&meth):
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1343:24: undeclared name not builtin: pmInitRND
Error compiling Cython file:
------------------------------------------------------------
...
meth.seed = int(os.urandom(5).encode('hex'), 16) # TODO: Make randomish, 0 for testing
meth.verbose = 0
if not pmInitRND(&meth):
raise Exception("Failure during init RND")
if not pmSetParameters(&size, &meth):
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1345:30: undeclared name not builtin: pmSetParameters
Error compiling Cython file:
------------------------------------------------------------
...
raise Exception("Failure during set size")
att_N = 0
while (pd == NULL or
(pd != NULL and (n_components is not None and n_components != pd.ncomps))):
if not pmMemoryInit(&size, &meth, &mem):
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1351:31: undeclared name not builtin: pmMemoryInit
Error compiling Cython file:
------------------------------------------------------------
...
att_N = 0
while (pd == NULL or
(pd != NULL and (n_components is not None and n_components != pd.ncomps))):
if not pmMemoryInit(&size, &meth, &mem):
raise Exception("Failure during memory init")
if not pmExtendMemory(&size, &meth, &mem, 0):
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1353:33: undeclared name not builtin: pmExtendMemory
Error compiling Cython file:
------------------------------------------------------------
...
(pd != NULL and (n_components is not None and n_components != pd.ncomps))):
if not pmMemoryInit(&size, &meth, &mem):
raise Exception("Failure during memory init")
if not pmExtendMemory(&size, &meth, &mem, 0):
raise Exception("Failure during memory extend")
if not pmPlanMap(&size, &meth, &mem, &plmap):
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1355:28: undeclared name not builtin: pmPlanMap
Error compiling Cython file:
------------------------------------------------------------
...
pos += 1
e_idx = abs(cur_e.label)-1
pd.cross[v_idx].edge[pos] = e_idx
#print cur_e.label
while cur_v.next_v != NULL:
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1383:31: Invalid types for '!=' (Python object, void *)
Error compiling Cython file:
------------------------------------------------------------
...
cur_e = cur_e.next_e
pos += 1
e_idx = abs(cur_e.label)-1
pd.cross[v_idx].edge[pos] = e_idx
#print cur_e.label
pmFreeMap(&plmap)
^
------------------------------------------------------------
libpl/pdcode/diagram.pyx:1398:21: undeclared name not builtin: pmFreeMap
Traceback (most recent call last):
File "./setup.py", line 122, in <module>
ext_modules=yes_or_no_cythonize(EXTENSIONS),
File "/usr/local/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 912, in cythonize
cythonize_one(*args)
File "/usr/local/lib/python2.7/dist-packages/Cython/Build/Dependencies.py", line 1034, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: /home/sun/Downloads/libplcurve-7.4.1/pysrc/libpl/pdcode/diagram.pyx
Makefile:507: recipe for target 'all-local' failed
make[3]: *** [all-local] Error 1
make[3]: Leaving directory '/home/sun/Downloads/libplcurve-7.4.1/pysrc'
Makefile:305: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/sun/Downloads/libplcurve-7.4.1/pysrc'
Makefile:488: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/sun/Downloads/libplcurve-7.4.1'
Makefile:398: recipe for target 'all' failed
make: *** [all] Error 2
Satu pakej kurang bergantung