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

Spurious "PIE" warning in Mac OS X 10.7 Lion #5365

Closed
vicuna opened this issue Sep 29, 2011 · 5 comments
Closed

Spurious "PIE" warning in Mac OS X 10.7 Lion #5365

vicuna opened this issue Sep 29, 2011 · 5 comments
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Sep 29, 2011

Original bug ID: 5365
Reporter: mcandre
Assigned to: @damiendoligez
Status: closed (set by @xavierleroy on 2015-12-11T18:07:09Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 3.12.0
Category: ~DO NOT USE (was: OCaml general)
Monitored by: tgazagna @damiendoligez

Bug description

In Mac OS X 10.7 Lion, there's a spurious warning when ocamlscript is compiled, and whenever ocamlscript itself runs. This weird "PIE" warning is specific to Lion, but it appears across languages, in Haskell as well.

$ cat hello.ml
#!/usr/bin/env ocamlscript -o hello
print_endline "Hello World!"

$ ./hello.ml
ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in _caml_program from /var/folders/ch/_lv6l5q936n1xv03j5qp28y40000gn/T/camlstartup2188ff.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
Hello World!

@vicuna
Copy link
Author

vicuna commented Mar 28, 2012

Comment author: @damiendoligez

I cannot reproduce this problem with MacOS 10.7.3 and Xcode 4.3.2 with the current 4.00 branch.
Can you give us the output of the following commands?

gcc --version
ld -v
env

@vicuna
Copy link
Author

vicuna commented May 9, 2012

Comment author: raould

hello, i think i have seen something similar?? i was trying to build Haxe and saw this at the end:

ocamlopt -o ../bin/haxe libs/extLib.cmxa libs/extc/extc.cmxa libs/swflib/swflib.cmxa libs/xml-light/xml-light.cmxa libs/neko/neko.cmxa unix.cmxa str.cmxa ast.cmx lexer.cmx t
ype.cmx common.cmx parser.cmx typecore.cmx genxml.cmx optimizer.cmx typeload.cmx codegen.cmx gencommon.cmx genneko.cmx genas3.cmx genjs.cmx genswf8.cmx genswf9.cmx genswf.cmx
genphp.cmx gencpp.cmx gencs.cmx genjava.cmx interp.cmx typer.cmx main.cmx
ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in _caml_program from /var/folders/19/p8gbt95j12qdsqgddzzjzt
b80000gn/T/camlstartup1190db.o. To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie

Mac OS X 10.7.3

gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.1.00)

ld -v @(#)PROGRAM:ld PROJECT:ld64-127.2
llvm version 3.0svn, from Apple Clang 3.0 (build 211.10.1)

@vicuna
Copy link
Author

vicuna commented May 24, 2012

Comment author: @damiendoligez

I have a slightly later version of gcc (LLVM build 2336.9.00) and a definitely later version of ld:
@(#)PROGRAM:ld PROJECT:ld64-128.2
llvm version 3.1svn, from Apple Clang 3.1 (build 318.0.58)
and I don't get any warning when I compile haxe (I've tried OCaml 3.12.0, 3.12.1, and 4.00.0+dev).

Which version of Xcode do you have? Do you have the possibility of trying with Xcode 4.3.2?

@vicuna
Copy link
Author

vicuna commented May 24, 2012

Comment author: raould

the about box for xcode says Version 4.3 (4E71d).

@vicuna
Copy link
Author

vicuna commented Jul 10, 2012

Comment author: @damiendoligez

The warning has disappeared in later versions of XCode, so I'm suspending this PR. Please reopen if this is a real problem for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants