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
4.00.0+beta2 fails to compile with llvm/clang 3.1 on OS X #5643
Comments
Comment author: @protz Does it help if you edit config/Makefile after the configure step and set ASM_CFI_SUPPORTED to false? |
Comment author: mww yes, that fixes it! |
Comment author: @ygrek Please, can you run configure with -verbose option? |
Comment author: mww log of |
Comment author: @ygrek As far as I understand clang supports CFI and it was correctly detected. But looks like ocamlopt is not calling clang, can you run the failing command with -verbose switch? i.e. : ../boot/ocamlrun ../ocamlopt -verbose -warn-error A -nostdlib -g |
Comment author: @ygrek Ah, indeed, configure sets assembler to 'as'. Try ./configure -cc cc -aspp 'cc -c' -as 'cc -c' |
Comment author: mww With ... |
Comment author: mww The full log of configure and build with |
Comment author: @ygrek Obvious fix attached, please test |
Comment author: mww compiles with 'loc-line-numbers.diff' |
Comment author: @ygrek Please disregard loc-line-numbers.diff as it hides the real problem. |
Comment author: @ygrek Prevent the original problem by checking that both $as and $aspp understand CFI directives (configure-cfi-detect.diff) |
Comment author: @xavierleroy Applied the last two patches (debuginfo-is-none and configure-cfi-detect) in 4.00 branch (r12610) and in trunk (r12611). |
Original bug ID: 5643
Reporter: mww
Status: closed (set by @xavierleroy on 2015-12-11T18:07:02Z)
Resolution: fixed
Priority: normal
Severity: minor
Platform: Darwin/Intel
OS: Mac OS X
OS Version: 10.6.4
Version: 3.12.1
Fixed in version: 4.00.0+dev
Category: configure and build/install
Bug description
The 4.00.0+beta2 fails to compile with clang/llvm from XCode 4.3.2:
When building with the default compiler (clang) on OS X 10.7 with XCode 4.3.2, the build of ocaml fails.
Steps to reproduce
./configure -no-tk -cc cc -aspp 'cc -c'
make world.opt
OR more explicitely:
./configure -no-tk -cc /usr/bin/clang -aspp '/usr/bin/clang -c'
make world.opt
Additional information
'cc' points to '/usr/bin/clang' by default with the Apple developer tools on this platform/version;
a build log of the failed compilation can be found here:
http://build.macports.org/builders/buildports-lion-x86_64/builds/1562/steps/compile/logs/stdio
The error looks as follows:
../boot/ocamlrun ../ocamlopt -warn-error A -nostdlib -g
./Compflags pervasives.cmx
-c pervasives.ml/tmp/camlasm1f3d36.s:636:Unknown pseudo-op: .cfi_startproc
/tmp/camlasm1f3d36.s:678:Unknown pseudo-op: .cfi_endproc
/tmp/camlasm1f3d36.s:684:Unknown pseudo-op: .cfi_startproc
/tmp/camlasm1f3d36.s:686:Unknown pseudo-op: .cfi_adjust_cfa_offset
/tmp/camlasm1f3d36.s:686:Rest of line ignored. 1st junk character valued 56 (8).
File attachments
The text was updated successfully, but these errors were encountered: