Bug 15517 - Xamarin not a Position Independent Executable
Summary: Xamarin not a Position Independent Executable
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 7.0.2.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-10-19 15:34 UTC by Ian
Modified: 2013-10-20 16:10 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Warning from Apple (68.43 KB, image/png)
2013-10-19 15:34 UTC, Ian
-v-v-v-v (414.77 KB, text/plain)
2013-10-20 13:20 UTC, Ian

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Ian 2013-10-19 15:34:08 UTC
Created attachment 5180 [details]
Warning from Apple

After upgrading to 7.0.3 O'm getting the attached warning from Apple when submitting apps.

I haven't changed anything that I know of in the build, all rather vanilla settings. No additional Options in the build.

Xamarin Studio
Version 4.0.13 (build 38)
Installation UUID: 501ceb77-86bf-470c-837e-d49442547207
	Mono 3.2.3 ((no/8d3b4b7)
	GTK+ 2.24.20 theme: Raleigh
	GTK# (
	Package version: 302030000

Apple Developer Tools
Xcode 4.6.3 (2068)
Build 4H1503

Xamarin.Mac: Not Installed

Version: 4.8.3 (Enterprise Edition)
Android SDK: /Users/vink/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

Version: (Enterprise Edition)
Hash: 57edee2
Build date: 2013-04-10 18:05:51-0400

Build Information
Release ID: 400130038
Git revision: 07afec667f7be5d0ee511eb7115bbac6377fbae8
Build date: 2013-09-24 08:53:29+0000
Xamarin addins: 61140345a5b109633a94409edcbc7a4c19a425c6

Operating System
Mac OS X 10.8.5
Darwin mac.local 12.5.0 Darwin Kernel Version 12.5.0
    Sun Sep 29 13:33:47 PDT 2013
    root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
Comment 1 Sebastien Pouliot 2013-10-20 11:15:49 UTC
Ian, could you attach the build log (add extra `-v -v -v -v) of your application ? We'll need to duplicate this to make sure we're producing a comparable binary.

PJ, can you have someone try to submit a "generic" build to Apple to see if we get any warnings (to see if the default options are fine or not).
Comment 2 Ian 2013-10-20 13:20:58 UTC
Created attachment 5184 [details]
Comment 3 Ian 2013-10-20 13:21:09 UTC
let me know if you need the source code
Comment 4 Sebastien Pouliot 2013-10-20 13:35:41 UTC
> After upgrading to 7.0.3

which upgrade ? Xamarin.iOS 7.0.3 ? your logs shows (like the bug summary)

Anyway I can see what's wrong from the provided log:

/Applications/Xcode4/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc  -Wl,-no_pie  -miphoneos-version-min=3.1 -arch armv7 -isysroot 

^ The -no_pie is the culprit. It's there because you're targeting iOS 3.1 as the minimum version. PIE binaries won't work with very old releases of iOS (so -no_pie is the default for them).

If you set your minimum version to iOS 4.2 (or later) then PIE will be the default and Apple should not warn you about it.
Comment 5 Ian 2013-10-20 16:10:45 UTC
Ah, mouse wheel must have caused the drop down on the properties page to scroll to 3.1.

Good catch!