Gentoo Archives: gentoo-science

From: Steven Trogdon <strogdon@×××××.edu>
To: gentoo-science@l.g.o
Subject: Re: [gentoo-science] sage-singular
Date: Mon, 12 Apr 2010 20:24:37
Message-Id: 1271103769.7325.3@ledaig
In Reply to: Re: [gentoo-science] sage-singular by "François Bissey"
1 On 04/12/10 - 14:22:30, François Bissey wrote:
2 > > François,
3 > >
4 > > Singular -- good. I do get -fPIC compile issues here on my amd64:
5 > >
6 > > g++ -shared -o libsingular.so \
7 > > libsingular-tesths.o iparith.o mpsr_Tok.o claptmpl.o \
8 > > grammar.o scanner.o attrib.o eigenval_ip.o extra.o fehelp.o
9 > > feOpt.o ipassign.o ipconv.o ipid.o iplib.o ipprint.o ipshell.o
10 > lists.o
11 > > sdb.o fglm.o interpolation.o silink.o subexpr.o janet.o wrapper.o
12 > > libparse.o sing_win.o gms.o pcv.o maps_ip.o walk.o walk_ip.o
13 > cntrlc.o
14 > > misc.o calcSVD.o slInit_Dynamic.o -lkernel -L../kernel -L../factory
15 > > -L../libfac
16 > >
17 > -L/var/tmp/portage/sci-mathematics/sage-singular-3.1.0.4.20100214/work/sing
18 > > ular-3-1-0-4-20100214/src/build/opt/sage/local/lib64 -lsingfac
19 > -lsingcf
20 > > -lntl -lreadline -lgmp -lomalloc
21 > >
22 > /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.4/../../../../x86_64-pc-linux-gnu/bin/
23 > > ld: libsingular-tesths.o: relocation R_X86_64_32 against `a local
24 > symbol'
25 > > can not be used when making a shared object; recompile with -fPIC
26 > >
27 > > I've tinkered with this in the past and the following allowed
28 > building
29 > > to proceed.
30 > >
31 > > sed -e "s:@CFLAGS@:@CFLAGS@ -fPIC:" -e
32 > > "s:@CXXFLAGS@:@CXXFLAGS@ -fPIC:" \
33 > > -i */Makefile.in || die "failed to fix CFLAGS in
34 > > Makefile.in files"
35 > > sed -e "s:@CFLAGS@:@CFLAGS@ -fPIC:" -e
36 > > "s:@CXXFLAGS@:@CXXFLAGS@ -fPIC:" \
37 > > -i factory/GNUmakefile.in || die "failed to fix
38 > CFLAGS
39 > > in GNUmakefile.in"
40 > > sed -e "s:{libdir} \${LIBSINGULAR_LIBS}:{libdir}
41 > -Wl,-soname
42 > > \${LIBSINGULAR_LIBS}:" \
43 > > -i Singular/Makefile.in || die "failed to fix
44 > LDFLAGS
45 > > in Makefile.in"
46 > >
47 > > but this may not be the best way to fix things. I did notice that
48 > Sage
49 > > builds Singular with -fPIC for all architectures.
50 > >
51 > Hi Steve,
52 >
53 > indeed you would! -fPIC is mandatory on amd64 I think.
54 > I was concerned that we shouldn't build the binaries or the static
55 > libraries
56 > with -fPIC. That being said it looks like all those static libraries
57 > are
58 > useless.
59 >
60 > Francois
61 >
62
63 François,
64
65 Just for reference, adding the -fPIC does allow building of
66 sage-singular here. But sage will not install -- it can't find
67 libsingular.so. I've gotten a similar error in attempts to remove
68 Singular entirely. Sage appears to be very possessive of Singular.
69
70 Steve

Replies

Subject Author
Re: [gentoo-science] sage-singular "François Bissey" <f.r.bissey@×××××××××.nz>
Re: [gentoo-science] sage-singular "François Bissey" <f.r.bissey@×××××××××.nz>