
Hi All. I've installed on my Mac the new MacOS X 10.7 (Lion) with Xcode 4.1 Using ghc 7.0.4 (64-bit) on that system a get the following warnings in the linking phase: Linking hslint ... ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in ___gmpn_modexact_1c_odd from /Library/Frameworks/GHC.framework/Versions/7.0.4-x86_64/usr/lib/ghc-7.0.4/integer-gmp-0.2.0.3/libHSinteger-gmp-0.2.0.3.a(mode1o.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie Is this something to worrying about? Thanks in advance for any answer. Luca

I think the warnings are not a big concern. I silence both of them by adding -optl"-Wl,-no_compact_unwind,-no_pie" to my ghc options in /usr/bin/ghc. In 10.7 they changed the default linking options to create a PIE (position independent executable). To create a PIE you have to compile all code as position independent, which is the default option of GHC on mac os x. For performance reasons some code is compiled with absolute references (like the gmp library code in your example) so it cannot be used when creating a PIE. The advantage of a PIE executable is that it is more secure because the OS can load it at a random base address. I believe the "compact unwind" warning is related to the creation of unwind frames for error handling with exceptions in languages like C++. There are some more details in this trac ticket: http://hackage.haskell.org/trac/ghc/ticket/5019. I'm not sure what the advantage of the compact unwind is, but it sounds like it could make the executable smaller. -David On Jul 25, 2011, at 7:59 AM, Luca Ciciriello wrote:
Hi All. I've installed on my Mac the new MacOS X 10.7 (Lion) with Xcode 4.1
Using ghc 7.0.4 (64-bit) on that system a get the following warnings in the linking phase:
Linking hslint ... ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in ___gmpn_modexact_1c_odd from /Library/Frameworks/GHC.framework/Versions/7.0.4-x86_64/usr/lib/ghc-7.0.4/integer-gmp-0.2.0.3/libHSinteger-gmp-0.2.0.3.a(mode1o.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
Is this something to worrying about?
Thanks in advance for any answer.
Luca _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Does this mean I can finally switch back to Lion and expect GHC to work? That's very exciting news! :D On Jul 25, 2011, at 10:33 AM, David Peixotto wrote:
I think the warnings are not a big concern. I silence both of them by adding -optl"-Wl,-no_compact_unwind,-no_pie" to my ghc options in /usr/bin/ghc.
In 10.7 they changed the default linking options to create a PIE (position independent executable). To create a PIE you have to compile all code as position independent, which is the default option of GHC on mac os x. For performance reasons some code is compiled with absolute references (like the gmp library code in your example) so it cannot be used when creating a PIE. The advantage of a PIE executable is that it is more secure because the OS can load it at a random base address.
I believe the "compact unwind" warning is related to the creation of unwind frames for error handling with exceptions in languages like C++. There are some more details in this trac ticket: http://hackage.haskell.org/trac/ghc/ticket/5019. I'm not sure what the advantage of the compact unwind is, but it sounds like it could make the executable smaller.
-David
On Jul 25, 2011, at 7:59 AM, Luca Ciciriello wrote:
Hi All. I've installed on my Mac the new MacOS X 10.7 (Lion) with Xcode 4.1
Using ghc 7.0.4 (64-bit) on that system a get the following warnings in the linking phase:
Linking hslint ... ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in ___gmpn_modexact_1c_odd from /Library/Frameworks/GHC.framework/Versions/7.0.4-x86_64/usr/lib/ghc-7.0.4/integer-gmp-0.2.0.3/libHSinteger-gmp-0.2.0.3.a(mode1o.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
Is this something to worrying about?
Thanks in advance for any answer.
Luca _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Jack Henahan jhenahan@uvm.edu == Computer science is no more about computers than astronomy is about telescopes. -- Edsger Dijkstra ==

Yes. You have also to install Xcode 4.1. Preinstalled Xcode 4.0.1 doesn't work on Lion Luca. On Jul 26, 2011, at 3:02 AM, Jack Henahan wrote:
Does this mean I can finally switch back to Lion and expect GHC to work? That's very exciting news! :D
On Jul 25, 2011, at 10:33 AM, David Peixotto wrote:
I think the warnings are not a big concern. I silence both of them by adding -optl"-Wl,-no_compact_unwind,-no_pie" to my ghc options in /usr/bin/ghc.
In 10.7 they changed the default linking options to create a PIE (position independent executable). To create a PIE you have to compile all code as position independent, which is the default option of GHC on mac os x. For performance reasons some code is compiled with absolute references (like the gmp library code in your example) so it cannot be used when creating a PIE. The advantage of a PIE executable is that it is more secure because the OS can load it at a random base address.
I believe the "compact unwind" warning is related to the creation of unwind frames for error handling with exceptions in languages like C++. There are some more details in this trac ticket: http://hackage.haskell.org/trac/ghc/ticket/5019. I'm not sure what the advantage of the compact unwind is, but it sounds like it could make the executable smaller.
-David
On Jul 25, 2011, at 7:59 AM, Luca Ciciriello wrote:
Hi All. I've installed on my Mac the new MacOS X 10.7 (Lion) with Xcode 4.1
Using ghc 7.0.4 (64-bit) on that system a get the following warnings in the linking phase:
Linking hslint ... ld: warning: could not create compact unwind for _ffi_call_unix64: does not use RBP or RSP based frame ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in ___gmpn_modexact_1c_odd from /Library/Frameworks/GHC.framework/Versions/7.0.4-x86_64/usr/lib/ghc-7.0.4/integer-gmp-0.2.0.3/libHSinteger-gmp-0.2.0.3.a(mode1o.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie
Is this something to worrying about?
Thanks in advance for any answer.
Luca _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
_______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Jack Henahan jhenahan@uvm.edu == Computer science is no more about computers than astronomy is about telescopes. -- Edsger Dijkstra == <398E692F.gpg>
participants (3)
-
David Peixotto
-
Jack Henahan
-
Luca Ciciriello