idlj parameter invalid argument -td mac? - corba

Im trying to follow a tutorial to do a CORBA assignment.
project
-Client/HelloClient.java
-Server/HelloServer.java
-Hello.idl
I do the first step, trying to compile the IDL (from the project root), and it fails.
$ idlj –td Client –fclient Hello.idl
com.sun.tools.corba.se.idl.InvalidArgument: Invalid argument: –td.
java version "1.8.0_11"
$ ls -l
total 16
drwxr-xr-x 3 juliusskye staff 102 Oct 28 20:14 Client
-rw-r-----# 1 juliusskye staff 85 Oct 28 17:49 Hello.idl
drwxr-xr-x 3 juliusskye staff 102 Oct 28 17:52 Server
-rw-r--r-- 1 juliusskye staff 425 Oct 29 13:45 idljintro.iml
drwxr-xr-x 2 juliusskye staff 68 Oct 29 13:45 src
I found this which says CORBA has problems parsing paths with / in front. But mine doesn't have a /

apparently the Lecturer's instructions were wrong or outdated or the compiler is not fully working but compilation of all files is achieved by
idlj -fall hello.idl

Related

How to setup Jenkins Xcode plugin for workspaces?

I am green to the iOS app development space. I need to setup a build in Jenkins for a new Swift application I built. As part of that, I used Cocoapods to manage dependencies which in turn, meant I now had a workspace instead of a simple project.
I'm now trying to build this application as part of our pipepline and have hit the following error:
FATAL: Since there are multiple projects in the workspace, you must be specify the location of the target project as Xcode Project File.
Build step 'Xcode' marked build as failure
Finished: FAILURE
The root of my project looks as follows:
$ ls -la
total 32
drwxr-xr-x 14 mcbint staff 448 15 Jan 15:16 .
drwxr-xr-x 3 mcbint staff 96 15 Jan 14:33 ..
drwxr-xr-x 13 mcbint staff 416 16 Jan 11:11 .git
-rw-r--r-- 1 mcbint staff 108 15 Jan 14:56 .gitignore
-rw-r--r-- 1 mcbint staff 501 15 Jan 14:56 Podfile
-rw-r--r-- 1 mcbint staff 379 15 Jan 14:56 Podfile.lock
drwxr-xr-x 9 mcbint staff 288 15 Jan 15:16 Pods
-rw-r--r-- 1 mcbint staff 666 15 Jan 14:56 README.md
drwxr-xr-x 10 mcbint staff 320 15 Jan 14:56 mcb-phoneagent-ios
drwxr-xr-x 5 mcbint staff 160 15 Jan 15:16 mcb-phoneagent-ios.xcodeproj
drwxr-xr-x 4 mcbint staff 128 15 Jan 14:56 mcb-phoneagent-ios.xcworkspace
drwxr-xr-x 4 mcbint staff 128 15 Jan 14:56 mcb-phoneagent-iosTests
drwxr-xr-x 4 mcbint staff 128 15 Jan 14:56 mcb-phoneagent-iosUITests
drwxr-xr-x 2 mcbint staff 64 15 Jan 15:07 test-reports
I have setup the project in xcode as follows:
On my development machine I can successfully build the application with the command:
xcodebuild -workspace mcb-phoneagent-ios.xcworkspace -scheme mcb-phoneagent-ios
Does anybody see anything I've setup incorrectly?
This is how I resolved this issue when i ran into it:
Make sure that you have your scheme container set to the workspace (not the project. This can be checked in Xcode in Product -> Scheme -> Manage Schemes, then look in the column titled "Container")
confirm that the xcshareddata is in the workspace directory that Jenkins is using.
In Jenkins Under the General build settings of the Xcode there is a "Settings" button
click on it and find the Xcode schema file text box.
Fill that box in with the name of the xcsheme file you want to use for the given workspace that was entered as the Xcode Workspace file (in your case I'm guessing it would be mcb-phoneagent-ios).
Since you use Cocopod, you need to use the *.xcworkspace file, not the *.workspace,
and from personal experience much easier to archive and use *.app files with jenkins instead of letting it to build for u the projects

Xcode Unit Tests returns the NSURL of temp folder without 'private keyword'

I am writing Unit Tests in Objective C.
The following is my code:
NSString *testTempDirectory = [NSString stringWithFormat:#"%#%#", NSTemporaryDirectory(), #"DC_Tests"];
NSURL *parentDirURL = [NSURL fileURLWithPath:testTempDirectory];
NSURL *testFolderURL = [NSURL fileURLWithPath:testFolderPath];
Now the path in testFolderURL is returned as
/var/folders/31/2dpztnmx4fzfxb87qtn5_n0wc49pvz/T/DC_Tests/testFolder/
But the original path is
/private/var/folders/31/2dpztnmx4fzfxb87qtn5_n0wc49pvz/T/DC_Tests/testFolder/
The original path is my expected path and since it is different, my assertion is failing.
Any idea as to how do I get the complete path.
Note: I tried absolute string, doesn't help.
Note that in Mac OS, the var folder is actually a linked folder to /private/var
$ ls -l /
total 45
drwxrwxr-x+ 61 root admin 2074 Jun 11 08:58 Applications
drwxr-xr-x+ 63 root wheel 2142 Jul 6 2016 Library
drwxr-xr-x# 2 root wheel 68 Aug 24 2015 Network
drwxr-xr-x# 4 root wheel 136 Jun 9 18:56 System
drwxr-xr-x 6 root admin 204 Apr 22 2016 Users
drwxrwxrwt# 4 root admin 136 Jun 15 09:53 Volumes
drwxr-xr-x# 39 root wheel 1326 Jun 9 18:56 bin
drwxrwxr-t# 2 root admin 68 Aug 24 2015 cores
dr-xr-xr-x 3 root wheel 4312 Jun 9 18:57 dev
lrwxr-xr-x# 1 root wheel 11 Oct 18 2015 etc -> private/etc
dr-xr-xr-x 2 root wheel 1 Jun 9 18:58 home
-rw-r--r--# 1 root wheel 313 Aug 23 2015 installer.failurerequests
dr-xr-xr-x 2 root wheel 1 Jun 9 18:58 net
drwxr-xr-x# 6 root wheel 204 Oct 18 2015 private
drwxr-xr-x# 59 root wheel 2006 Jun 9 18:56 sbin
lrwxr-xr-x# 1 root wheel 11 Oct 18 2015 tmp -> private/tmp
drwxr-xr-x# 13 root wheel 442 Apr 19 2016 usr
lrwxr-xr-x# 1 root wheel 11 Oct 18 2015 var -> private/var
So the simplest way to fix your test is to ignore the /private part from the path. (We had a similar issue with paths that contain the tmp folder on Mac OS as well)

Gradle error when building the android-support-test project

I'm trying to build the Android Support Testing project. I'm following these instructions. I've got my build env setup and I've synced the Repo. When I try to build the project I get this error.
$ pwd
/Volumes/android/android-support-test
$ ls -l
-r--r--r-- 1 me staff 87 Feb 5 12:56 Makefile
-rw-r--r-- 1 me staff 749 Feb 5 16:14 android-support-test.iml
drwxr-xr-x 11 me staff 374 Feb 5 12:56 build
lrwxr-xr-x 1 me staff 31 Feb 5 12:57 build.gradle -> frameworks/testing/build.gradle
drwxr-xr-x 16 me staff 544 Feb 5 12:57 external
drwxr-xr-x 4 me staff 136 Feb 5 12:57 frameworks
drwxr-xr-x 3 me staff 102 Feb 5 16:14 gradle
-r-xr-xr-x 1 me staff 5884 Feb 5 12:57 gradlew
lrwxr-xr-x 1 me staff 35 Feb 5 12:57 local.properties -> frameworks/testing/local.properties
drwxr-xr-x 3 me staff 102 Feb 5 16:17 out
drwxr-xr-x 7 me staff 238 Feb 5 12:57 prebuilts
lrwxr-xr-x 1 me staff 34 Feb 5 12:57 settings.gradle -> frameworks/testing/settings.gradle
$ ./gradlew assembleDebug
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.5/userguide/gradle_daemon.html.
Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* Where:
Build file '/Volumes/android/android-support-test/frameworks/testing/build.gradle' line: 16
* What went wrong:
A problem occurred evaluating root project 'android-support-test'.
> Could not read script '/Volumes/android/android-support-test/version.gradle' as it does not exist.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.31 secs
The version.gradle file is in /Volumes/android/android-support-test/frameworks/testing but build.gradle is looking for it in /Volumes/android/android-support-test.
I think the aliasing of build.gradle -> frameworks/testing/build.gradle is not working correctly. Am I missing something?
The frameworks/testing Repo project should have contained an additional sym link, but you can just create it yourself:
ln -s frameworks/testing/version.gradle version.gradle
h/t to John Lombardo on the Android Testing Support Library google group

"no such module" on Xcode 7 beta 2

I saw this question, but I am still unable to import a framework and use it inside Xcode 7 beta 2 (7A121l).
So currently I am trying to use Result, via carthage. After adding it to Build Phases/ Link Binary with Binaries and Embed Frameworks I am able to compile successfully, but I get an error stating (yes it says success and then error :S):
No such module 'Result'
On the import:
import Result
func serverRequest() -> Result<String, NSError> {
...
}
The build is able to Run and Compile, but I am not able to cmd+click on Result, for example.
Edit 1:
On Xcode 6.3.2 it works as expected.
Edit 2:
Opened a radar: 21588771
Neil's answer is right, but there a very subtle difference how you set the FRAMEWORK_SEARCH_PATHS. So after adding it only to Build Phases/ Link Binary with Binaries, my initial setup was like this:
drwxr-xr-x 8 ruiperes staff 272 29 Jun 08:35 Playground
drwxr-xr-x 5 ruiperes staff 170 29 Jun 22:08 Playground.xcodeproj
drwxr-xr-x 4 ruiperes staff 136 29 Jun 00:12 PlaygroundTests
drwxr-xr-x 4 ruiperes staff 136 29 Jun 00:12 PlaygroundUITests
drwxr-xr-x 8 ruiperes staff 272 29 Jun 08:42 Result.framework
FRAMEWORK_SEARCH_PATHS = $(SRCROOT)/**
The above is the wrong setup and won't work. The working one below:
drwxr-xr-x 4 ruiperes staff 136 29 Jun 22:07 Frameworks
drwxr-xr-x 8 ruiperes staff 272 29 Jun 08:35 Playground
drwxr-xr-x 5 ruiperes staff 170 29 Jun 22:08 Playground.xcodeproj
drwxr-xr-x 4 ruiperes staff 136 29 Jun 00:12 PlaygroundTests
drwxr-xr-x 4 ruiperes staff 136 29 Jun 00:12 PlaygroundUITests
FRAMEWORK_SEARCH_PATHS = $(SRCROOT)/Frameworks/
You need to make sure that FRAMEWORK_SEARCH_PATHS in the xcodeproj includes the path where Result.framework is.

Heroku Pushing My Rails app as Play

I have a rails app called MBAToolbox. When I enter the directory and type "play", I get the following:
This is not a play application!
That's good! Now I type rails c and I am entered into the rails command line. Clearly this is a rails app. But when I type 'heroku create' and push 'git push heroku master', heroku tries to deploy this as a 'play' app?
I saw on their site that Heroku states:
Heroku Play framework support will be applied to applications that
match:
*/conf/application.conf in any directory except for the modules directory
, when determining to use Play.
I don't have that. My directory is as follows:
drwxr-xr-x 21 admin staff 714 Mar 22 00:20 .
drwxr-xr-x 26 admin staff 884 Mar 21 21:39 ..
-rw-r--r--# 1 admin staff 6148 Mar 21 23:37 .DS_Store
-rw-r--r-- 1 admin staff 430 Mar 21 21:39 .gitignore
drwxr-xr-x 12 admin staff 408 Mar 22 00:22 .idea
-rw-r--r-- 1 admin staff 935 Mar 21 22:38 Gemfile
-rw-r--r-- 1 admin staff 3884 Mar 21 22:38 Gemfile.lock
-rw-r--r-- 1 admin staff 9208 Mar 21 21:39 README.rdoc
-rw-r--r-- 1 admin staff 275 Mar 21 21:39 Rakefile
drwxr-xr-x 9 admin staff 306 Mar 21 21:57 app
drwxr-xr-x 10 admin staff 340 Mar 21 21:56 config
-rw-r--r-- 1 admin staff 160 Mar 21 21:39 config.ru
drwxr-xr-x 6 admin staff 204 Mar 22 00:06 db
drwxr-xr-x 3 admin staff 102 Mar 21 21:39 doc
drwxr-xr-x 5 admin staff 170 Mar 21 21:48 lib
drwxr-xr-x 4 admin staff 136 Mar 21 21:39 log
drwxr-xr-x 9 admin staff 306 Mar 21 23:37 public
drwxr-xr-x 3 admin staff 102 Mar 21 21:39 script
drwxr-xr-x 8 admin staff 272 Mar 21 21:39 test
drwxr-xr-x 6 admin staff 204 Mar 21 21:53 tmp
drwxr-xr-x 4 admin staff 136 Mar 21 21:39 vendor
Thoughts?
This article on the Heroku dev site covers both ends of this. It has a pointer to the actual source of the Play buildpack, so you can read the code that figures out which buildpack to use. You can also explicitly pick the Rails buildpack instead.

Resources