1 |
> François, |
2 |
> |
3 |
> Singular -- good. I do get -fPIC compile issues here on my amd64: |
4 |
> |
5 |
> g++ -shared -o libsingular.so \ |
6 |
> libsingular-tesths.o iparith.o mpsr_Tok.o claptmpl.o \ |
7 |
> grammar.o scanner.o attrib.o eigenval_ip.o extra.o fehelp.o |
8 |
> feOpt.o ipassign.o ipconv.o ipid.o iplib.o ipprint.o ipshell.o lists.o |
9 |
> sdb.o fglm.o interpolation.o silink.o subexpr.o janet.o wrapper.o |
10 |
> libparse.o sing_win.o gms.o pcv.o maps_ip.o walk.o walk_ip.o cntrlc.o |
11 |
> misc.o calcSVD.o slInit_Dynamic.o -lkernel -L../kernel -L../factory |
12 |
> -L../libfac |
13 |
> -L/var/tmp/portage/sci-mathematics/sage-singular-3.1.0.4.20100214/work/sing |
14 |
> ular-3-1-0-4-20100214/src/build/opt/sage/local/lib64 -lsingfac -lsingcf |
15 |
> -lntl -lreadline -lgmp -lomalloc |
16 |
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/../../../../x86_64-pc-linux-gnu/bin/ |
17 |
> ld: libsingular-tesths.o: relocation R_X86_64_32 against `a local symbol' |
18 |
> can not be used when making a shared object; recompile with -fPIC |
19 |
> |
20 |
> I've tinkered with this in the past and the following allowed building |
21 |
> to proceed. |
22 |
> |
23 |
> sed -e "s:@CFLAGS@:@CFLAGS@ -fPIC:" -e |
24 |
> "s:@CXXFLAGS@:@CXXFLAGS@ -fPIC:" \ |
25 |
> -i */Makefile.in || die "failed to fix CFLAGS in |
26 |
> Makefile.in files" |
27 |
> sed -e "s:@CFLAGS@:@CFLAGS@ -fPIC:" -e |
28 |
> "s:@CXXFLAGS@:@CXXFLAGS@ -fPIC:" \ |
29 |
> -i factory/GNUmakefile.in || die "failed to fix CFLAGS |
30 |
> in GNUmakefile.in" |
31 |
> sed -e "s:{libdir} \${LIBSINGULAR_LIBS}:{libdir} -Wl,-soname |
32 |
> \${LIBSINGULAR_LIBS}:" \ |
33 |
> -i Singular/Makefile.in || die "failed to fix LDFLAGS |
34 |
> in Makefile.in" |
35 |
> |
36 |
> but this may not be the best way to fix things. I did notice that Sage |
37 |
> builds Singular with -fPIC for all architectures. |
38 |
> |
39 |
Hi Steve, |
40 |
|
41 |
indeed you would! -fPIC is mandatory on amd64 I think. |
42 |
I was concerned that we shouldn't build the binaries or the static libraries |
43 |
with -fPIC. That being said it looks like all those static libraries are |
44 |
useless. |
45 |
|
46 |
Francois |