On Aug 24, 11:41 pm, Robert Bradshaw <rober...@math.washington.edu> wrote:
> I think you can still get an -fPIC libgmp.a directly from the same .o > files that the libgmp.so uses. Have you tried just adding that flag > to mpir's make file? yes. You should look at their makefile. The following commands get executed when I do a "make libmpir.la", which seems to create all libraries involved: /bin/sh ./libtool --tag=CC --mode=link gcc -std=gnu99 -fPIC -o libmpir.la -rpath /usr/local/sage/4.1.1/local/lib -version-info 7:4:4 [[a whole bunch of .lo files]] [libmpir.la is a text file. It says it shouldn't be deleted, but I don't see how it influences any linking] gcc -std=gnu99 -shared [[a whole bunch of .o files]] -Wl,-soname - Wl,libmpir.so.3 -o .libs/libmpir.so.3.4.4 [so yes, the .so is created from .o files] [it says "copying selected object files to avoid basename conflicts..."] [a whole bunch of temporary renames of .o files] ar cq .libs/libmpir.a [[a whole bunch of .o files (included renamed ones)]] ranlib .libs/libmpir.a as expected, the static library get made by just "ar" and "ranlib". No place to inject an -fPIC An interesting quote from their makefile: # In libtool 1.5 it doesn't work to build libmpir.la from the convenience # libraries like mpz/libmpz.la. Or rather it works, but it ends up putting # PIC objects into libmpir.a if shared and static are both built. (The PIC # objects go into mpz/.libs/libmpz.a, and thence into .libs/ libmpir.a.) # # For now the big lists of objects above are used. Something like mpz/ *.lo # would probably work, but might risk missing something out or getting # something extra. The source files for each .lo are listed in the # Makefile.am's in the subdirectories. # # Currently, for libmpir, unlike libmp below, we're not using # -export-symbols, since the tune and speed programs, and perhaps some of # the test programs, want to access undocumented symbols. so, at some point they succeeded exactly in building the kind of libmpir.a that we are after. I have a lot of respect for people who can find their way around these build processes. There doesn't seem to be any documentation available. I'll just have to hope that someone can hand me an appropriate library, at some point. Thanks for the help. At least we got the pexect interface with maxima sped up a bit. --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an 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 -~----------~----~----~----~------~----~------~--~---