cf_gmp.h fails on Cython file in sage-beta

26 views
Skip to first unread message

john_perry_usm

unread,
Dec 23, 2014, 4:53:03 AM12/23/14
to sage-s...@googlegroups.com
Hello

I tried to attach a Cython file that worked in previous versions of Sage (incl Sage beta 6.4.1) to Sage beta 6.5.1, but it fails:
sage: %attach dynamic_algorithm_with_skeleton.pyx
Compiling ./dynamic_algorithm_with_skeleton.pyx...
Error compiling cython file:
Error compiling ./dynamic_algorithm_with_skeleton.pyx:
running build
running build_ext
building
'_Users_user_common_Research_SAGE_programs_skeleton_dynamic_algorithm_with_skeleton_pyx_0' extension
creating build
creating build
/temp.macosx-10.9-x86_64-2.7
gcc
-fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/sage-6.5.beta1/local/include/singular -I/Applications/sage-6.5.beta1/local/include/csage -I/Applications/sage-6.5.beta1/local/include -I/Applications/sage-6.5.beta1/local/include/python2.7 -I/Applications/sage-6.5.beta1/local/lib/python/site-packages/numpy/core/include -I/Applications/sage-6.5.beta1/src/sage/ext -I/Applications/sage-6.5.beta1/src -I/Applications/sage-6.5.beta1/src/sage/gsl -I. -I/Applications/sage-6.5.beta1/local/include/python2.7 -c _Users_user_common_Research_SAGE_programs_skeleton_dynamic_algorithm_with_skeleton_pyx_0.cpp -o build/temp.macosx-10.9-x86_64-2.7/_Users_user_common_Research_SAGE_programs_skeleton_dynamic_algorithm_with_skeleton_pyx_0.o -w -O2


In file included from /Applications/sage-6.5.beta1/local/include/singular/structs.h:15:0,
                 
from /Applications/sage-6.5.beta1/local/include/libsingular.h:6,
                 
from _Users_user_common_Research_SAGE_programs_skeleton_dynamic_algorithm_with_skeleton_pyx_0.cpp:244:
/Applications/sage-6.5.beta1/local/include/singular/si_gmp.h:5:22: fatal error: cf_gmp.h: No such file or directory
 
#  include <cf_gmp.h>
                     
^
compilation terminated
.
error
: command 'gcc' failed with exit status 1

The Cython file includes the lines (thanks for the help with this a year or two ago!)
# cinclude $SAGE_ROOT/local/include/singular
# clib m readline singular givaro gmpxx gmp

I don't *think* I need gmp anymore, so I removed gmp and gmpxx... only to encounter the same error.

Apparently this looks like an error with Singular that Sage has encountered before (here, here, and here) but the earlier problems were with building Sage from source. At least one problem was fixed in ticket #14737. Has this error returned, or am I doing something wrong?

Volker Braun

unread,
Dec 23, 2014, 11:19:24 AM12/23/14
to sage-s...@googlegroups.com
Considering the location of cf_gmp.h you probably need 

#cinclude $SAGE_ROOT/local/include/factory

john_perry_usm

unread,
Jun 8, 2015, 4:27:46 PM6/8/15
to sage-s...@googlegroups.com
Hello Volker (& others with interest)

I get the same error in Sage 6.7, but this time adding the recommended include directive to the Cython file doesn't work. Error message below, but I note that a workaround (however temporary) is to modify the offending file, si_gmp.h, so that

#  include <cf_gmp.h>

reads instead as
 
#  include <../factory/cf_gmp.h>

In this case it compiles & links just fine.

john perry

Here's that error as I encounter it now:

RuntimeError: Error compiling ./dynamic_algorithm.pyx:
running build
running build_ext
building '_Users_cantanima_common_Research_SAGE_programs_gb_detection_dynamic_algorithm_pyx_1' extension
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/sage-6.7-untouched/local/include/singular -I/Applications/sage-6.7-untouched/local/include/csage -I/Applications/sage-6.7-untouched/local/include -I/Applications/sage-6.7-untouched/local/include/python2.7 -I/Applications/sage-6.7-untouched/local/lib/python/site-packages/numpy/core/include -I/Applications/sage-6.7-untouched/src/sage/ext -I/Applications/sage-6.7-untouched/src -I/Applications/sage-6.7-untouched/src/sage/gsl -I. -I/Applications/sage-6.7-untouched/local/include/python2.7 -c _Users_cantanima_common_Research_SAGE_programs_gb_detection_dynamic_algorithm_pyx_1.cpp -o build/temp.macosx-10.9-x86_64-2.7/_Users_cantanima_common_Research_SAGE_programs_gb_detection_dynamic_algorithm_pyx_1.o -w -O2

In file included from /Applications/sage-6.7-untouched/local/include/singular/structs.h:15:0,
                 from /Applications/sage-6.7-untouched/local/include/libsingular.h:6,
                 from _Users_cantanima_common_Research_SAGE_programs_gb_detection_dynamic_algorithm_pyx_1.cpp:257:
/Applications/sage-6.7-untouched/local/include/singular/si_gmp.h:5:22: fatal error: cf_gmp.h: No such file or directory

john_perry_usm

unread,
Jun 8, 2015, 4:29:53 PM6/8/15
to sage-s...@googlegroups.com
Whoops! I have to walk that back: I was attaching the wrong file! (Ended up in the wrong directory, tab-completion did the rest.) The "include" command does still work.

Sorry for the false alarm,
john perry
Reply all
Reply to author
Forward
0 new messages