Bug 36570 - Missing quotes on path breaks AOT LLVM Compilation
Summary: Missing quotes on path breaks AOT LLVM Compilation
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2015-12-03 23:41 UTC by Jørgen Hermanrud Fjeld
Modified: 2016-01-13 16:49 UTC (History)
7 users (show)

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


Attachments
Test case (33.06 KB, application/zip)
2015-12-17 05:41 UTC, Prashant Cholachagudda
Details


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 for Bug 36570 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Jørgen Hermanrud Fjeld 2015-12-03 23:41:31 UTC
The command to run the AOT compiler fails to use quotes around filenames, and that breaks if the path contains a folder name with letters such as ' ' and '('.

To reproduce simply create a directory "A (Great) Client" and inside that directory create a simple new Xamarin Android App,
then try to compile in Release mode with AOT and LLVM.

The AOT compilation will fail with:
> [aot-compiler stderr] sh: -c: line 0: syntax error near unexpected token `('

The (first) problematic command is 

Such as show in this sample output from an actual project:
> "/Users/.../prebuilt/darwin-x86_64/bin/arm-linux-androideabi-ld"  -shared -o /Users/.../A (Great) Client/App/Droid/obj/Release/aot/armeabi-v7a/libaot-App.Droid.dll.so.tmp 

It would be correct to quote the path for arguments with " as well.
Comment 1 Prashant Cholachagudda 2015-12-17 05:37:02 UTC
## Full build log -
https://gist.github.com/jhf/3c3dfac58b4b04665c46#file-build-release-with-aot-llvm-failure-log

## Version Information - 

=== Xamarin Studio ===

Version 5.10.1 (build 6)
Installation UUID: 8907e317-b01c-4b34-bf2e-a221dc45ddc2
Runtime:
Mono 4.2.1 (explicit/6dd2d0d)
GTK+ 2.24.23 (Raleigh theme)

Package version: 402010102

=== Xamarin.Profiler ===

Version: 0.24.0.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.4.0.0 (Business Edition)
Hash: 7322991
Branch: master
Build date: 2015-12-08 16:20:29-0500

=== Xamarin.Android ===

Version: 6.0.0.34 (Business Edition)
Android SDK: /Users/jhf/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Not Installed

=== Build Information ===

Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

=== Operating System ===

Mac OS X 10.11.1
Darwin MacBook-Pro.b39.veridit.no 15.0.0 Darwin Kernel Version 15.0.0
Sat Sep 19 15:53:46 PDT 2015
root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64
Comment 2 Prashant Cholachagudda 2015-12-17 05:41:55 UTC
Created attachment 14337 [details]
Test case
Comment 3 Ram Chandra 2016-01-13 16:49:36 UTC
I have checked this issue and able to reproduce the reported behavior with the help of sample given in the bug description.

Screencast: http://www.screencast.com/t/IBZ0N6rSW0Yx
Application Output: https://gist.github.com/saurabh360/369344dfb5fccdf1119c
Ide Logs: https://gist.github.com/saurabh360/56d56fef5d1383467c5b

Environment Info:

=== Xamarin Studio ===

Version 5.10.2 (build 49)
Installation UUID: 2591d519-875d-4afe-a3d9-5fcf391bbd2d
Runtime:
	Mono 4.2.2 (explicit/11c1351)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010003

=== Xamarin.Profiler ===

Version: 0.19.26.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Apple Developer Tools ===

Xcode 7.2 (9548)
Build 7C68

=== Xamarin.iOS ===

Version: 9.4.1.20 (Enterprise Edition)
Hash: 122b860
Branch: master
Build date: 2016-01-05 20:20:30-0500

=== Xamarin.Android ===

Version: 6.0.1.5 (Enterprise Edition)
Android SDK: /Users/nischal/Desktop/sdkndk/android-sdk-macosx
	Supported Android versions:
		2.3    (API level 10)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 24.4
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.7.0_65"
Java(TM) SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Xamarin Android Player ===

Version: 0.6.1
Location: /Applications/Xamarin Android Player.app

=== Xamarin.Mac ===

Version: 2.5.0.3111 (Starter Edition)

=== Build Information ===

Release ID: 510020049
Git revision: deed4cd240ff3611c8742bbc62296e207f46173d
Build date: 2015-12-17 11:13:36-05
Xamarin addins: 8bd975e7b465f6fe812b64d736f3b7e8c1a79a3e
Build lane: monodevelop-lion-cycle6-c6sr1

=== Operating System ===

Mac OS X 10.10.5
Darwin nischal.local 14.5.0 Darwin Kernel Version 14.5.0
    Wed Jul 29 02:26:53 PDT 2015
    root:xnu-2782.40.9~1/RELEASE_X86_64 x86_64