#17484: Use distutils to compile libcsage
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-6.5
Component: build | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers: Volker Braun
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/17484 | c7ef0090892d07ecdd759efca3400438b73b5bec
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by fbissey):
I did change the patch a little bit to allow for building against
uninstalled libcsage
{{{
+for m in cython_modules:
+ # Add csage as first library for all Cython extensions.
+ # The order is important, in particular for Cygwin.
+ m.libraries = ['csage'] + m.libraries
+ # For sage-on-gentoo we need to be able to compile against an
uninstalled libcsage
+ m.library_dirs= m.library_dirs + [os.path.join(SAGE_SRC, 'build',
'lib')]
}}}
But I got something strange at install time. And install_system_lib
doesn't respect "--root=" argument for setup.py which is also not good.
I am trying a vanilla build on OS X (yosemite) - with your original patch
- and it fails
{{{
creating
build/temp.macosx-10.9-x86_64-2.7/build/cythonized/sage/algebras/letterplace
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-I/Users/fbissey/build/sage-6.5.beta3/local/include/singular
-I/Users/fbissey/build/sage-6.5.beta3/local/include/factory
-I/Users/fbissey/build/sage-6.5.beta3/local/include
-I/Users/fbissey/build/sage-6.5.beta3/src
-I/Users/fbissey/build/sage-6.5.beta3/src/c_lib/include
-I/Users/fbissey/build/sage-6.5.beta3/src/sage/ext
-I/Users/fbissey/build/sage-6.5.beta3/local/include/python2.7 -c
build/cythonized/sage/algebras/letterplace/free_algebra_letterplace.cpp -o
build/temp.macosx-10.9-x86_64-2.7/build/cythonized/sage/algebras/letterplace/free_algebra_letterplace.o
-fno-strict-aliasing -w
g++ -bundle -undefined dynamic_lookup
-L/Users/fbissey/build/sage-6.5.beta3/local/lib
build/temp.macosx-10.9-x86_64-2.7/build/cythonized/sage/algebras/letterplace/free_algebra_letterplace.o
-L/Users/fbissey/build/sage-6.5.beta3/local/lib
-L/Users/fbissey/build/sage-6.5.beta3/local/lib -lcsage -lsingular -lflint
-lntl -lgmpxx -lgmp -lreadline -lm -lstdc++ -o
build/lib.macosx-10.9-x86_64-2.7/sage/algebras/letterplace/free_algebra_letterplace.so
ld: can't link with bundle (MH_BUNDLE) only dylibs (MH_DYLIB) file
'/Users/fbissey/build/sage-6.5.beta3/local/lib/libcsage.so' for
architecture x86_64
collect2: error: ld returned 1 exit status
gcc -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall
-I/Users/fbissey/build/sage-6.5.beta3/local/include/singular
-I/Users/fbissey/build/sage-6.5.beta3/local/include/factory
-I/Users/fbissey/build/sage-6.5.beta3/local/include
-I/Users/fbissey/build/sage-6.5.beta3/src
-I/Users/fbissey/build/sage-6.5.beta3/src/c_lib/include
-I/Users/fbissey/build/sage-6.5.beta3/src/sage/ext
-I/Users/fbissey/build/sage-6.5.beta3/local/include/python2.7 -c
build/cythonized/sage/algebras/letterplace/free_algebra_element_letterplace.cpp
-o
build/temp.macosx-10.9-x86_64-2.7/build/cythonized/sage/algebras/letterplace/free_algebra_element_letterplace.o
-fno-strict-aliasing -w
error: command 'g++' failed with exit status 1
}}}
I'll look at how libcsage.dylib was linked earlier but I suspect it was
given a wrong "type" (bundle instead of dylib).
--
Ticket URL: <http://trac.sagemath.org/ticket/17484#comment:20>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" 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 http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.