Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005385OCamlOCaml generalpublic2011-10-25 16:412012-05-31 15:08
Reporterskilpat 
Assigned Todoligez 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
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

  -DMAC_OS_X_VERSION_MIN_REQUIRED=1050

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
(0006449)
protz (manager)
2011-12-21 14:28

Hi,

Can you submit a patch that fixes this?

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

Thanks,

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

Damien, have you had similar problems?
(0006738)
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?
(0006746)
xclerc (developer)
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.
(0006747)
protz (manager)
2012-01-20 10:21

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

My Xcode is Version 3.2.2 (1650).
(0006830)
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?
(0006888)
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.
(0006906)
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


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker