#8039: [with spkg, needs review] ATLAS libs fail to build on Open Solaris 64 bit
due to wrong LDFLAG -melf_x86_64
--------------------------+-------------------------------------------------
Reporter: jsp | Owner: drkirkby
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.3.2
Component: porting | Keywords: building
Author: Jaap Spies | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------+-------------------------------------------------
Changes (by drkirkby):
* status: needs_review => needs_work
Comment:
This will not work for me, as I believe there is a syntax error in your
script. This might be an example of things that work on one shell do not
on another.
{{{
ATLAS-build/lib/Makefile will be changed.
'-shared' will be changed to '-G'
'-soname' will be changed to '-h'
'--whole-archive' will be changed to '-zallextract'
'--no-whole-archive' will be changed to '-zdefaultextract'
A copy of the original Makefile will be copied to Makefile.orig
./spkg-install-script: line 94: [: yes: unary operator expected
make[2]: Entering directory
`/export/home/drkirkby/sage-4.3.1/spkg/build/atlas-3.8.3.p11/ATLAS-
build/lib'
rm -f libatlas.so liblapack.so
}}}
This is line 94 of the script, which is causing the problem.
{{{
if [ $SAGE64 ="yes" ]; then
}}}
I believe there should be a space after the '=' sign.
I'd make a couple of other points tests in general, I've gleaned from
studying the shell more, and from things from comp.unix.shell.
* It is better to test for "x$SAGE64" = xyes, as some shells have
problems if SAGE64 is not defined. Adding an 'x' or anything else you
fancy, will avoid that possibility, though 'x' is commonly used, so I
would stick to a lower case x. That problem is not true of modern versions
of bash, but its a good habit to get into, as then your scripts will work
on any shell.
* It is desirable to quote "x$SAGE64" as potentially SAGE64 might be set
to something with spaces in it. I know in this case, there unlikely to be
spaces, but you don't know if someone has set it correctly or not.
Hence the following is the safest test sort of test, and does not contain
any unnecessary quotes. Quoting xNO will not hurt, but it is unnecessary
as you know xNO will have no spaces, but you don't know that about FOOBAR.
{{{
if [ "x$FOOBAR" = xNO ]; then
}}}
I leave you to convert it to what is needed here. Otherwise I become an
author and can't review it!
I would also
* Report this upstream, and add to the trac ticket the URL of the ticket.
Currently it is set to N/A which is clearly not true.
* Stick a note in the spkg-install saying why the change is made. i.e.
the original flag is not valid. -64 is needed to build 64-bit, or
something like that.
* I would echo a quick statement like I did before when changing flags,
like I did before.
{{{
'-shared' will be changed to '-G'
}}}
* You are using a temporary variable of 'makefile' while editing
'Make.inc' I think that is unwise, and I know I was guilty of it above,
but 'makefile' has some significance, and you could overwrite such a file
if it existed.
Better would be
{{{
sed 's/-melf_x86_64/-64/g' Make.inc > Make.inc.tmp
}}}
or perhaps uses Make.inc.$$, which will create a file with the PID
appended.
Also, the description is inaccurate, as it says "As a workaround I changed
-melf_x86_64 in -64 in Make.inc". I think you mean you changed it '''too''
-64.
So with
* The syntax error removed
* Description updated.
* Some other minor changes you might want to consider
* Reported upstream, the URL posted.
* Change to "reported upstream" from N/A
* Revised patch attached.
then I think this should be ok. But now, there is a syntax error so it
will not build at all for me.
Dave
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8039#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.