Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004861OCamlOCaml generalpublic2009-09-08 14:212010-05-12 15:54
Reporterjohnwhitington 
Assigned Todoligez 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.11.1 
Target VersionFixed in Version3.11.2 
Summary0004861: OS X Intel dmg for 3.11.1 installs ocaml which doesn't work on OS X 10.6
DescriptionInstalling the standard intel dmg for 3.11.1 from caml.inria.fr, and compiling a simple file:

feast:~ john$ ocamlopt -c a.ml
/var/folders/Wn/Wntolm9pFXGlJQS2eW4HfE+++TI/-Tmp-/camlasm42597e.s:25:32-bit absolute addressing is not supported for x86-64
/var/folders/Wn/Wntolm9pFXGlJQS2eW4HfE+++TI/-Tmp-/camlasm42597e.s:25:cannot do signed 4 byte relocation
/var/folders/Wn/Wntolm9pFXGlJQS2eW4HfE+++TI/-Tmp-/camlasm42597e.s:52:unknown section type: non_lazy_symbol_pointers
/var/folders/Wn/Wntolm9pFXGlJQS2eW4HfE+++TI/-Tmp-/camlasm42597e.s:52:Rest of line ignored. 1st junk character valued 32 ( ).
File "a.ml", line 1, characters 0-1:
Error: Assembler error, input left in file /var/folders/Wn/Wntolm9pFXGlJQS2eW4HfE+++TI/-Tmp-/camlasm42597e.s

I'm not sure if this was expected or not, but am reporting for completeness.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0005080)
xleroy (administrator)
2009-09-13 18:57

Could it be that under 10.6 gcc defaults to 64-bit mode, while under 10.5 it defaults to 32-bit mode? We'll have to figure this out. In the meantime, recompilation from sources is advised. Configure either with -cc "gcc -m32" or "gcc -m64" to make sure that you get the mode (32 or 64 bits) that you want.
(0005082)
johnwhitington (reporter)
2009-09-14 11:35

Unfortunately, ./configure -cc "gcc -m32" won't compile:

gcc -c -DSYS_macosx -o i386.o i386.S || \
    { echo "If your assembler produced syntax errors, it is probably unhappy with the"; echo "preprocessor. Check your assembler, or try producing i386.o by hand."; exit 2; }
i386.S:95:32-bit absolute addressing is not supported for x86-64
i386.S:95:cannot do signed 4 byte relocation
i386.S:97:32-bit absolute addressing is not supported for x86-64
i386.S:97:cannot do signed 4 byte relocation
i386.S:100:suffix or operands invalid for `push'

-cc "gcc -m64" works fine.

(the ./configure for gcc -m32):

Configuration for the bytecode compiler:
        C compiler used........... gcc -m32
        options for compiling..... -fno-defer-pop -no-cpp-precomp -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT
        options for linking....... -lcurses -lpthread
        shared libraries are supported
        options for compiling..... -fno-defer-pop -no-cpp-precomp -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT
        command for building...... gcc -m32 -bundle -flat_namespace -undefined suppress -read_only_relocs suppress -o lib.so /a/path objs
Configuration for the native-code compiler:
        hardware architecture..... i386
        OS variant................ macosx
        C compiler used........... gcc -m32
        options for compiling..... -Wall -D_FILE_OFFSET_BITS=64 -D_REENTRANT
        options for linking.......
        assembler ................ as
        preprocessed assembler ... gcc -c
        profiling with gprof ..... supported
Source-level replay debugger: supported
Additional libraries supported:
        unix str num dynlink bigarray systhreads threads graph dbm labltk
Configuration for the "num" library:
        target architecture ...... ia32 (asm level 2)
Configuration for the "graph" library:
        options for compiling .... -I/usr/X11R6/include
        options for linking ...... -L/usr/X11R6/lib -lX11
Configuration for the "labltk" library:
        use tcl/tk version ....... 8.5
        options for compiling ....
        options for linking ...... -ltk8.5 -ltcl8.5
(This is with 3.11.0, since 3.11.1 doesn't work, as discussed elsewhere).
(0005118)
xclerc (developer)
2009-09-24 21:20

It seems that -cc "gg -m32" is not enough to build in 32-bit mode,
you need to also pass -as "as -arch i386" -aspp "gcc -m32 -c" to
the ./configure script.

Tested successfully with 3.11.1 on MacOS X 10.6.1 running on top of an Intel Core 2 Duo.

On this configuration, a bare ./configure with no argument is enough to build a 64-bit version.
(0005119)
johnwhitington (reporter)
2009-09-25 16:21

Yes, this works for me too. Thanks.

- Issue History
Date Modified Username Field Change
2009-09-08 14:21 johnwhitington New Issue
2009-09-13 18:57 xleroy Note Added: 0005080
2009-09-13 18:57 xleroy Status new => feedback
2009-09-13 18:57 xleroy Status feedback => assigned
2009-09-13 18:57 xleroy Assigned To => doligez
2009-09-14 11:35 johnwhitington Note Added: 0005082
2009-09-24 21:20 xclerc Note Added: 0005118
2009-09-25 16:21 johnwhitington Note Added: 0005119
2010-05-12 15:54 doligez Status assigned => closed
2010-05-12 15:54 doligez Resolution open => fixed
2010-05-12 15:54 doligez Fixed in Version => 3.11.2


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker