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

Not compiling `opt` in OS X 10.6 #5385

Closed
vicuna opened this Issue Oct 25, 2011 · 9 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

commented Oct 25, 2011

Original bug ID: 5385
Reporter: skilpat
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2012-02-09T18:42:49Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 3.12.1
Fixed in version: 3.13.0+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @protz @xclerc @damiendoligez

Bug description

On 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 information

I have the exact same problem with version 3.12.0.

File attachments

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 21, 2011

Comment author: @protz

Hi,

Can you submit a patch that fixes this?

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

Thanks,

jonathan

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 22, 2011

Comment author: @protz

Damien, have you had similar problems?

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 19, 2012

Comment author: @xavierleroy

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?

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 20, 2012

Comment author: @xclerc

All my installations are Lion-based, so I cannot reproduce at once.
I will try to find some old DVD with 10.6.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 20, 2012

Comment author: @protz

My VirtualBox image is a 32-bit 10.6, unfortunately.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 23, 2012

Comment author: skilpat

My Xcode is Version 3.2.2 (1650).

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 27, 2012

Comment author: @damiendoligez

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?

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 6, 2012

Comment author: skilpat

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.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

commented Feb 9, 2012

Comment author: @damiendoligez

Fixed by adding a warning in configure.

Fixed in trunk [3.13.0] (commit 12143).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.