Hello,

as discussed with sleep deprived guys on IRC, I'm having trouble
binding libcdd.a. I designed a minimalistic example that show my
problem. It builds fine, but fails at sage startup (during import)
with the following error:
ImportError: 
/usr/local/sage/local/lib/python2.5/site-packages/sage/geometry/pymcdd.so:
undefined symbol: dd_set_global_constants

The example is attached as a patch against sage 3.2.3.

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

However, I don't know how I should interpret it... I would be very
glad if someone had look at this.

Thanks !

Sebastien




 Here are the logs from the build and the import.

## building ##################################################################
$ sage -b

----------------------------------------------------------
sage: Building and installing modified Sage library files.


Installing c_lib
scons: `install' is up to date.
Updating Cython code....
Building sage/geometry/pymcdd.pyx because it depends on sage/geometry/mcdd.pxd.
python2.5 `which cython` --embed-positions --incref-local-binop
-I/usr/local/sage/devel/sage-mcdd -o sage/geometry/pymcdd.c
sage/geometry/pymcdd.pyx
sage/geometry/pymcdd.pyx -->
/usr/local/sage/local//lib/python/site-packages//sage/geometry/pymcdd.pyx
Time to execute 1 commands: 0.175110816956 seconds
Finished compiling Cython code (time = 0.968145847321 seconds)
running install
running build
running build_py
running build_ext
building 'sage.geometry.pymcdd' extension
gcc -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall
-Wstrict-prototypes -fPIC -I/usr/local/sage/local//include
-I/usr/local/sage/local//include/csage
-I/usr/local/sage/devel//sage/sage/ext
-I/usr/local/sage/local/include/python2.5 -c sage/geometry/pymcdd.c -o
build/temp.linux-i686-2.5/sage/geometry/pymcdd.o -w
gcc -pthread -shared build/temp.linux-i686-2.5/sage/geometry/pymcdd.o
-L/usr/local/sage/local//lib -lcsage -lcdd -lstdc++ -lntl -o
build/lib.linux-i686-2.5/sage/geometry/pymcdd.so
running build_scripts
running install_lib
copying build/lib.linux-i686-2.5/sage/geometry/all.py ->
/usr/local/sage/local/lib/python2.5/site-packages/sage/geometry
copying build/lib.linux-i686-2.5/sage/geometry/pymcdd.so ->
/usr/local/sage/local/lib/python2.5/site-packages/sage/geometry
byte-compiling 
/usr/local/sage/local/lib/python2.5/site-packages/sage/geometry/all.py
to all.pyc
running install_scripts
changing mode of /usr/local/sage/local/bin/dsage_worker.py to 755
changing mode of /usr/local/sage/local/bin/spkg-debian-maybe to 755
changing mode of /usr/local/sage/local/bin/dsage_setup.py to 755
running install_data
running install_egg_info
Removing 
/usr/local/sage/local/lib/python2.5/site-packages/sage-0.0.0-py2.5.egg-info
Writing 
/usr/local/sage/local/lib/python2.5/site-packages/sage-0.0.0-py2.5.egg-info

real    0m3.423s
user    0m2.204s
sys     0m0.444s

## running sage
###################################################################
$ sage
----------------------------------------------------------------------
| Sage Version 3.2.3, Release Date: 2009-01-05                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

**********************************************************************
WARNING!  This Sage install was built on a machine that supports
instructions that are not available on this computer.  Sage will
likely fail with ILLEGAL INSTRUCTION errors! The following processor
flags were on the build machine but are not on this computer:

sse4_1

Email http://groups.google.com/group/sage-support for help.
**********************************************************************
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

/usr/local/sage/local/lib/python2.5/site-packages/IPython/ipmaker.pyc
in force_import(modname)
    64         reload(sys.modules[modname])
    65     else:
---> 66         __import__(modname)
    67
    68

/usr/local/sage/local/bin/ipy_profile_sage.py in <module>()
     5     preparser(True)
     6
----> 7     import sage.all_cmdline
     8     sage.all_cmdline._init_cmdline(globals())
     9

/usr/local/sage/local/lib/python2.5/site-packages/sage/all_cmdline.py
in <module>()
    12 try:
    13
---> 14     from sage.all import *
    15     from sage.calculus.predefined import x
    16     preparser(on=True)

/usr/local/sage/local/lib/python2.5/site-packages/sage/all.py in <module>()
   107 from sage.lfunctions.all import *
   108
--> 109 from sage.geometry.all   import *
   110
   111 from sage.quadratic_forms.all import *

/usr/local/sage/local/lib/python2.5/site-packages/sage/geometry/all.py
in <module>()
     1
----> 2
     3 import pymcdd
     4
     5 from polytope import polymake
     6

ImportError: 
/usr/local/sage/local/lib/python2.5/site-packages/sage/geometry/pymcdd.so:
undefined symbol: dd_set_global_constants
Error importing ipy_profile_sage - perhaps you should run %upgrade?
WARNING: Loading of ipy_profile_sage failed.

sage:
##########################################################################################

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to