Sage update

Montgomery-Smith, Stephen stephen at
Thu Jan 30 05:32:33 UTC 2014

On 01/29/2014 07:26 PM, Montgomery-Smith, Stephen wrote:
> On 01/29/2014 07:00 PM, Montgomery-Smith, Stephen wrote:
>> I have just updated sage to version 6.0.  I have also made some changes
>> to help it work with FreeBSD-10, using ideas given to me by Daniel
>> Smith.  Since I don't have a fast computer using FreeBSD-10, I would
>> appreciate it if any of you guys could try it out and see if it works.
> I meant math/sage (for those who don't normally use it.)

So I tried it on my slow i386 computer.  It dies on the subpackage
r-3.0.2.p0.  I would be interested if other people are seeing the same

I think it is because in the build, it creates using a command
like this:

cc -std=gnu99 -shared -fopenmp
-Wl,-rpath=/usr/local/lib/gcc46 -L/usr/local/lib/gcc46  -o
CommandLineArgs.o Rdynload.o Renviron.o RNG.o agrep.o apply.o
arithmetic.o array.o attrib.o bind.o builtin.o character.o coerce.o
colors.o complex.o connections.o context.o cum.o dcf.o datetime.o
debug.o deparse.o devices.o dotcode.o dounzip.o dstruct.o duplicate.o
edit.o engine.o envir.o errors.o eval.o format.o gevents.o gram.o
gram-ex.o graphics.o grep.o identical.o inlined.o inspect.o internet.o
iosupport.o lapack.o list.o localecharset.o logic.o main.o mapply.o
match.o memory.o names.o objects.o options.o paste.o platform.o plot.o
plot3d.o plotmath.o print.o printarray.o printvector.o printutils.o
qsort.o random.o raw.o registration.o relop.o rlocale.o saveload.o
scan.o seq.o serialize.o sort.o source.o split.o sprintf.o startup.o
subassign.o subscript.o subset.o summary.o sysutils.o unique.o util.o
version.o vfonts.o xxxpr.o   `ls ../unix/*.o ../appl/*.o ../nmath/*.o`
../extra/zlib/libz.a ../extra/bzip2/libbz2.a ../extra/pcre/libpcre.a
-L/usr/home/stephen/sage/work/sage-6.0/local/lib -lf77blas -latlas
-lgfortran -lm -lquadmath  -lintl -lreadline  -llzma -lrt -lm -liconv

Now -Wl,-rpath is set, so it should find libreadline in
/usr/home/stephen/sage/work/sage-6.0/local/lib.  But instead it finds
libreadline in /lib.  So later when it does the following compilation to
build R.bin:

gcc -std=gnu99 -export-dynamic -fopenmp
-Wl,-rpath=/usr/local/lib/gcc46 -L/usr/local/lib/gcc46 -o R.bin Rmain.o
 -L../../lib -lR comes up with an error saying that rl_sort_completion_matches
isn't found.  And when I do an ldd or "readelf -d" on, I can see
that it is trying to link to the wrong libreadline, and
rl_sort_completion_matches is only defined in the other libreadline.

I tried googling to find a fix.  And it works fine with FreeBSD-8.  This
has me completely stumped.  One web page suggested I added -Wl,-z,origin
to the list of flags when building  But I really don't know
what I am doing.  Anyway, it didn't work.

More information about the freebsd-ports mailing list