{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/Mobius/issues/452","repository_url":"https://api.github.com/repos/Microsoft/Mobius","labels_url":"https://api.github.com/repos/Microsoft/Mobius/issues/452/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/Mobius/issues/452/comments","events_url":"https://api.github.com/repos/Microsoft/Mobius/issues/452/events","html_url":"https://github.com/Microsoft/Mobius/issues/452","id":155332505,"number":452,"title":"Return CSharpBackend code 126 on OSX","user":{"login":"slyons","id":41403,"avatar_url":"https://avatars.githubusercontent.com/u/41403?v=3","gravatar_id":"","url":"https://api.github.com/users/slyons","html_url":"https://github.com/slyons","followers_url":"https://api.github.com/users/slyons/followers","following_url":"https://api.github.com/users/slyons/following{/other_user}","gists_url":"https://api.github.com/users/slyons/gists{/gist_id}","starred_url":"https://api.github.com/users/slyons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slyons/subscriptions","organizations_url":"https://api.github.com/users/slyons/orgs","repos_url":"https://api.github.com/users/slyons/repos","events_url":"https://api.github.com/users/slyons/events{/privacy}","received_events_url":"https://api.github.com/users/slyons/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-05-17T18:45:27Z","updated_at":"2016-05-25T01:34:38Z","closed_at":null,"body":"When I try to run the samples on OSX I get the following error:\r\n\r\n```\r\n[run-samples.sh] SPARK_VERSION=1.6.1, HADOOP_VERSION=2.6\r\n[run-samples.sh] JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/jre\r\n[run-samples.sh] SPARK_HOME=/opt/dev/work/Mobius/build/localmode/../tools/spark-1.6.1-bin-hadoop2.6\r\n[run-samples.sh] SPARKCLR_HOME=/opt/dev/work/Mobius/build/localmode/../runtime\r\n[run-samples.sh] SPARKCSV_JARS=\r\n[run-samples.sh] sparkclr-submit.sh --exe SparkCLRSamples.exe /opt/dev/work/Mobius/build/localmode/../runtime/samples spark.local.dir /opt/dev/work/Mobius/build/localmode/../runtime/Temp sparkclr.sampledata.loc /opt/dev/work/Mobius/build/localmode/../runtime/data debug\r\n[sparkclr-submit.sh] Command to run  --name SparkCLRSamples --class org.apache.spark.deploy.csharp.CSharpRunner /opt/dev/work/Mobius/build/runtime/lib/spark-clr_2.10-1.6.101-SNAPSHOT.jar /opt/dev/work/Mobius/build/localmode/../runtime/samples /opt/dev/work/Mobius/build/localmode/../runtime/samples/SparkCLRSamples.exe  spark.local.dir /opt/dev/work/Mobius/build/localmode/../runtime/Temp sparkclr.sampledata.loc /opt/dev/work/Mobius/build/localmode/../runtime/data debug\r\n[CSharpRunner.main] Starting CSharpBackend!\r\n[CSharpRunner.main] Port number used by CSharpBackend is 60061\r\n[CSharpRunner.main] adding key=spark.jars and value=file:/opt/dev/work/Mobius/build/runtime/lib/spark-clr_2.10-1.6.101-SNAPSHOT.jar to environment\r\n[CSharpRunner.main] adding key=spark.app.name and value=SparkCLRSamples to environment\r\n[CSharpRunner.main] adding key=spark.submit.deployMode and value=client to environment\r\n[CSharpRunner.main] adding key=spark.master and value=local[*] to environment\r\n[CSharpRunner.main] closing CSharpBackend\r\nRequesting to close all call back sockets.\r\n[CSharpRunner.main] Return CSharpBackend code 126\r\nUtils.exit() with status: 126, maxDelayMillis: 1000\r\n```\r\n\r\nThe build works and all unit tests work, but I can't seem to run samples or any custom code on Mobius."},"comment":{"url":"https://api.github.com/repos/Microsoft/Mobius/issues/comments/221450430","html_url":"https://github.com/Microsoft/Mobius/issues/452#issuecomment-221450430","issue_url":"https://api.github.com/repos/Microsoft/Mobius/issues/452","id":221450430,"user":{"login":"josephwinston","id":226217,"avatar_url":"https://avatars.githubusercontent.com/u/226217?v=3","gravatar_id":"","url":"https://api.github.com/users/josephwinston","html_url":"https://github.com/josephwinston","followers_url":"https://api.github.com/users/josephwinston/followers","following_url":"https://api.github.com/users/josephwinston/following{/other_user}","gists_url":"https://api.github.com/users/josephwinston/gists{/gist_id}","starred_url":"https://api.github.com/users/josephwinston/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/josephwinston/subscriptions","organizations_url":"https://api.github.com/users/josephwinston/orgs","repos_url":"https://api.github.com/users/josephwinston/repos","events_url":"https://api.github.com/users/josephwinston/events{/privacy}","received_events_url":"https://api.github.com/users/josephwinston/received_events","type":"User","site_admin":false},"created_at":"2016-05-25T01:34:38Z","updated_at":"2016-05-25T01:34:38Z","body":"Poor wording on my part in reporting the issue.\r\n\r\nI agree with the later part of your statement @skaarthik, you need ```mono``` to execute a \"PE32 executable for MS Windows (console) Intel 80386 32-bit Mono/.Net assembly\" on OS X (output of ```file SparkCLRSamples.exe```) as well on other Unix systems where ```binfmt``` is not in use.  \r\n\r\nThis Linux specific hack of using ```binfmt``` that is **not** recommended is described in http://www.mono-project.com/archived/guiderunning_mono_applications/#registering-exe-as-non-native-binaries-linux-only \r\n\r\nThe normal approach to this on Unix is to have a shell script.  Something like this from http://www.mono-project.com/docs/getting-started/application-deployment/#layout-recommendation:\r\n\r\n```bash\r\n #!/bin/sh\r\n\r\n# assume mono is on your path\r\n exec mono ${SPARKCLR_HOME}/build/runtime/private/SparkCLRSamples.exe \"$@\"\r\n```\r\n\r\nIf you name this script say ```SparkCLRSamples.exe``` and place the real version in something like ```${SPARKCLR_HOME}/build/runtime/private/SparkCLRSamples.exe``` you won't have to change either ```scala/src/main/org/apache/spark/launcher/SparkCLRSubmitArguments.scala``` or the tests in ```scala/src/test/scala/org/apache/spark/launcher/SparkCLRSubmitArgumentsSuite.scala```  If you don't an use another suffix, the logic in these two files will need to be changed.\r\n\r\nAnother OS X issue is that ```sed -i``` does not work the same on OS X as the ```gnu``` version.  The hack is to run ```sed -i '' ...```"}}
{"actor":{"display_login":"josephwinston"}}