Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.05 build problem on solaris #3471

Closed
vicuna opened this issue Jul 29, 2002 · 2 comments
Closed

3.05 build problem on solaris #3471

vicuna opened this issue Jul 29, 2002 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jul 29, 2002

Original bug ID: 1272
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Luc Habert
Version: 3.05
OS: Solaris 7
Submission from: clipper-gw.ens.fr (129.199.1.22)

When trying to build ocaml 3.05, I get a segfault when it gets to creating
the camltk toplevel :

../../../ocamlcomp.sh -verbose -linkall -o labltktop -I ../support
-I ../../../toplevel toplevellib.cma
-I ../labltk -I ../camltk labltk.cma
-I ../../unix unix.cma
-I ../../str str.cma
topmain.cmo
make[2]: *** [labltktop] Segmentation Fault

I have been able to find a workaround : compile without tk (that works
fine), then do two « make bootstrap » (I haven't tried with only one, I did
two because the INSTALL advises to try it), then compile by hand (i.e. by
calling directly the inner makefiles) the labltk lib with the bootstraped
compiler, and then everything has worked fine. I have checked that the
bootstraped compiler and the one that ships with the distribution are
different, and they indeed are (I checked after removing the #! line of
course).

In case that might help, the tk version installed is 8.3.

@vicuna
Copy link
Author

vicuna commented Jul 30, 2002

Comment author: administrator

Bonjour,

When trying to build ocaml 3.05, I get a segfault when it gets to creating
the camltk toplevel :

../../../ocamlcomp.sh -verbose -linkall -o labltktop -I ../support
-I ../../../toplevel toplevellib.cma
-I ../labltk -I ../camltk labltk.cma
-I ../../unix unix.cma
-I ../../str str.cma
topmain.cmo
make[2]: *** [labltktop] Segmentation Fault

Je n'ai pas pu reproduire ce plantage ici, mais un autre utilisateur
nous a mis sur la trace d'un bug de GC qui pourrait être relié.
Est-ce que tu pourrais réessayer à partir de la distrib 3.05 en
appliquant le patch ci-joint avant de faire "make world"?

I have checked that the
bootstraped compiler and the one that ships with the distribution are
different, and they indeed are (I checked after removing the #! line of
course).

Oui, c'est vrai, et c'est dû à un changement mineur de la bibliothèque
standard entre le moment où boot/ocamlc a été construit (chez nous) et
la release. Mais en soi cela n'est pas une condition suffisante pour
faire tout planter :-)

  • Xavier Leroy

Index: byterun/major_gc.c

RCS file: /net/pauillac/caml/repository/csl/byterun/major_gc.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- major_gc.c 2002/06/05 12:11:15 1.37
+++ major_gc.c 2002/07/30 13:02:31 1.38
@@ -11,7 +11,7 @@
/* */
/***********************************************************************/

-/* $Id: major_gc.c,v 1.37 2002/06/05 12:11:15 doligez Exp $ /
+/
$Id: major_gc.c,v 1.38 2002/07/30 13:02:31 xleroy Exp $ */

#include <limits.h>

@@ -126,15 +126,12 @@
if (Tag_hd (hd) < No_scan_tag){
for (i = 0; i < size; i++){
child = Field (v, i);

  •    mark_again:
         if (Is_block (child) && Is_in_heap (child)) {
           hd = Hd_val(child);
           if (Tag_hd (hd) == Forward_tag){
    
  •          child = Forward_val (child);
    
  •          Field (v, i) = child;
    
  •          goto mark_again;
    
  •          Field (v, i) = Forward_val (child);
           }
    
  •        if (Tag_hd(hd) == Infix_tag) {
    
  •        else if (Tag_hd(hd) == Infix_tag) {
             child -= Infix_offset_val(child);
             hd = Hd_val(child);
           }
    

@@ -192,15 +189,13 @@
sz = Wosize_hd (hd);
for (i = 1; i < sz; i++){
curfield = Field (cur, i);

  •      weak_again:
    
  •        if (curfield != 0 && Is_block (curfield) && Is_in_heap (curfield)
    
  •            && Is_white_val (curfield)){
    
  •        if (curfield != 0 && Is_block (curfield) && Is_in_heap (curfield)){
             if (Tag_val (curfield) == Forward_tag){
    
  •            curfield = Forward_val (curfield);
    
  •            Field (cur, i) = curfield;
    
  •            goto weak_again;
    
  •            Field (cur, i) = Forward_val (curfield);
             }
    
  •          Field (cur, i) = 0;
    
  •          else if (Is_white_val (curfield){
    
  •            Field (cur, i) = 0;
    
  •          }
           }
         }
         weak_prev = &Field (cur, 0);
    


@vicuna
Copy link
Author

vicuna commented Aug 6, 2002

Comment author: administrator

Couldn't reproduce

@vicuna vicuna closed this as completed Aug 6, 2002
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant