Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005385OCaml~DO NOT USE (was: OCaml general)public2011-10-25 16:412012-05-31 15:08
Assigned Todoligez 
PlatformOSOS Version
Product Version3.12.1 
Target VersionFixed in Version3.13.0+dev 
Summary0005385: Not compiling `opt` in OS X 10.6
DescriptionOn my x86-64 machine running OS X 10.6, I cannot build the optimizing compiler from source. (Although `make world` succeeds.)

$ ./configure
$ make world
$ make opt
gcc -I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE -DTARGET_amd64 -DSYS_macosx -O -D_FILE_OFFSET_BITS=64 -D_REENTRANT -I/usr/include -c -o signals_asm.o signals_asm.c
signals_asm.c: In function ‘segv_handler’:
signals_asm.c:194: error: ‘struct __darwin_mcontext64’ has no member named ‘ss’
signals_asm.c:194: error: ‘struct __darwin_mcontext64’ has no member named ‘ss’
signals_asm.c:194: error: ‘struct __darwin_mcontext64’ has no member named ‘ss’
signals_asm.c:199: error: ‘struct __darwin_mcontext64’ has no member named ‘ss’
signals_asm.c:200: error: ‘struct __darwin_mcontext64’ has no member named ‘ss’
make[2]: *** [signals_asm.o] Error 1
make[1]: *** [makeruntimeopt] Error 2
make: *** [opt] Error 2

The problem appears to be that the "availability macro" MAC_OS_X_VERSION_MIN_REQUIRED is never defined but is checked (in order to define that missing symbol) in asmrun/signals_osdep.h. Perhaps this should be defined somewhere when it's known that the user's system is running OS X?

In any case, since I don't need to run the compiled binaries on any OS X version less than 10.5, I added the flag


to $FLAGS in asmrun/Makefile and the problem went away.
Additional InformationI have the exact same problem with version 3.12.0.
TagsNo tags attached.
Attached Filesdiff file icon osxbugpatch.diff [^] (487 bytes) 2011-12-21 14:45 [Show Content]

- Relationships

-  Notes
protz (manager)
2011-12-21 14:28


Can you submit a patch that fixes this?

Xavier, your laptop is a Mac. Have you had this issue?


protz (manager)
2011-12-22 11:16

Damien, have you had similar problems?
xleroy (administrator)
2012-01-19 20:29

To the reporter 'skilpat': do you happen to know which version of XCode is installed on your Mac?

To Damien Doligez and Xavier Clerc: can you reproduce? could you please investigate?
xclerc (reporter)
2012-01-20 09:12

All my installations are Lion-based, so I cannot reproduce at once.
I will try to find some old DVD with 10.6.
protz (manager)
2012-01-20 10:21

My VirtualBox image is a 32-bit 10.6, unfortunately.
skilpat (reporter)
2012-01-23 14:45

My Xcode is Version 3.2.2 (1650).
doligez (administrator)
2012-01-27 16:08

I'm compiling OCaml under 10.6.8 on a 64-bit machine several times per day...
My version of XCode is 3.2.6 (1761). I'll be surprised if it makes a difference.

skilpat, do you have the variable MACOSX_DEPLOYMENT_TARGET defined in your environment?
skilpat (reporter)
2012-02-06 15:10

Yes, MACOSX_DEPLOYMENT_TARGET is set to "10.4" in my .bash_profile, which I apparently added along with some other variables for the fink package manager. Not sure when or why I did that.

In any case, I stripped that from the environment and successfully built ocaml-3.12.0 without the Makefile patch I mentioned before. That environment variable seems to have been the cause of the problem all along.
doligez (administrator)
2012-02-09 19:42

Fixed by adding a warning in configure.

Fixed in trunk [3.13.0] (commit 12143).

- Issue History
Date Modified Username Field Change
2011-10-25 16:41 skilpat New Issue
2011-12-21 14:28 protz Note Added: 0006449
2011-12-21 14:45 skilpat File Added: osxbugpatch.diff
2011-12-22 11:16 protz Note Added: 0006495
2012-01-19 20:29 xleroy Note Added: 0006738
2012-01-19 20:29 xleroy Status new => feedback
2012-01-20 09:12 xclerc Note Added: 0006746
2012-01-20 10:21 protz Note Added: 0006747
2012-01-23 14:45 skilpat Note Added: 0006776
2012-01-23 14:45 skilpat Status feedback => new
2012-01-27 16:08 doligez Note Added: 0006830
2012-01-27 16:08 doligez Assigned To => doligez
2012-01-27 16:08 doligez Status new => feedback
2012-02-06 15:10 skilpat Note Added: 0006888
2012-02-06 15:10 skilpat Status feedback => assigned
2012-02-09 19:42 doligez Note Added: 0006906
2012-02-09 19:42 doligez Status assigned => closed
2012-02-09 19:42 doligez Resolution open => fixed
2012-02-09 19:42 doligez Fixed in Version => 3.13.0+dev
2012-05-31 15:08 doligez Severity minor => feature
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker