Bug 14742 - binding to omniture objective-c library with error: Task "BTouch" execution - FAILED
Summary: binding to omniture objective-c library with error: Task "BTouch" execution -...
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 6.4.4
Hardware: Macintosh Mac OS
: Highest major
Target Milestone: Untriaged
Assignee: Miguel de Icaza [MSFT]
Depends on:
Reported: 2013-09-13 19:57 UTC by Jon Goldberger [MSFT]
Modified: 2013-09-17 11:11 UTC (History)
3 users (show)

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

Binding Project (417.08 KB, application/zip)
2013-09-13 19:57 UTC, Jon Goldberger [MSFT]
Omniture Objective-C Library (412.84 KB, application/zip)
2013-09-13 19:57 UTC, Jon Goldberger [MSFT]
Binding of the Omniture for iOS binding. (472.00 KB, application/octet-stream)
2013-09-16 21:41 UTC, Miguel de Icaza [MSFT]
diff.patch (2.27 KB, patch)
2013-09-17 11:11 UTC, Rolf Bjarne Kvinge [MSFT]

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 Jon Goldberger [MSFT] 2013-09-13 19:57:06 UTC
Created attachment 4878 [details]
Binding Project

I am trying to create a binding project for omniture objective-c library


I followed xamarin instructions.
Although the build fails with error: Task "BTouch" execution - FAILED

The project is attached.

Version info:

=== Xamarin Studio ===

Version 4.0.12 (build 3)
Installation UUID: 2114da83-54a0-4ceb-9533-f49b1475096d
	Mono 3.2.0 ((no/7c7fcc7)
	GTK 2.24.20
	GTK# (
	Package version: 302000000

=== Xamarin.Android ===

Not Installed

=== Apple Developer Tools ===

Xcode 4.6.3 (2068)
Build 4H1503

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.iOS ===

Version: (Enterprise Edition)
Hash: 1336a36
Build date: 2013-10-09 11:14:45-0400

=== Build Information ===

Release ID: 400120003
Git revision: 593d7acb1cb78ceeeb482d5133cf1fe514467e39
Build date: 2013-08-07 20:30:53+0000
Xamarin addins: 25a0858b281923e666b09259ad4746b774e0a873

=== Operating System ===

Mac OS X 10.8.4
Darwin alexs-mac-mini 12.4.0 Darwin Kernel Version 12.4.0
    Wed May  1 17:57:12 PDT 2013
    root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64

Build Log:

Building Solution: Omniture.iOS (Release)

Building: Omniture.iOS (Release)

Build started 9/13/2013 6:10:31 PM.
Project "/Volumes/xamarin/_dj/Omniture.iOS-binding/Omniture.iOS/Omniture.iOS.csproj" (Build target(s)):
	Target PrepareForBuild:
		Configuration: Release Platform: AnyCPU
	Target GenerateSatelliteAssemblies:
	No input files were specified for target GenerateSatelliteAssemblies, skipping.
	Target GenerateBindings:
		Tool /Developer/MonoTouch/usr/bin/btouch execution started with arguments: /unsafe ApiDefinition.cs /s:StructsAndEnums.cs /tmpdir:obj/Release/ios/ /sourceonly:obj/Release/ios//sources.list 
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Xamarin.ObjcBinding.CSharp.targets: error : Tool exited with code: 1. Output: 
	Task "BTouch" execution -- FAILED
	Done building target "GenerateBindings" in project "/Volumes/xamarin/_dj/Omniture.iOS-binding/Omniture.iOS/Omniture.iOS.csproj".-- FAILED
Done building project "/Volumes/xamarin/_dj/Omniture.iOS-binding/Omniture.iOS/Omniture.iOS.csproj".-- FAILED


/Volumes/xamarin/_dj/Omniture.iOS-binding/Omniture.iOS/Omniture.iOS.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Xamarin.ObjcBinding.CSharp.targets (GenerateBindings target) ->

	/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Xamarin.ObjcBinding.CSharp.targets: error : Tool exited with code: 1. Output: 

	 0 Warning(s)
	 1 Error(s)

Time Elapsed 00:00:01.5479420

---------------------- Done ----------------------

Build: 1 error, 0 warnings
Comment 1 Jon Goldberger [MSFT] 2013-09-13 19:57:46 UTC
Created attachment 4879 [details]
Omniture Objective-C Library
Comment 3 Miguel de Icaza [MSFT] 2013-09-16 21:40:10 UTC
The binding has several problem, one of them proved fatal to the binding tool.

Some of the bugs:

* Export attribute without a selector, and with a null instead (that is the fatal problem)

* References to properties that do not exist

* Enumerations defined in the wrong place (in API contract instead of definitions)

* Selectors have been modified for no reason, so they dont match the native methods in Objective-C, so the result would have never worked ("InitWithClientCode" instead of "initWithClientCode:").   This happened almost in every selector, perhaps a tool made the selector uppercase?

* Selectors missing parameter separator (:) and some of the selectors are too short ("open" vs "open:length:something:else:")

* Use of the "System.Delegate" type instead of an actual delegate.

* References non-existent fields and classes

Attached is a fixed version.
Comment 4 Miguel de Icaza [MSFT] 2013-09-16 21:41:07 UTC
Created attachment 4907 [details]
Binding of the Omniture for iOS binding.

Fixed version of the binding, this one should work.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2013-09-17 11:11:07 UTC
Created attachment 4911 [details]

It's because you have [Export (null)] on some api. A ran into a few more build problems (with better error reporting though), and I'm attaching a diff of the changes I did to make it compile.