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

[welter@i3.informatik.rwth-aachen.de: Re: Big Brother/OCaml for Mac OS X] #2698

Closed
vicuna opened this issue Mar 5, 2001 · 0 comments
Closed
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 5, 2001

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

Bug description

Bonjour à tous,

Je vous envoie une copie d'un problème qu'a eu un utilisateur pour
installer O'Caml sous MacOS X. Le compte-rendu ci-dessous concerne
la version 3.0, mais je lui ai recommandé ensuite d'essayer la
version cvs et il m'a annoncé qu'il n'y avait aucune différence.

Les problèmes en résumé:

  • plein d'erreurs de syntaxe du compilo C, résolus si on ajoute
    #undef _GNUC dans misc.h (il a apparemment trouvé cette idée
    dans la distrib de Caml-Light).
  • l'option -lm n'est pas reconnue par le compilo C. Il a essayé
    de la retirer, ça accepte de compiler mais ensuite le fichier
    produit (ocamlrun) fait bus error à l'exécution.

Merci,

--
François Pottier
Francois.Pottier@inria.fr
http://pauillac.inria.fr/~fpottier/


Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA07387 for fpottier@pauillac.inria.fr; Mon, 5 Mar 2001 10:08:30 +0100 (MET)
Received: from i3.informatik.rwth-aachen.de (bach.Informatik.RWTH-Aachen.DE [137.226.168.34])
by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f2598T919173
for Francois.Pottier@inria.fr; Mon, 5 Mar 2001 10:08:29 +0100 (MET)
Received: from i3.informatik.rwth-aachen.de (welter@mussorgsky [137.226.168.46])
by i3.informatik.rwth-aachen.de (8.8.8/8.8.8/i3hub)
with ESMTP id KAA04291; Mon, 5 Mar 2001 10:08:26 +0100 (MET)
Sender: welter@i3.informatik.rwth-aachen.de
Message-ID: 3AA3668F.ED2B7C2E@i3.informatik.rwth-aachen.de
Date: Mon, 05 Mar 2001 11:12:31 +0100
From: Ralf Welter welter@i3.informatik.rwth-aachen.de
Organization: Lehrstuhl =?iso-8859-1?Q?f=FCr?= Informatik III, RWTH-Aachen
X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.17I3 i686)
X-Accept-Language: de, en-GB, en
MIME-Version: 1.0
To: Francois.Pottier@inria.fr
Subject: Re: Big Brother/OCaml for Mac OS X
References: 200102281300.OAA02552@i3.informatik.rwth-aachen.de 20010228143805.A11172@pauillac.inria.fr 3A9D2A04.785BBC2D@i3.informatik.rwth-aachen.de 20010228170454.A14129@pauillac.inria.fr
Content-Type: multipart/mixed;
boundary="------------EA4C096FC09768B706D7C636"

This is a multi-part message in MIME format.
--------------EA4C096FC09768B706D7C636
Content-Type: text/plain; charset=x-user-defined
Content-Transfer-Encoding: 7bit

Hi!

I hope you had a nice weekend!

Francois Pottier wrote:

I indeed encountered some problems, but not while compiling BB, even
when I tried building Camllight.
I just send them to caml@inria.fr, so we might just get it fixed...

You need to build Objective Caml, not Caml Light (those are different
languages)... Objective Caml specifically supports MacOS X, as far as
I know.
I tried that, and will let you know what happened. (Well, it didn't
quite work out)
The first problem was at the stage "make world" being swamped by syntax
errors.
As I had already tried to install camllight, I could tried the fix
described in that INSTALL-file:
MACHINE-SPECIFIC HINTS:
...

  • On some Next machines. cc pretends to be gcc but is not quite gcc.
    If the compilation of src/runtime/interp.c causes syntax errors, insert
    #undef GNUC at the very beginning of src/runtime/misc.h.
    Due to the different architecture, I applied the patch to byterun/misc.h
    and did make clean, just to be sure.

[tragfix:Desktop/Mittwoch/ocaml-3.00] root# ./configure
Configuring for a powerpc-apple-rhapsody ...
gcc found
The C compiler is ANSI-compliant.
Checking the sizes of integers and pointers...
OK, this is a regular 32 bit architecture.
No suitable 64-bit integer type found, Int64.t will not be supported.
This is a big-endian architecture.
Doubles can be word-aligned.
ranlib found
#! appears to work in shell scripts
Function "memmove" is provided and handles overlapping moves correctly.
Function "bcopy" is provided and handles overlapping moves correctly.
POSIX signal handling found.
strerror() found.
times() found.
termcap functions found (with libraries '')
You have BSD sockets.
unistd.h found.
dirent.h found.
rewinddir() found.
mkfifo() found.
getcwd() found.
getwd() found.
getpriority() found.
utime() found.
utimes() found.
dup2() found.
fchmod() found.
truncate() found.
select() found.
sys/select.h found.
symlink() found.
waitpid() found.
wait4() found.
getgroups() found.
POSIX termios found.
Asynchronous I/O are supported.
setitimer() found.
gethostname() found.
uname() found.
gettimeofday() found.
mktime() found.
setsid() found.
putenv() found.
setlocale() and <locale.h> found.
mmap() found.
Replay debugger supported.
Threads library supported (using bytecode-level scheduling).
Location of X11 include files: /usr/X11R6/include/X11
Options for linking with X11: -ccopt -L/usr/X11R6/lib -cclib -lX11
NDBM found (in /usr/include)
Configuring LablTk...
tcl.h not found.
Configuration failed, LablTk will not be built.

** Configuration summary **

Directories where Objective Caml will be installed:
binaries.................. /usr/local/bin
standard library.......... /usr/local/lib/ocaml
manual pages.............. /usr/local/man/man1 (with extension
.1)
Configuration for the bytecode compiler:
C compiler used........... gcc
options for compiling..... -fno-defer-pop -Wall -Wno-unused
options for linking....... -lm
Configuration for the native-code compiler:
hardware architecture..... power (ppc)
OS variant................ rhapsody
C compiler used........... gcc
options for compiling..... -Wall -Wno-unused -DSHRINKED_GNUC
options for linking....... -lm
assembler ................ $(AS)
preprocessed assembler ... $(AS)
profiling with gprof ..... not supported
Source-level replay debugger: supported
Configuration for the external libraries:
libraries supported ...... unix str num dynlink bigarray threads
graph dbm
The "num" library:
target architecture ...... C
The "graph" library:
options for compiling .... -I/usr/X11R6/include
options for linking ...... -ccopt -L/usr/X11R6/lib -cclib -lX11
The "labltk" library: configuration failed

-- Despite the warnings, I gave the further process a try...
[tragfix:Desktop/Mittwoch/ocaml-3.00] root# make world
cd byterun; make all
sed -n -e '/^ /s/ ([A-Z])/ &&lbl_\1/gp'
-e '/^}/q' instruct.h > jumptbl.h
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o interp.o interp.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o misc.o misc.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o stacks.o stacks.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o fix_code.o fix_code.c
fix_code.c:27: warning: could not use precompiled header
'/System/Library/Frameworks/System.framework/Headers/bsd/unistd.p',
because:
fix_code.c:27: warning: macro 'BSD_SIZE_T' redefined, locations of the
conflict are:
fix_code.c:27: warning:
/System/Library/Frameworks/System.framework/Headers/bsd/ppc/ansi.h:51
(within this precompiled header)
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o startup.o startup.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o main.o main.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o freelist.o freelist.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o major_gc.o major_gc.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o minor_gc.o minor_gc.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o memory.o memory.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o alloc.o alloc.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o roots.o roots.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o fail.o fail.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o signals.o signals.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o printexc.o printexc.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o compare.o compare.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o ints.o ints.c
ints.c: In function copy_int64': ints.c:422: warning: control reaches end of non-void function ints.c: In function int64_neg':
ints.c:425: warning: control reaches end of non-void function
ints.c: In function int64_add': ints.c:428: warning: control reaches end of non-void function ints.c: In function int64_sub':
ints.c:431: warning: control reaches end of non-void function
ints.c: In function int64_mul': ints.c:434: warning: control reaches end of non-void function ints.c: In function int64_div':
ints.c:437: warning: control reaches end of non-void function
ints.c: In function int64_mod': ints.c:440: warning: control reaches end of non-void function ints.c: In function int64_and':
ints.c:443: warning: control reaches end of non-void function
ints.c: In function int64_or': ints.c:446: warning: control reaches end of non-void function ints.c: In function int64_xor':
ints.c:449: warning: control reaches end of non-void function
ints.c: In function int64_shift_left': ints.c:452: warning: control reaches end of non-void function ints.c: In function int64_shift_right':
ints.c:455: warning: control reaches end of non-void function
ints.c: In function int64_shift_right_unsigned': ints.c:458: warning: control reaches end of non-void function ints.c: In function int64_of_int':
ints.c:461: warning: control reaches end of non-void function
ints.c: In function int64_to_int': ints.c:464: warning: control reaches end of non-void function ints.c: In function int64_of_float':
ints.c:467: warning: control reaches end of non-void function
ints.c: In function int64_to_float': ints.c:470: warning: control reaches end of non-void function ints.c: In function int64_of_int32':
ints.c:473: warning: control reaches end of non-void function
ints.c: In function int64_to_int32': ints.c:476: warning: control reaches end of non-void function ints.c: In function int64_of_nativeint':
ints.c:479: warning: control reaches end of non-void function
ints.c: In function int64_to_nativeint': ints.c:482: warning: control reaches end of non-void function ints.c: In function int64_format':
ints.c:485: warning: control reaches end of non-void function
ints.c: In function int64_of_string': ints.c:488: warning: control reaches end of non-void function gcc -O -fno-defer-pop -Wall -Wno-unused -c -o floats.o floats.c gcc -O -fno-defer-pop -Wall -Wno-unused -c -o str.o str.c gcc -O -fno-defer-pop -Wall -Wno-unused -c -o array.o array.c gcc -O -fno-defer-pop -Wall -Wno-unused -c -o io.o io.c gcc -O -fno-defer-pop -Wall -Wno-unused -c -o extern.o extern.c gcc -O -fno-defer-pop -Wall -Wno-unused -c -o intern.o intern.c intern.c: In function intern_rec':
intern.c:116: warning: `v' might be used uninitialized in this function
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o hash.o hash.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o sys.o sys.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o meta.o meta.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o parsing.o parsing.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o gc_ctrl.o gc_ctrl.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o terminfo.o terminfo.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o md5.o md5.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o obj.o obj.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o lexing.o lexing.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o callback.o callback.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o debugger.o debugger.c
debugger.c:47: warning: could not use precompiled header
'/System/Library/Frameworks/System.framework/Headers/bsd/unistd.p',
because:
debugger.c:47: warning: macro 'GNUC' previously defined on command
line for precomp not defined
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o weak.o weak.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o compact.o compact.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o finalise.o finalise.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o custom.o custom.c
ar rc libcamlrun.a interp.o misc.o stacks.o fix_code.o startup.o main.o
freelist.o major_gc.o minor_gc.o memory.o alloc.o roots.o fail.o
signals.o printexc.o compare.o ints.o floats.o str.o array.o io.o
extern.o intern.o hash.o sys.o meta.o parsing.o gc_ctrl.o terminfo.o
md5.o obj.o lexing.o callback.o debugger.o weak.o compact.o finalise.o
custom.o
ranlib libcamlrun.a
sed -n -e '//* ML *//s/.* ([a-z0-9_][a-z0-9_]) (./\1/p'
alloc.c array.c compare.c extern.c floats.c gc_ctrl.c hash.c
intern.c interp.c ints.c io.c lexing.c md5.c meta.c obj.c parsing.c
signals.c str.c sys.c terminfo.c callback.c weak.c finalise.c >
primitives
(echo '#include "mlvalues.h"';
echo '#include "prims.h"';
sed -e 's/.
/extern value &();/' primitives;
echo 'c_primitive cprim[] = {';
sed -e 's/./ &,/' primitives;
echo ' 0 };';
echo 'char * names_of_cprim[] = {';
sed -e 's/.
/ "&",/' primitives;
echo ' 0 };') > prims.c
gcc -O -fno-defer-pop -Wall -Wno-unused -c -o prims.o prims.c
gcc -fno-defer-pop -Wall -Wno-unused -o ocamlrun prims.o libcamlrun.a
-lm
/usr/bin/ld: can't locate file for: -lm
make[1]: *** [ocamlrun] Error 1
make: *** [coldstart] Error 2

-- Well ok. Some of the warnings were expected, due to the Missing/not
found? Int64Type.
But then the error "can't find files for -lm" is actually the same I
experienced with camlLight. But, to give you more data, I tried to
workaround that one, too, simply leaving out the -lm option (I don't
know its semantics, anyway)

[tragfix:Desktop/Mittwoch/ocaml-3.00] root# cd byterun/
[tragfix:Mittwoch/ocaml-3.00/byterun] root# gcc -fno-defer-pop -Wall
-Wno-unused -o ocamlrun prims.o libcamlrun.a -lm
/usr/bin/ld: can't locate file for: -lm
[tragfix:Mittwoch/ocaml-3.00/byterun] root# gcc -fno-defer-pop -Wall
-Wno-unused -o ocamlrun prims.o libcamlrun.a
[tragfix:Mittwoch/ocaml-3.00/byterun] root# cd ..
[tragfix:Desktop/Mittwoch/ocaml-3.00] root# make world
cd byterun; make all
make[1]: Nothing to be done for all'. cp byterun/ocamlrun boot/ocamlrun cd yacc; make all gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o closure.o closure.c gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o error.o error.c gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o lalr.o lalr.c gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o lr0.o lr0.c gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o main.o main.c gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o mkpar.o mkpar.c mkpar.c: In function unused_rules':
mkpar.c:204: warning: suggest explicit braces to avoid ambiguous `else'
gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o output.o
output.c
gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o reader.o
reader.c
gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o skeleton.o
skeleton.c
gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o symtab.o
symtab.c
gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o verbose.o
verbose.c
gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -c -o warshall.o
warshall.c
gcc -O -DNDEBUG -fno-defer-pop -Wall -Wno-unused -o ocamlyacc closure.o
error.o lalr.o lr0.o main.o mkpar.o output.o reader.o skeleton.o
symtab.o verbose.o warshall.o
cp yacc/ocamlyacc boot/ocamlyacc
cd stdlib; make COMPILER=../boot/ocamlc all
../boot/ocamlrun ../boot/ocamlc -g -nopervasives -c pervasives.mli
make[1]: *** [pervasives.cmi] Bus error
make: *** [coldstart] Error 2

Well, this was the point where I decided to ask you for help again ;-)
If I can assist with any further information.

Greetings, ralf

--

-- Unless otherwise stated, I don't speak for anyone but myself! --

--------------EA4C096FC09768B706D7C636
Content-Type: text/x-vcard; charset=x-user-defined;
name="welter.vcf"
Content-Transfer-Encoding: base64
Content-Description: Card for Ralf Welter
Content-Disposition: attachment;
filename="welter.vcf"

YmVnaW46dmNhcmQgCm46V2VsdGVyO1JhbGYKdGVsO2hvbWU6KCs0OSkgMjQxIDE1NTIxMgp0
ZWw7d29yazooKzQ5KSAyNDEgODAgMjEzMTIKeC1tb3ppbGxhLWh0bWw6RkFMU0UKdXJsOmh0
dHA6Ly9ob21lcGFnZS5tYWMuY29tL3JhbGZfd2VsdGVyCm9yZzpSV1RIIEFhY2hlbjtMZWhy
c3R1aGwgZvxyIEluZm9ybWF0aWsgSUlJCmFkcjo7O0JlZ2luZW5zdHIuIDE7QWFjaGVuOzs1
MjA2MjtHZXJtYW55CnZlcnNpb246Mi4xCmVtYWlsO2ludGVybmV0OndlbHRlckBpMy5pbmZv
cm1hdGlrLnJ3dGgtYWFjaGVuLmRlCnRpdGxlO3F1b3RlZC1wcmludGFibGU6RGlwbC4gSW5m
b3JtLiA9M0ItKQp4LW1vemlsbGEtY3B0OjstMjA4MDAKZm46UmFsZiBXZWx0ZXIKZW5kOnZj
YXJkCg==
--------------EA4C096FC09768B706D7C636--



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