#7027: clean up f2c spkg
---------------------------------------------------------------+------------
Reporter: drkirkby |
Owner: tbd
Type: defect |
Status: needs_work
Priority: major |
Milestone: sage-5.0
Component: build |
Keywords:
Work_issues: remove unneeded files; possibly redundant patch |
Upstream: N/A
Reviewer: |
Author: R. Andrew Ohana
Merged: |
Dependencies:
---------------------------------------------------------------+------------
Old description:
> Using
>
> * Solaris 10 update 7 on SPARC
> * sage-4.1.2.alpha2
> * Sun Studio 12.1
> * An updated configure script to allow the Sun compiler to be used.
>
> {{{
> f2c-20070816.p1/src/libf2c/._z_sqrt.c
> f2c-20070816.p1/src/libf2c/z_sqrt.c
> Finished extraction
> ****************************************************
> Host system
> uname -a:
> SunOS swan 5.10 Generic_139555-08 sun4u sparc SUNW,Sun-Blade-1000
> ****************************************************
> ****************************************************
> CC Version
> /opt/xxxsunstudio12.1/bin/cc -v
> usage: cc [ options] files. Use 'cc -flags' for details
> ****************************************************
> make[2]: Entering directory
> `/export/home/drkirkby/sage/gcc32/sage-4.1.2.alpha2/spkg/build/f2c-20070816.p1/src/libf2c'
> gcc -c f77vers.c
> gcc -c i77vers.c
>
> }}}
>
> f2c is far from the only program which ignores CC.
>
> '''spkg''':
> [http://wstein.org/home/ohanar/clang-
> port/sage-5.0.beta1-src/spkg/standard/f2c-20070816.p3.spkg]
New description:
f2c ignores CC, CFLAGS, and MAKE variables:
On sage.math using
{{{
CC=clang
CFLAGS=-O3
MAKE="make -j6"
}}}
{{{
****************************************************
Host system
uname -a:
Linux sage.math.washington.edu 2.6.24-28-server #1 SMP Fri Feb 11 18:08:32
UTC 2011 x86_64 Intel(R) Xeon(R) CPU X7460 @ 2.66GHz GenuineIntel
GNU/Linux
****************************************************
****************************************************
CC Version
clang -v
clang version 3.0 (tags/RELEASE_30/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
****************************************************
gcc -c f77vers.c
gcc -c i77vers.c
gcc -c -DSkip_f2c_Undefs -O -fPIC main.c
ld -r -o main.xxx main.o
mv main.xxx main.o
gcc -c -DSkip_f2c_Undefs -O -fPIC s_rnge.c
ld -r -o s_rnge.xxx s_rnge.o
mv s_rnge.xxx s_rnge.o
gcc -c -DSkip_f2c_Undefs -O -fPIC abort_.c
}}}
Also, there are left over files from development on OSX:
{{{
hg status
? ._.hg
? ._.hgignore
? ._SPKG.txt
? ._spkg-install
? patches/._f2c.makefile
}}}
Finally, there are unnecessary files in the patch directory, we only need
one of the patches, and neither of the makefiles.
'''spkg''':
[http://wstein.org/home/ohanar/clang-
port/sage-5.0.beta1-src/spkg/standard/f2c-20070816.p3.spkg]
--
Comment(by rohana):
Replying to [comment:6 mjo]:
> Why do we need both `patches/libf2c.makefile` and
`patches/libf2c.makefile.patch`? It looks to me like the patch does the
same thing as replacing the upstream makefile with libf2c.makefile:
>
> {{{
> $ diff -u src/libf2c/makefile patches/libf2c.makefile
> --- src/libf2c/makefile 2007-08-14 21:26:15.000000000 -0400
> +++ patches/libf2c.makefile 2012-02-10 04:31:00.000000000 -0500
> @@ -70,10 +70,10 @@
> ### If your system lacks ranlib, you don't need it; see README.
>
> f77vers.o: f77vers.c
> - $(CC) -c f77vers.c
> + $(CC) -c $(CFLAGS) f77vers.c
>
> i77vers.o: i77vers.c
> - $(CC) -c i77vers.c
> + $(CC) -c $(CFLAGS) i77vers.c
>
> # To get an "f2c.h" for use with "f2c -C++", first "make hadd"
> hadd: f2c.h0 f2ch.add
> }}}
>
> {{{
> $ cat patches/libf2c.makefile.patch
> --- libf2c.makefile.orig 2009-01-20 00:22:57.000000000 -0800
> +++ libf2c.makefile 2009-01-20 00:22:25.000000000 -0800
> @@ -70,10 +70,10 @@
> ### If your system lacks ranlib, you don't need it; see README.
>
> f77vers.o: f77vers.c
> - $(CC) -c f77vers.c
> + $(CC) -c $(CFLAGS) f77vers.c
>
> i77vers.o: i77vers.c
> - $(CC) -c i77vers.c
> + $(CC) -c $(CFLAGS) i77vers.c
>
> # To get an "f2c.h" for use with "f2c -C++", first "make hadd"
> hadd: f2c.h0 f2ch.add
> }}}
>
> Is there a reason to keep both around and not just the patch?
Nope, but that wasn't the initial goal of this ticket, that said I've
changed the purpose/description.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7027#comment:8>
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.