caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Objective Caml 2 with RedHat 5.1
@ 1998-10-14 15:05 Paul Bristow
  1998-10-15 17:17 ` Xavier Leroy
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Paul Bristow @ 1998-10-14 15:05 UTC (permalink / raw)
  To: caml-list

Hi,
I've recently upgraded to RedHat  (Linux) 5.1 and am having problems, I
was wondering if anyone else has had exeperience with RH5.1 so I can
identify whether my problems are to do with RH5.1 or with my local
setup.
First off I tried to simply 'configure' as follows:

./configure -bindir $DEPOT/dsg/local/arch.linux/bin -libdir
$DEPOT/dsg/local/arc
h.linux/lib/ocaml -mandir $DEPOT/dsg/local/man/man1 -cc gcc -x11include
/usr/X11
R6/include -x11lib /usr/X11R6/lib

This all worked fine.
Then I did make world and got:

make[1]: Entering directory
`/a/azdak/root/depot0/.primary/dsg/local/src/ocaml-2.00/byterun'
sed -n -e '/^  /s/ \([A-Z]\)/ \&\&lbl_\1/gp' \
       -e '/^}/q' instruct.h > jumptbl.h
gcc -O -fno-defer-pop -Wall   -c interp.c -o interp.o
interp.c: In function `interprete':
interp.c:151: warning: `pc' might be used uninitialized in this function

interp.c:151: warning: variable `pc' might be clobbered by `longjmp' or
`vfork'
interp.c:152: warning: `sp' might be used uninitialized in this function

interp.c:152: warning: variable `sp' might be clobbered by `longjmp' or
`vfork'
interp.c:153: warning: `accu' might be used uninitialized in this
function
interp.c:153: warning: variable `accu' might be clobbered by `longjmp'
or `vfork'
interp.c:166: warning: `env' might be used uninitialized in this
function
interp.c:166: warning: variable `env' might be clobbered by `longjmp' or
`vfork'
interp.c:167: warning: `extra_args' might be used uninitialized in this
function
interp.c:167: warning: variable `extra_args' might be clobbered by
`longjmp' or `vfork'
interp.c:168: warning: `initial_external_raise' might be used
uninitialized in this function
interp.c:168: warning: variable `initial_external_raise' might be
clobbered by `longjmp' or `vfork'
interp.c:169: warning: `initial_sp_offset' might be used uninitialized
in this function
interp.c:169: warning: variable `initial_sp_offset' might be clobbered
by `longjmp' or `vfork'
interp.c:983: fixed or forbidden register was spilled.
This may be due to a compiler bug or to impossible asm
statements or clauses.
make[1]: *** [interp.o] Error 1
make[1]: Leaving directory
`/a/azdak/root/depot0/.primary/dsg/local/src/ocaml-2.00/byterun'
make: *** [coldstart] Error 2

So I checked my compiler:

gcc -v
Reading specs from /usr/lib/gcc-lib/i586-linux/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)

I suspect this is the problem.  Has anyone else succesfully compiled
with egcs?

n.b. I remembered to use sh and not csh or other.

Thanks,

--
Paul C Bristow,
Dept. Computing & Elec. Eng. Heriot-Watt University, Edinburgh EH14 4AS.
Phone: (+44) 131 451 5111 ext 4179.           e-mail: paul@cee.hw.ac.uk
"Smith and Wesson, the ultimate point and click interface!"








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

* Re: Objective Caml 2 with RedHat 5.1
  1998-10-14 15:05 Objective Caml 2 with RedHat 5.1 Paul Bristow
@ 1998-10-15 17:17 ` Xavier Leroy
  1998-10-16  0:05 ` David Monniaux
  1998-10-16  0:54 ` building ocaml-2.00 with egcs Jens-Ulrik Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Xavier Leroy @ 1998-10-15 17:17 UTC (permalink / raw)
  To: Paul Bristow, caml-list

> I've recently upgraded to RedHat  (Linux) 5.1 and am having
problems.
> [...]
> interp.c:983: fixed or forbidden register was spilled.
> This may be due to a compiler bug or to impossible asm
> statements or clauses.

Several users have reported this problem.  It looks like the "asm"
statements for the Intel x86 in byterun/interp.c don't work with gcc
2.8 nor egcs (but they work OK with gcc 2.7).  The one-line patch
below fixes this problem.

If you're using RedHat 5.1, you can also download pre-compiled RPM
binaries from our FTP site (ftp.inria.fr:/lang/caml-light).

- Xavier Leroy

Index: csl/byterun/interp.c
diff -c csl/byterun/interp.c:1.46 csl/byterun/interp.c:1.47
*** csl/byterun/interp.c:1.46	Tue Jun 23 18:47:02 1998
--- csl/byterun/interp.c	Mon Sep  7 09:57:05 1998
***************
*** 9,15 ****
  /*                                                                     */
  /***********************************************************************/
  
! /* $Id: interp.c,v 1.46 1998/06/23 16:47:02 xleroy Exp $ */
  
  /* The bytecode interpreter */
  
--- 9,15 ----
  /*                                                                     */
  /***********************************************************************/
  
! /* $Id: interp.c,v 1.47 1998/09/07 07:57:05 xleroy Exp $ */
  
  /* The bytecode interpreter */
  
***************
*** 124,130 ****
  #ifdef __i386__
  #define PC_REG asm("%esi")
  #define SP_REG asm("%edi")
! #define ACCU_REG asm("%ebx")
  #endif
  #if defined(PPC) || defined(_POWER) || defined(_IBMR2)
  #define PC_REG asm("26")
--- 124,130 ----
  #ifdef __i386__
  #define PC_REG asm("%esi")
  #define SP_REG asm("%edi")
! #define ACCU_REG
  #endif
  #if defined(PPC) || defined(_POWER) || defined(_IBMR2)
  #define PC_REG asm("26")





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

* Objective Caml 2 with RedHat 5.1
  1998-10-14 15:05 Objective Caml 2 with RedHat 5.1 Paul Bristow
  1998-10-15 17:17 ` Xavier Leroy
@ 1998-10-16  0:05 ` David Monniaux
  1998-10-16  0:54 ` building ocaml-2.00 with egcs Jens-Ulrik Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: David Monniaux @ 1998-10-16  0:05 UTC (permalink / raw)
  To: caml-list

My experience is that OCaml doesn't compile correctly with:
* Intel / gcc 2.7.2.1
* Intel / gcc 2.8.1 \ same symptoms
* Intel / egcs      /

I tried to send a bug report to the egcs-bug mailing list but
apparently it got lost somewhere. I suppose it'd be more appropriate
if X. Leroy, for instance, tried to do the bug report.

I suggest you grab the binary RPM. If you still want to compile
byterun yourself, go grab a gcc 2.7.2.3.

-- 
David Monniaux, PhD student at ENS, Paris, France
Now at: Computer science laboratory  SRI International
        Formal methods group         Menlo Park, CA, US
http://www.csl.sri.com/~monniaux





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

* Re: building ocaml-2.00 with egcs
  1998-10-14 15:05 Objective Caml 2 with RedHat 5.1 Paul Bristow
  1998-10-15 17:17 ` Xavier Leroy
  1998-10-16  0:05 ` David Monniaux
@ 1998-10-16  0:54 ` Jens-Ulrik Petersen
  1998-10-16 23:33   ` building ocaml-2.00 with gcc-2.7.2.3 Jens-Ulrik Petersen
  2 siblings, 1 reply; 5+ messages in thread
From: Jens-Ulrik Petersen @ 1998-10-16  0:54 UTC (permalink / raw)
  To: Paul Bristow; +Cc: caml-list

>>>>> "PB" == Paul Bristow <paul@cee.hw.ac.uk> writes:

    PB> Then I did make world and got:

    PB> make[1]: Entering directory
    PB> `/a/azdak/root/depot0/.primary/dsg/local/src/ocaml-2.00/byterun'

    PB> gcc -O -fno-defer-pop -Wall -c interp.c -o interp.o
[:]
    PB> interp.c:983: fixed or forbidden register was spilled.  This
    PB> may be due to a compiler bug or to impossible asm statements
    PB> or clauses.  make[1]: *** [interp.o] Error 1 make[1]: Leaving
    PB> directory
    PB> `/a/azdak/root/depot0/.primary/dsg/local/src/ocaml-2.00/byterun'
    PB> make: *** [coldstart] Error 2

    PB> gcc -v Reading specs from
    PB> /usr/lib/gcc-lib/i586-linux/egcs-2.90.29/specs gcc version
    PB> egcs-2.90.29 980515 (egcs-1.0.3 release)

    PB> I suspect this is the problem.  Has anyone else succesfully
    PB> compiled with egcs?

I could compile 2.00 with the gcc-2.7.2.3-4.2 package of Debian 2.0.
But I successfully built it with Debian egcs-2.90.28-0.1:

	% egcc -v
	Reading specs from /usr/lib/gcc-lib/i486-linux/egcs-2.90.28/specs
	gcc version egcs-2.90.28 980423 (egcs-1.0.3 prerelease)

after applying the following patch posted here earlier:

Index: interp.c
===================================================================
RCS file: /net/pauillac/caml/repository/csl/byterun/interp.c,v
retrieving revision 1.46
diff -c -r1.46 interp.c
*** interp.c	1998/06/23 16:47:02	1.46
--- interp.c	1998/09/04 09:45:39
***************
*** 124,130 ****
  #ifdef __i386__
  #define PC_REG asm("%esi")
  #define SP_REG asm("%edi")
! #define ACCU_REG asm("%ebx")
  #endif
  #if defined(PPC) || defined(_POWER) || defined(_IBMR2)
  #define PC_REG asm("26")
--- 124,130 ----
  #ifdef __i386__
  #define PC_REG asm("%esi")
  #define SP_REG asm("%edi")
! #define ACCU_REG
  #endif
  #if defined(PPC) || defined(_POWER) || defined(_IBMR2)
  #define PC_REG asm("26")

-- 
Jens-Ulrik Holger Petersen  <http://www.kurims.kyoto-u.ac.jp/~petersen/>
Research Institute for Mathematical Sciences, Kyoto University





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

* Re: building ocaml-2.00 with gcc-2.7.2.3
  1998-10-16  0:54 ` building ocaml-2.00 with egcs Jens-Ulrik Petersen
@ 1998-10-16 23:33   ` Jens-Ulrik Petersen
  0 siblings, 0 replies; 5+ messages in thread
From: Jens-Ulrik Petersen @ 1998-10-16 23:33 UTC (permalink / raw)
  To: Paul Bristow; +Cc: caml-list

>>>>> "juhp" == Jens-Ulrik Petersen <petersen@kurims.kyoto-u.ac.jp> writes:

    juhp> I could compile 2.00 with the gcc-2.7.2.3-4.2 package of
    juhp> Debian 2.0.

Oops, that should have read "I couldn't compile ocaml-2.00 with
gcc-2.7.2.3."

    juhp> But I successfully built it with egcs-2.90.28

with the patch, so I didn't investigate further.
-- 
Jens-Ulrik Holger Petersen  <http://www.kurims.kyoto-u.ac.jp/~petersen/>
Research Institute for Mathematical Sciences, Kyoto University




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

end of thread, other threads:[~1998-10-23  7:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-14 15:05 Objective Caml 2 with RedHat 5.1 Paul Bristow
1998-10-15 17:17 ` Xavier Leroy
1998-10-16  0:05 ` David Monniaux
1998-10-16  0:54 ` building ocaml-2.00 with egcs Jens-Ulrik Petersen
1998-10-16 23:33   ` building ocaml-2.00 with gcc-2.7.2.3 Jens-Ulrik Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).