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
Bad architecture detection on Mac OS X 64bit #4863
Comments
Comment author: Ashish_Agarwal This issue appears to have been fixed in OCaml 3.12. The problem persists in 3.11, but note the suggestion of using uname -m does not work for me; it also returns i386. $ uname -a $ uname -p $ uname -m |
Comment author: @damiendoligez This problem disappeared because Apple's latest linkers don't support -read-only-relocs, so we had to stop using it. |
Comment author: @mmottl It seems this problem is present (again?) in OCaml 3.12.1: /Users/mmottl/local/godi312//bin/ocamlmklib -o lib/bin_prot lib/common_stubs.o lib/write_stubs.o lib/read_stubs.o |
Comment author: @damiendoligez Markus, are you using Mac OS 10.7 (Lion) ? It is not detected correctly by the configure script of 3.12.1. |
Comment author: @mmottl Damien, yes, I'm using Lion. I unfortunately cannot easily test that the error above went away with the patch, but it at least seems that the architecture is recognized correctly now by configure. The patch will probably work. |
Comment author: @xclerc The proposed patch works for me on Lion with a Core 2 Duo. |
Comment author: @protz As far as I can tell, svn revision 11163 « configure correctly under Mac OS 10.7 Lion (darwin11) » (by Damien) fixes the issue, closing. |
Original bug ID: 4863
Reporter: @mmottl
Assigned to: @damiendoligez
Status: closed (set by @xavierleroy on 2017-02-16T14:14:10Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11.1
Fixed in version: 3.13.0+dev
Category: ~DO NOT USE (was: OCaml general)
Has duplicate: #5379
Related to: #6900
Monitored by: avaron Ashish_Agarwal jm pascal_cuoq
Bug description
Calling ocamlmklib on Mac OS X 64bit leads to a linker warning:
ld: warning: -read_only_relocs cannot be used with x86_64
This seems to be due to the configure file in the OCaml distribution taking this branch:
i[3456]86--darwin)
instead of this one:
-apple-darwin)
This, again, is a consequence of config.guess using "uname -p": the latter returns i386 even though the machine is clearly running on x86_64. It seems that using "uname -m" would work here, though I am not sure whether it would do so elsewhere.
Without the "-read_only_relocs suppress" option, which is passed to the C-compiler, the warning will disappear.
Here is the full verbose output of such an ocamlmklib invocation:
ocamlmklib -verbose -L/sw/lib -o lacaml_stubs impl_c.o utils_c.o vec2_S_c.o vec2_D_c.o vec2_C_c.o vec2_Z_c.o mat4_S_c.o mat4_D_c.o mat4_C_c.o mat4_Z_c.o impl4_S_c.o impl4_D_c.o impl4_C_c.o impl4_Z_c.o impl2_S_c.o impl2_D_c.o impl2_C_c.o impl2_Z_c.o exp10.o -framework vecLib
ld: warning: -read_only_relocs cannot be used with x86_64
File attachments
The text was updated successfully, but these errors were encountered: