Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Re: gcc-2.7.2.2 / g77-0.5.20 on RH4.1
@ 1997-03-04  9:56 Erik Evensen
  0 siblings, 0 replies; 8+ messages in thread
From: Erik Evensen @ 1997-03-04  9:56 UTC (permalink / raw)


>>>>> "L" == Lev D Gelb <gelb@cheme.cornell.edu> writes:

    L> OK, I'm trying to compile the new release of g77 on my
    L> redhat-4.1 box.

I'm doing the same thing . . .

    L> I got the src.rpm for gcc-2.7.2.1, and the 2.7.2.2
    L> distribution, unpacked the second, and applied the patches to
    L> it.

    L> But, when I then try to apply the g77-0.5.20-included patch to
    L> the resulting distribution, the patching fails while patching
    L> "configure", which then does not work.

Didn't even try this...

    L> If... I apply the g77 patch to the clean distribution and THEN
    L> apply the RedHat patches, it gets about halfway through the
    L> first "make" of the compiler, with lots of warnings about
    L> "alloca", and then dies because it can't find "crt0.o"...

Including stdlib.h in files which contain alloca gets rid of the warning
-- I'm not sure if it introduces any other problems or not yet.

As for crt0.o -- what I did is change the occurence of gcrt0, mcrt0,
and crt0 in gcc.c and config/alpha/alpha.h to gcrt1, mcrt1, and crt1,
respectively. I'm not sure if this the correct fix but it does make
things happy for compiling.

    L> If... I just try to make gcc without g77, the RH patches and
    L> the gcc-2.7.2.2 distribution work OK.

    L> If... I just apply the g77 patch to the clean distribution,
    L> (e.g., following the g77 instructions) It dies on the first
    L> compile:

    L> [root@eddie gcc]# make "LANGUAGES=c" cc -DIN_GCC -g
    L> -I. -I. -I./config \

    L> -DGCC_INCLUDE_DIR=\"/usr/lib/gcc-lib/alpha-unknown-linux/2.7.2.2.f.2/include\"\
    L> -DGPLUSPLUS_INCLUDE_DIR=\"/usr/lib/g++-include\" \
    L> -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \

    L> -DCROSS_INCLUDE_DIR=\"/usr/lib/gcc-lib/alpha-unknown-linux/2.7.2.2.f.2/sys-include\"\
    L> -DTOOL_INCLUDE_DIR=\"/usr/alpha-unknown-linux/include\" \ -c
    L> `echo ./cccp.c | sed 's,^\./,,'` cccp.c:322: conflicting types
    L> for `sys_errlist' /usr/include/stdio.h:216: previous
    L> declaration of `sys_errlist' make: *** [cccp.o] Error 1

What I did to fix this is make the following modification in all
pieces of code that reference sys_errlist (there aren't that many):
the code segment that reads:

#if defined(bsd4_4)
extern const char *const sys_errlist[];
#else
extern char *sys_errlist[];
#endif

should become:

#if defined(bsd4_4) || defined(__linux__)
extern const char *const sys_errlist[];
#else
extern char *sys_errlist[];
#endif

I've gotten xgcc to compile but it dies trying to compile enquire.c
with the message:

./xgcc -B./  -DIN_GCC   -g -I./include    -DNO_MEM -DNO_LONG_DOUBLE_IO -O0 -I. -c ./enquire.c
xgcc: Internal compiler error: program cpp got fatal signal 11
gmake[1]: *** [enquire.o] Error 1
gmake[1]: Leaving directory `/home/erik/erik/tape-960117/gcc-2.7.2.2'
gmake: *** [bootstrap] Error 2

It is absolutely consistent about dying at this point so I doubt
it is a memory problem like sig 11 usually implies.

--erik

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* gcc-2.7.2.2 / g77-0.5.20 on RH4.1
  1997-02-22  2:01 A problem porting sbrk Steven White
@ 1997-03-04 19:02 ` Lev D Gelb
  0 siblings, 0 replies; 8+ messages in thread
From: Lev D Gelb @ 1997-03-04 19:02 UTC (permalink / raw)


OK, I'm trying to compile the new release of
g77 on my redhat-4.1 box.

I got the src.rpm for gcc-2.7.2.1,
and the 2.7.2.2 distribution, unpacked the second,
and applied the patches to it.

But, when I then try to apply the g77-0.5.20-included
patch to the resulting distribution, the patching fails
while patching "configure", which then does not work.

If... I apply the g77 patch to the clean distribution
and THEN apply the RedHat patches, it gets about halfway
through the first "make" of the compiler, with lots of
warnings about "alloca", and then dies because it can't
find "crt0.o"...

If... I just try to make gcc without g77, the RH patches
and the gcc-2.7.2.2 distribution work OK.

If... I just apply the g77 patch to the clean distribution,
(e.g., following the g77 instructions) It dies on the first compile:

[root@eddie gcc]# make "LANGUAGES=c"
cc  -DIN_GCC   -g     -I. -I. -I./config \

-DGCC_INCLUDE_DIR=\"/usr/lib/gcc-lib/alpha-unknown-linux/2.7.2.2.f.2/include\"\
  -DGPLUSPLUS_INCLUDE_DIR=\"/usr/lib/g++-include\" \
  -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \

-DCROSS_INCLUDE_DIR=\"/usr/lib/gcc-lib/alpha-unknown-linux/2.7.2.2.f.2/sys-include\"\
  -DTOOL_INCLUDE_DIR=\"/usr/alpha-unknown-linux/include\" \
  -c `echo ./cccp.c | sed 's,^\./,,'`
cccp.c:322: conflicting types for `sys_errlist'
/usr/include/stdio.h:216: previous declaration of `sys_errlist'
make: *** [cccp.o] Error 1

Any ideas, anyone?

Lev Gelb

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-2.7.2.2 / g77-0.5.20 on RH4.1
@ 1997-03-04 21:19 Toon Moene
  0 siblings, 0 replies; 8+ messages in thread
From: Toon Moene @ 1997-03-04 21:19 UTC (permalink / raw)


L> OK, I'm trying to compile the new release of g77 on my
    L> redhat-4.1 box.

> I'm doing the same thing . . .

    L> I got the src.rpm for gcc-2.7.2.1, and the 2.7.2.2
    L> distribution, unpacked the second, and applied the patches to
    L> it.

    L> But, when I then try to apply the g77-0.5.20-included patch to
    L> the resulting distribution, the patching fails while patching
    L> "configure", which then does not work.

Gentlemen, how about grabbing the *sources* - in stead of a rpm -  
and starting from that.

gcc-2.7.2.2 + g77-0.5.20 is known to compile (build) and run  
correctly on a recent Linux kernel based GNU OS.

The docs even point at this:

[ ... paraphrased .... ]

If you don't use the FSF gcc sources and g77 distribution, YOYO  
(your on your own).

[ ... Heck - if Digital were somewhat faster with their 21264, I'd
      actually point out the problem area's instead of pouring out
      this generalised support message :-} ]

Cheers,

--
Toon Moene (mailto:toon@moene.indiv.nluug.nl)
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Phone: +31 346 214290; Fax: +31 346 214286
g77 Support: mailto:fortran@gnu.ai.mit.edu; NWP:  
http://www.knmi.nl/hirlam

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-2.7.2.2 / g77-0.5.20 on RH4.1
       [not found] <9703042119.AA18379@moene.indiv.nluug.nl>
@ 1997-03-04 22:39 ` Richard Henderson
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Henderson @ 1997-03-04 22:39 UTC (permalink / raw)


> Gentlemen, how about grabbing the *sources* - in stead of a rpm -  
> and starting from that.

Simple.  Linux/Alpha (in either ELF or ECOFF form) is not supported
in stock 2.7.2.2, and even if it was there are a dozen or so Alpha
code generation bugs.

Start from the source rpm.

r~

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-2.7.2.2 / g77-0.5.20 on RH4.1
@ 1997-03-05 18:43 Toon Moene
  0 siblings, 0 replies; 8+ messages in thread
From: Toon Moene @ 1997-03-05 18:43 UTC (permalink / raw)


>> Gentlemen, how about grabbing the *sources* - in stead of a rpm -  
>> and starting from that.

>  Simple.  Linux/Alpha (in either ELF or ECOFF form) is
>  not supported in stock 2.7.2.2, and even if it was there
>  are a dozen or so Alpha code generation bugs.

This should be solved with the g77-0.5.20 release - it has a rather  
large patch to gcc-2.7.2.2 to insert Linux/Alpha configuration  
support and fix most of the code generation bugs.

Toon.

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-2.7.2.2 / g77-0.5.20 on RH4.1
@ 1997-03-12  5:43 Erik Evensen
  0 siblings, 0 replies; 8+ messages in thread
From: Erik Evensen @ 1997-03-12  5:43 UTC (permalink / raw)


>>>>> "T" == Toon Moene <toon@moene.indiv.nluug.nl> writes:

    >>> Gentlemen, how about grabbing the *sources* - in stead of a
    >>> rpm - and starting from that.

    >> Simple.  Linux/Alpha (in either ELF or ECOFF form) is not
    >> supported in stock 2.7.2.2, and even if it was there are a
    >> dozen or so Alpha code generation bugs.

    T> This should be solved with the g77-0.5.20 release - it has a
    T> rather large patch to gcc-2.7.2.2 to insert Linux/Alpha
    T> configuration support and fix most of the code generation bugs.

    T> Toon.

So, I've tried g77-0.5.20/gcc-2.7.2.2 both straight out of the box and
with the patches from gcc-2.7.2.1 SRPM. I can get xgcc to compile
either way but either way it crashes when trying to compile enquire.c.

I'm wondering if it is maybe a library problem, I have glibc-961212-4
installed.

When I run xgcc under gdb I get the following, note I did not set any
breakpoints manually:

erik@avalon<gcc>{154}gdb xgcc
GDB 4.16 (alpha-unknown-linux), Copyright 1996 Free Software Foundation, Inc...
Breakpoint 1 at 0x120111ff0
(gdb) run  -B./  -DIN_GCC   -O -I./include    -DNO_MEM -DNO_LONG_DOUBLE_IO -O0 -I. -c ./enquire.c
Starting program: /butthead/erik/gcc-2.7.2.2/xgcc -B./  -DIN_GCC   -O -I./include    -DNO_MEM -DNO_LONG_DOUBLE_IO -O0 -I. -c ./enquire.c
During symbol reading...bad proc end in aux found from symbol __divlu...
bad proc end in aux found from symbol __divqu...
bad proc end in aux found from symbol __remlu...
bad proc end in aux found from symbol __remqu...Breakpoint 1 at 0x155557fb430

During symbol reading...bad proc end in aux found from symbol __remqu...
xgcc: Internal compiler error: program cpp got fatal signal 11

Program exited with code 01.
(gdb) where
No stack.
(gdb) 

I'm in the process of trying to build a version against glibc-2.01;
if anyone's interested, I'll keep you posted of my progress.

--erik

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-2.7.2.2 / g77-0.5.20 on RH4.1
@ 1997-03-13 10:22 Erik Evensen
  0 siblings, 0 replies; 8+ messages in thread
From: Erik Evensen @ 1997-03-13 10:22 UTC (permalink / raw)


>>>>> "E" == Erik Evensen <erik@avalon.harvard.edu> writes:

>>>>> "T" == Toon Moene <toon@moene.indiv.nluug.nl> writes:
    >>>> Gentlemen, how about grabbing the *sources* - in stead of a
    >>>> rpm - and starting from that.

    >>> Simple.  Linux/Alpha (in either ELF or ECOFF form) is not
    >>> supported in stock 2.7.2.2, and even if it was there are a
    >>> dozen or so Alpha code generation bugs.

    T> This should be solved with the g77-0.5.20 release - it has a
    T> rather large patch to gcc-2.7.2.2 to insert Linux/Alpha
    T> configuration support and fix most of the code generation bugs.

    T> Toon.

    E> So, I've tried g77-0.5.20/gcc-2.7.2.2 both straight out of the
    E> box and with the patches from gcc-2.7.2.1 SRPM. I can get xgcc
    E> to compile either way but either way it crashes when trying to
    E> compile enquire.c.

    E> I'm wondering if it is maybe a library problem, I have
    E> glibc-961212-4 installed.

    E> When I run xgcc under gdb I get the following, note I did not
    E> set any breakpoints manually:

    E> erik@avalon<gcc>{154}gdb xgcc GDB 4.16 (alpha-unknown-linux),

    E> During symbol reading...bad proc end in aux found from symbol
    E> __remqu...  xgcc: Internal compiler error: program cpp got
    E> fatal signal 11

    E> Program exited with code 01.  (gdb) where No stack.  (gdb)

    E> I'm in the process of trying to build a version against
    E> glibc-2.01; if anyone's interested, I'll keep you posted of my
    E> progress.

Just to update people on my progress which is essentially none,
I've tried building gcc-2.7.2.2/g77-0.5.20 every which way including
with glibc-0.96.1212-4 and glibc-2.01 (binaries from prep.ai.mit.edu).
I've tried with and without patches in just about every permutation.

With a few minor modifications, I can get the code to compile (won't
detail them here since I'm not sure if they are right yet). But the
compiler refuses to compile itself or the version that it compiles
generates faulty code.

I don't have absolute confirmation but I believe at least one of the
problems is with how the gcc-2.7.2.2 is handling string constants or
maybe strings in general. All the crashes I find for gcc, xgcc, and
cpp under the debugger seem to involve char* or string literals in
the code; e.g., xgcc will die on trying to make a copy of
version_string but if I recompile and link version.c it will get past
that part of the code; cpp appears to die in calls to strlen passed
string literals -- such as in calls like printf().

I don't know much at all about the internals of gcc so I'm pretty
much stuck here with respect to solving this problem. Perhaps this
info will be useful to someone who is more familiar with gcc/g77?

Thanks for listening and sorry I can't provide a solution.

--erik

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gcc-2.7.2.2 / g77-0.5.20 on RH4.1
@ 1997-03-13 21:43 J
  0 siblings, 0 replies; 8+ messages in thread
From: J @ 1997-03-13 21:43 UTC (permalink / raw)


I have gotten gcc-2.7.2.2 / g77-0.5.20 to compile and work (so far) under
RH4.1.  My system is RH4.1 installed from the RedHat  PowerTools CD set
plus all the updates on ftp.redhat.com as of a few days ago.

I used gcc-2.7.2.2 with the patches from g77-0.5.20 applied. I had to go in
at tweek the configuration a bit though. It seems that while the patches with
g77 do add support for alpha-linux to gcc, it is support for an older, non
ELF, system.

The changes I made, as I remmeber them are:

  Followed the install instructions that came with g77 up to the point where
  there tell you to fun configure

  Copied config/alpha/elf.h from the gcc SRPM from RH4.1 (after applying the
  patches in the spec file).

  Edited the configure script to use config/alpha/elf.h for tm_file with
  the alpha-linux configuration.

  Added "#define HAVE_STRERROR" to config/alpha/xm-linux.h

  Changed the ifdef around "extern void *alloca ();" in config/alpha/xm-alpha.h
  to "#ifndef alloca"

  Run configure, using the parameters shown in the Rh4.1 gcc spec file.

  make bootstrap

At this point the build proceeded normally. Gcc 2.7.2.2 was able to compile
itself. 

I've tested it on a few small C and Fortran programs of my own, and on xmcd.
Everything seems to be working fine.

I tried to use it to compile octave. Octave compiled, but seg faults on startup
when you run it. This was the same behavior using gcc-2.7.2.1/f2c though.

If anyone wants more details or a better explanation, let me know. Be warned.
This is the first time I've ever looked at the inards of gcc. I don't really
know what I'm doing. It does seem to work though. *shrug*

- J

 

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1997-03-13 21:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-03-04 21:19 gcc-2.7.2.2 / g77-0.5.20 on RH4.1 Toon Moene
  -- strict thread matches above, loose matches on Subject: below --
1997-03-13 21:43 J
1997-03-13 10:22 Erik Evensen
1997-03-12  5:43 Erik Evensen
1997-03-05 18:43 Toon Moene
     [not found] <9703042119.AA18379@moene.indiv.nluug.nl>
1997-03-04 22:39 ` Richard Henderson
1997-03-04  9:56 Erik Evensen
1997-02-22  2:01 A problem porting sbrk Steven White
1997-03-04 19:02 ` gcc-2.7.2.2 / g77-0.5.20 on RH4.1 Lev D Gelb

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox