Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006044OCamlOCaml generalpublic2013-06-20 14:572013-06-20 18:27
Reporteravsm 
Assigned Tolefessan 
PrioritylowSeveritytweakReproducibilityalways
StatusresolvedResolutionfixed 
Platform4.01.0devOSMacOS XOS Version
Product Version 
Target VersionFixed in Version4.01.0+dev 
Summary0006044: enabling frame pointers breaks build on MacOS X
DescriptionCompiling with ./configure -with-frame-pointers breaks the build on MacOS X. It might be less confusing to have the configure script explicitly error out with a "unsupported platform" error for non-x86_64/Linux rather than attempting to continue when frame pointers are requested.


+ ./boot/ocamlrun boot/myocamlbuild byte_stdlib_mixed_mode ocamlc lex/ocamllex ocamlbuild/ocamlbuildlib.cma ocamlbuild/ocamlbuildlightlib.cma ocamlbuild/ocamlbuild.byte ocamlbuild/ocamlbuildlight.byte
+ ./boot/ocamlrun boot/myocamlbuild byte_stdlib_mixed_mode ocamlc lex/ocamllex camlp4/Camlp4/Camlp4Ast.partial.ml camlp4/boot/camlp4boot.byte camlp4/Camlp4.cmo camlp4/Camlp4Top.cmo camlp4/camlp4prof.byte camlp4/mkcamlp4.byte camlp4/camlp4.byte camlp4/camlp4fulllib.cma camlp4/camlp4boot.byte camlp4/camlp4boot.cma camlp4/camlp4r.byte camlp4/camlp4r.cma camlp4/camlp4rf.byte camlp4/camlp4rf.cma camlp4...[truncated]
+ ./boot/ocamlrun boot/myocamlbuild native_stdlib_mixed_mode ocamlopt lex/ocamllex ocamlbuild/ocamlbuildlib.cmxa ocamlbuild/ocamlbuildlightlib.cmxa ocamlbuild/ocamlbuild.native ocamlbuild/ocamlbuildlight.native
ld: unknown option: -g
File "ocamlbuild/ocamlbuild_pack.cmx", line 1:
Error: Error during partial linking
make[1]: *** [ocamlbuild.native] Error 1
Steps To Reproduce(on MacOS X)
$ opam switch 4.01.0dev+fp
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0009589)
lefessan (developer)
2013-06-20 15:18

I am going to to add this test in ./configure when -with-frame-pointers is enabled:

  case "$host,$cc" in
    x86_64-*,gcc*)
       nativecccompopts="$nativecccompopts -g -fno-omit-frame-pointer"
       bytecccompopts="$bytecccompopts -g -fno-omit-frame-pointer"
       nativecclinkopts="$nativecclinkopts -g"
       echo "#define WITH_FRAME_POINTERS" >> m.h
       ;;
    *) echo "Unsupported architecture with frame pointers" 1>&2; exit 2;;
  esac

Do you think it is enough ? I cannot test on other architectures.
(0009590)
avsm (reporter)
2013-06-20 15:29

That diff doesn't fail for me on the Mac. This one does:


diff --git a/configure b/configure
index 4dbf21f..bae0f6e 100755
--- a/configure
+++ b/configure
@@ -1585,12 +1585,12 @@ if test "$with_frame_pointers" = "true"; then
   nativecclinkopts="$nativecclinkopts -g"
   echo "#define WITH_FRAME_POINTERS" >> m.h
 
- case "$cc" in
- gcc*)
+ case "$cc,$host" in
+ gcc*,x86_64-*-linux*)
       bytecccompopts="$bytecccompopts -fno-omit-frame-pointer"
       nativecccompopts="$nativecccompopts -fno-omit-frame-pointer";;
+ *) echo "Unsupported architecture for -with-frame-pointers" 1>&2; exit 2;;
   esac
-
 fi
(0009592)
lefessan (developer)
2013-06-20 18:27

Should be fixed by commit 13825 in both trunk and version/4.01

- Issue History
Date Modified Username Field Change
2013-06-20 14:57 avsm New Issue
2013-06-20 15:05 lefessan Assigned To => lefessan
2013-06-20 15:05 lefessan Status new => assigned
2013-06-20 15:18 lefessan Note Added: 0009589
2013-06-20 15:29 avsm Note Added: 0009590
2013-06-20 18:27 lefessan Note Added: 0009592
2013-06-20 18:27 lefessan Status assigned => resolved
2013-06-20 18:27 lefessan Fixed in Version => 4.01.0+dev
2013-06-20 18:27 lefessan Resolution open => fixed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker