Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 97437 - f77 link is not made in /usr/bin when gcc (with g77) is installed
Summary: f77 link is not made in /usr/bin when gcc (with g77) is installed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-29 19:29 UTC by John C. Vernaleo
Modified: 2005-07-07 16:03 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Requested CONTENTS from gcc-3.3.5 (CONTENTS_gcc-3.3.5.20050130-r1,39.55 KB, text/plain)
2005-06-30 07:08 UTC, John C. Vernaleo
Details
CONTENTS from gcc-config (CONTENTS_gcc-config-1.3.11-r3,194 bytes, text/plain)
2005-06-30 07:09 UTC, John C. Vernaleo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John C. Vernaleo 2005-06-29 19:29:54 UTC
I have gcc installed (with the fortran use flag).  This provides a g77
executable, but it does not provide a f77, which is usually a link to the
generic system fortran compiler.  Some older things (and with fortran 77 almost
everything is older) expect this behavior.
cc is in /usr/bin (and points to gcc).  Every other linux (and solaris) have
f77, so I assume this is the proper UNIX type behavior.  Redhat and Mandrake use
symbolic links to make /usr/bin/f77 point to g77.  I'm not sure how Gentoo does
it for cc, but f77 should probably be created the same way.

Reproducible: Always
Steps to Reproduce:
1.emerge gcc with fortran flag
2. which f77
3.



Expected Results:  
/usr/bin/f77 should exist and it should call g77
Comment 1 SpanKY gentoo-dev 2005-06-30 05:50:19 UTC
please attach the CONTENTS found in /var/db/pkg/sys-devel/gcc-*/
Comment 2 John C. Vernaleo 2005-06-30 07:08:16 UTC
Created attachment 62325 [details]
Requested CONTENTS from gcc-3.3.5

Here is the requested file.
Comment 3 John C. Vernaleo 2005-06-30 07:09:14 UTC
Created attachment 62326 [details]
CONTENTS from gcc-config

The other file.
Comment 4 SpanKY gentoo-dev 2005-06-30 10:24:42 UTC
ok, it's a small bug in gcc-config ... shouldnt be hard to fix ...
Comment 5 SpanKY gentoo-dev 2005-06-30 18:47:56 UTC
can you please try this fix and see if it works ?

--- gcc-config-1.3.11   13 Jun 2005 04:57:03 -0000      1.5
+++ gcc-config-1.3.11   1 Jul 2005 01:47:28 -0000
@@ -213,7 +213,8 @@ switch_profile() {
                # sync mtimes together.  This makes things like ccache
                # happy.  See Bug #70548 for more info.
                local ref=${ROOT}/${GCC_BIN_PATH}/${x}
-               [[ ${x} == "cc" ]] && ref=${ROOT}/${GCC_BIN_PATH}/gcc
+               [[ ${x} == "cc"  ]] && ref=${ROOT}/${GCC_BIN_PATH}/gcc
+               [[ ${x} == "f77" ]] && ref=${ROOT}/${GCC_BIN_PATH}/g77
                if [[ -x ${ref} ]] ; then
                        ${CP} -f "${ROOT}/usr/lib/misc/gcc-config" \
                                 "${ROOT}/usr/bin/${x}"
Comment 6 John C. Vernaleo 2005-07-01 09:39:37 UTC
(In reply to comment #5)
> can you please try this fix and see if it works ?

As soon as I get back in town and have access to my computers again (late
Tuesday probably) I'll try it and report back.  Since you've responded so quick,
I didn't want it to look like I was just sitting on your patch and not doing
anything with it.

Thanks.
Comment 7 John C. Vernaleo 2005-07-05 17:22:05 UTC
I made the changes to
/usr/local/portage/sys-devel/gcc-config/files/gcc-config-1.3.11
(the location of my portage overlay)
and did emerge -v gcc-config which finished with no errors.

When I then try to run f77, I get the error:

gcc-config error: Could not run/locate "f77"

g77 however still works.
Comment 8 SpanKY gentoo-dev 2005-07-06 22:40:03 UTC
ok, then try this patch:

--- files/wrapper-1.4.6.c
+++ files/wrapper-1.4.6.c
@@ -353,6 +353,8 @@ int main(int argc, char *argv[])
        /* cc calls "/full/path/to/gcc" ... */
        if (!strcmp(data->name, "cc"))
                strcpy(data->name, "gcc");
+       if (!strcmp(data->name, "f77"))
+               data->name[0] = 'g';
                                
        /* What is the full name of our wrapper? */
        size = sizeof(data->fullname);
Comment 9 John C. Vernaleo 2005-07-07 08:55:08 UTC
(In reply to comment #8)
> ok, then try this patch:
> 
  
I tried that patch and it works perfect.  Thanks.

Just to be clear, I have both the patch from comment 8 and the patch from
comment 5 applied.  If you would like a me to try a different combination (like
just the most recent one, let me know), although it looks like both are needed
to me.  Once again, thanks.
Comment 10 SpanKY gentoo-dev 2005-07-07 16:03:45 UTC
thanks, gcc-config-1.3.11-r4 has both these fixes