Help needed porting eclib (#10993)

7 views
Skip to first unread message

Jeroen Demeyer

unread,
Feb 10, 2012, 4:29:44 PM2/10/12
to sage-devel, sage-nt
Could somebody with some knowledge of porting (in particular to Solaris)
have a look at ticket #10993? It's about upgrading the eclib spkg, but
there are some portability problems.

Thanks,
Jeroen.

John Cremona

unread,
Feb 10, 2012, 4:41:25 PM2/10/12
to sag...@googlegroups.com, sage-devel

Specifically: in the Makefile the option --as-needed is passed from
gcc to ld but apparently OpenSolaris's ld does not recognise that
option. I looked at the documentaion for Solaris ld (found at
http://www.opensolarisforum.org/man/man1/ld.html) and could not see an
equivalent option. It would be easy to make sure that this option was
only added if the OS (as returned by uname) was not ... whatever uname
returns on a Solaris system -- which is what?
http://trac.sagemath.org/sage_trac/ticket/9643 suggests that there is
not a unique answer.

John

>
> Thanks,
> Jeroen.
>
> --
> You received this message because you are subscribed to the Google Groups "sage-nt" group.
> To post to this group, send an email to sag...@googlegroups.com.
> To unsubscribe from this group, send email to sage-nt+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/sage-nt?hl=en-GB.
>

Julien Puydt

unread,
Feb 11, 2012, 2:36:05 AM2/11/12
to sage-...@googlegroups.com
Le vendredi 10 février, John Cremona a écrit:

> Specifically: in the Makefile the option --as-needed is passed from
> gcc to ld

That switch is written as-is in the Makefile? Or does it come from
elsewhere?

Snark on #sagemath

John Cremona

unread,
Feb 11, 2012, 9:54:03 AM2/11/12
to sage-...@googlegroups.com
>i

The Makefiles in the four subdirectories (into which the source is
divided) contain the (new) lines
SONAME=$(LIBBASE).so.0
where LIBBASE is something different for each subdirectory. Then in
the top-level Makefile, the line

SO_OPTS = -fPIC --shared

is changed to

SO_OPTS = -fPIC --shared -Wl,--as-needed

and in the top-level Makefile.dynamic,

$(SO_LIBNAME): $(A_LIBNAME)
$(CXX) $(SO_OPTS) $(A_LIBNAME) $(OBJS) -o $(SO_LIBNAME)
$(NTLLFLAGS) $(LIBFLAGS)

was changed to

(SO_LIBNAME): $(A_LIBNAME)

$(CXX) $(SO_OPTS) -Wl,-soname,$(SONAME) $(A_LIBNAME) $(OBJS) -o
$(SO_LIBNAME) $(NTLLFLAGS) $(LIBFLAGS)

These changes were made by the Debian guy, but apparently cause the
build to fail on the OpenSolaris machine Hawk. As far as I am
concerned everything worked before these changes and after (on my
linux machines) but if someone who sounds as if he knows what he is
talking about says "this is the right way to do it" I tend to believe
them provided that the change still works for me.

At the time this change was made to eclib "upstream" (in June 2011) I
did ask David Kirby whether this looked ok for Solaris, but he did not
reply, and it is only since December that I have trying to get the
eclib version included in Sage upgraded -- not for this technical
change of course, but for genuine reasons.

John


> Snark on #sagemath
>
> --
> To post to this group, send an email to sage-...@googlegroups.com
> To unsubscribe from this group, send an email to sage-devel+...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/sage-devel
> URL: http://www.sagemath.org

Reply all
Reply to author
Forward
0 new messages