>> The example is attached as a patch against sage 3.2.3.

I forgot it, sorry.

>> As burcin pointed on IRC, this might have something to do with the
>> fact  that dd_set_global_constant is mangled:
>> nm local/lib/libcdd.a | grep dd_set_global_constants
>> 00000185 T _Z23dd_set_global_constantsv
>
> What's the line in module_list.py that you use for pymcdd?

    Extension('sage.geometry.pymcdd',
              sources = ['sage/geometry/pymcdd.pyx'],
              libraries=['cdd']),

It is also in the patch.

> Does it even explicitly link in cdd??

yes

> Does it use the right language option?

I don't know. My only documentation on this topic is
http://docs.cython.org/docs/source_files_and_compilation.html

-- 
Sébastien Barthélemy

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

# HG changeset patch
# User Sébastien Barthélemy <sebastien.barthel...@gmail.com>
# Date 1232711765 -3600
# Node ID 6013a813c4af012b70e08b1cd32d0c8d42444ffc
# Parent  b0aa7ef45b3ccf27b3a5196a543451335419c4c2
minimalistic example showing runtime linking problems with libcdd

diff -r b0aa7ef45b3c -r 6013a813c4af module_list.py
--- a/module_list.py	Mon Jan 05 23:03:45 2009 -0800
+++ b/module_list.py	Fri Jan 23 12:56:05 2009 +0100
@@ -179,6 +179,16 @@
     Extension('sage.finance.time_series',
               sources = ['sage/finance/time_series.pyx'],
               include_dirs = numpy_include_dirs),
+
+    ################################
+    ## 
+    ## sage.geometry
+    ##
+    ################################
+
+    Extension('sage.geometry.pymcdd',
+              sources = ['sage/geometry/pymcdd.pyx'],
+              libraries=['cdd']),
 
 
     ################################
diff -r b0aa7ef45b3c -r 6013a813c4af sage/geometry/all.py
--- a/sage/geometry/all.py	Mon Jan 05 23:03:45 2009 -0800
+++ b/sage/geometry/all.py	Fri Jan 23 12:56:05 2009 +0100
@@ -1,3 +1,6 @@
+
+import pymcdd
+
 from polytope import polymake
 
 from polyhedra import extreme_verts, ieq_to_vert, vert_to_ieq, Polyhedron, mink_sum, polytopes
diff -r b0aa7ef45b3c -r 6013a813c4af sage/geometry/mcdd.pxd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sage/geometry/mcdd.pxd	Fri Jan 23 12:56:05 2009 +0100
@@ -0,0 +1,5 @@
+cdef extern from "setoper.h":
+    ctypedef unsigned long *set_type
+
+cdef extern from "cdd.h":
+    void dd_set_global_constants()
diff -r b0aa7ef45b3c -r 6013a813c4af sage/geometry/pymcdd.pyx
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sage/geometry/pymcdd.pyx	Fri Jan 23 12:56:05 2009 +0100
@@ -0,0 +1,4 @@
+cimport mcdd
+
+# init global constants
+mcdd.dd_set_global_constants()

Reply via email to