Why does lscm crash with on MacOS - rtc

I just installed the RTC command line tools (v 6.0.4) on my Mac (MacOS Sierra 10.12.6) in hopes of using the lscm command to check out files from an RTC repository. But lscm login (and many of the other lscm subcommands) fails with:
Unexpected exception
java.lang.NoClassDefFoundError: com/ibm/team/process/common/advice/IProcessReport
at com.ibm.team.filesystem.cli.client.internal.subcommands.LoginCmd.run(LoginCmd.java:83)
at com.ibm.team.filesystem.cli.core.AbstractSubcommand.run(AbstractSubcommand.java:51)
Anyone know what is going on?

Related

Gazebo GUI Not Showing Up when running WSL2 Graphics on Windows 11

I am attempting to use ROS with the Gazebo GUI. I recently upgraded to Windows 11 for the WSL GUI support and have the gedit GUI working. However, when I run the command $ gazebo, the GUI does not open.
Running $ gazebo --verbose gives the following error messages
[Err] [RenderEngine.cc:749] Can't open display: :0
[Err] [GuiIface.cc:124] This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
After enabling the QT Debug environment variable using export export QT_DEBUG_PLUGINS=1 and rerunning the gazebo command with the verbose option set, It shows me
[Dbg] [GuiIface.cc:112] Got keys from plugin meta data ("xcb")
[Dbg] [GuiIface.cc:112] QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/platforms" ...
[Dbg] [GuiIface.cc:112] loaded library "/usr/lib/x86_64-linux-gnu/qt5/plugins/platforms/libqxcb.so"
I believe that I have all of the necessary packages installed from this output, so I am wondering why gazebo is not showing up. I have tried uninstalling/reinstalling gazebo to no avail.
Thank you so much for your time. If I get this problem sorted out, I will post. Please let me know if any other system/output information is needed.
Other information:
I am not using X Server because the Windows 11 upgrade does not require it for graphical WSL applications (but did try it with X Server installed just in case)
I have tinkered around with the ~/.bashrc profile. DISPLAY=0:0 option was set, but I deleted this because Windows 11 did not need it (or so I think?)
Solution:
After reading up online, I found this answer to a similar question to mine.
https://superuser.com/questions/1681647/windows-11-wsl-not-opening-gui-in-my-ubuntu-shell
Getting ubuntu and re-installing gazebo on that worked. Now I can open up the Gazebo GUI.

Valgrind on macOS Sierra

I following this guide:
valgrind installation guide
After I have downloading the package, and I have run the sh script, but when I launch the make install command, it couldn't create the folder because it don't have the permission (even though I have used the sudo command).
Furthermore I tried with brew but I have this error:
valgrind: This formula either does not compile or function as expected on macOS
versions newer than El Capitan due to an upstream incompatibility.
Error: An unsatisfied requirement failed this build.
You can download Valgrind's latest version from their website. Then, you can just ./autogen.sh to install Valgrind. I personally did not encounter anything needed to make.
However, the sad news is, even the most recent version of Valgrind is not very usable on Mac OS Sierra. The reason is that Apple has not released the part of the source code that makes Valgrind crash, without which, the Valgrind maintainers can hardly do anything. You can read more about the discussion around the issue here .
Because Mac OS kernel is under Apple Public Source License, it has to be open-sourced someday. Thus, a Sierra-complitable version of Valgrind is only a matter of time.
Currently, I use Valgrind under Linux. This is all I can suggest now.
Latest Valgrind (git version 3.13.0) now works on MacOS Sierra but needs Xcode command line tools installed (installs needed headers).
Run this before building Valgrind:
xcode-select --install
Thanks goes to this post.
If you get an error similar to
valgrind: This formula either does not compile or function as expected
on macOS versions newer than Sierra due to an upstream
incompatibility.
you can try the workaround brew install --HEAD valgrind I found this information here https://www.gungorbudak.com/blog/2018/04/28/how-to-install-valgrind-on-macos-high-sierra/
If you happen to be on Sierra still, this works (but not on High Sierra), just do
$ brew install valgrind
valgrind: This formula either does not compile or function as expected on macOS
versions newer than Sierra due to an upstream incompatibility.
Error: An unsatisfied requirement failed this build.
Update: seems it works on "High Sierra" OOTB now too, it now says:
...versions newer than High Sierra due to an upstream incompatibility...
The easy alternative to valgrind on mac is called 'leaks'. It is a command-line tool, so if you don't already have xcode command-line tools installed, do so with
'xcode-select --install'.
Then, to test for leaks, just compile your prog then run
'leaks -atExit -- ./your_prog'

How to make Titanium (SDK) work?

After an update to Titanium SDK 3.5.0 on MacBooks with Yosemite there occur several issues on all my developer machines, which prevents me from working on current projects:
The issues
"ti info" stops due to an exception in longjohn.js (see attached below)
"ti setup" stops with another exception while spawning a childProcess
Titanium Studio doesnt find my iOS SDK, although there is at least iOS SDK 8.1 installed and work perfectly in XCode (further information provided below)
After each start of Titanium Studio there occurs an error dialog stating "An internal error occured during Computing SDK Info, java.lang.NullPointerException", which seems to be related to the Issue under #3, which i mentioned above.
Because of the points mentioned above it is not possible to build any iOS Application with titanium
The installed versions:
node: 0.12.0
npm: 2.5.1
Titanium CLI: 3.4.1.201410281727
Titanium SDK version: 3.5.0.GA
java: 1.8.0_25
OSX: 10.10.2 (Yosemite)
XCode: 6.1.1
iOS SDK: 8.1
The error messages
1. "ti info": (in terminal)
Titanium Command-Line Interface, CLI version 3.4.1, Titanium SDK version 3.5.0.GA
Copyright (c) 2012-2014, Appcelerator, Inc. All Rights Reserved.
Please report bugs to http://jira.appcelerator.org/
|[ERROR] Failed to run command "info"
/usr/local/lib/node_modules/titanium/node_modules/longjohn/dist/longjohn.js:185
throw e;
^
logger.log (/usr/local/lib/node_modules/titanium/lib/logger.js:72:21),target.(anonymous function) [as error] (/usr/local/lib/node_modules/titanium/node_modules/winston/lib/winston/common.js:45:21),CLI.<anonymous> (/usr/local/lib/node_modules/titanium/lib/cli.js:955:17),/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:119:25,Object.<anonymous> (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:24:16),CLI._fireHookCallback (/usr/local/lib/node_modules/titanium/lib/hook.js:269:12),/usr/local/lib/node_modules/titanium/lib/hook.js:248:10,/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:232:13,async.eachSeries (/usr/local/lib/node_modules/titanium/node_modules/async/lib/async.js:130:20)
ha
2. "ti setup" (terminal)
> Where do you want to go? 1
|[ERROR] TypeError: Incorrect value of args option
at normalizeSpawnArguments (child_process.js:952:11)
at exports.spawn (child_process.js:984:38)
at run (/Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/node-appc/lib/subprocess.js:47:14)
at Object.detect (/Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/node-appc/lib/jdk.js:71:3)
at async.parallel.jdk (/Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/titanium-sdk/lib/android.js:71:13)
at /Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/async/lib/async.js:524:25
at /Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/async/lib/async.js:111:13
at Array.forEach (native)
at _each (/Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/async/lib/async.js:32:24)
at async.each (/Users/<user>/Library/Application Support/Titanium/mobilesdk/osx/3.5.0.GA/node_modules/async/lib/async.js:110:9)
3. Titanium Studio doesnt find any iOS SDK:
I already executed:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Then i enter "Titanium Studio -> Preferences -> Studio -> Platforms -> iOS". The setting for iOS SDK Home is empty and shows "Not specified".
But iOS SDK for 8.1 is already installed:
Some important messages from the Titanium Studio Log File:
!MESSAGE An internal error occurred during: "Computing SDK Info...".
!STACK 0
java.lang.NullPointerException
at com.appcelerator.titanium.ui.portal.processor.MobileSDKConfigurationHelper.getVersionInfo(MobileSDKConfigurationHelper.java:133)
at com.appcelerator.titanium.ui.portal.processor.MobileSDKConfigurationProcessor.computeStatus(MobileSDKConfigurationProcessor.java:74)
at com.aptana.configurations.processor.AbstractConfigurationProcessor.getStatus(AbstractConfigurationProcessor.java:154)
at com.appcelerator.titanium.ui.portal.actionController.MobileSDKActionController$1.run(MobileSDKActionController.java:127)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
!MESSAGE An internal error occurred during: "Sending Analytics Ping ...".
!STACK 0
java.lang.NullPointerException
at com.aptana.usage.internal.DefaultAnalyticsEventHandler.getAnalyticsLogger(DefaultAnalyticsEventHandler.java:207)
at com.aptana.usage.internal.DefaultAnalyticsEventHandler.sendEventSync(DefaultAnalyticsEventHandler.java:241)
at com.aptana.usage.internal.DefaultAnalyticsEventHandler$1.run(DefaultAnalyticsEventHandler.java:75)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
!ENTRY com.aptana.core 4 1 2015-02-20 11:37:18.555
!MESSAGE sudo: a password is required
!ENTRY com.appcelerator.titanium.core 4 0 2015-02-20 11:38:17.801
!MESSAGE (Build 3.4.1.201410281727) [ERROR] Unable to locate the CLI executable. Please restart Studio or use Help > Check for Titanium Updates to install Titanium CLI.
(Funny side effect: asking questions like this one in appcelerators developer forum will be rejected immediatly with the message "This data was not accepted because it was flagged as spam." (i tried it out in multiple variations))
What can i do know?
Using the older version of Node (10.33) resolved the issue for me.
I used the node package manager to install "n" which allows you to switch versions (you'll need to run it as sudo):
npm install -g n
Then switch the version, also as sudo:
n 0.10.33
Funny fact: Appcelerator Titanium isn't working with Node 0.12.
To solve all these issues with one step i only needed to switch back from Node 0.12 to Node 0.10.35.
(OS Yosemite)
If anyone else is having this issue, please check permissions to the following folder:
/Users/user.folder/Library/Application Support/Titanium/mobilesdk/osx/
Make sure to apply permissions to all subfolders / files. I had a permissions issue on my machine, after re-installing titanium 2 times, downgrading node to all kinds of different versions, and following all instructions in various stacked overflow threads.

Timeout when running xcodebuild tests under Xcode 6 via SSH

I seem to be having issues with integrating Xcode6 with jenkins, I currently have this setup and working with Xcode 5.
With xcode 6 running remotely via SSH the simulator time-out, when I run locally it succeeds.
Command
xcodebuild -workspace PROJECTNAME.xcworkspace -scheme BGO_Tests -destination 'platform=iOS Simulator,name=iPhone 5s' -derivedDataPath ./Build clean test
2014-08-19 10:46:36.591 xcodebuild[33966:381f] iPhoneSimulator: Timed out waiting 120 seconds for >simulator to boot, current state is 1.
Testing failed:
Test target BGO_Tests encountered an error (Timed out waiting 120 seconds for simulator to boot, current state is 1
Tested with recent Xcode 6 beta 6
Note: the device names changed in Xcode 7, so you no longer specify them using iPhone 5 (9.1 Simulator) but rather iPhone 5 (9.1).
Use xcrun instruments -s to get the current list of devices and then you can pre-launch it using:
xcrun instruments -w "iPhone 5 (9.1)" || echo "(Pre)Launched the simulator."
Prelaunching
I got to a point where what I proposed down there wasn't working anymore. In addition to making the changes mentioned here, you need to launch the simulator xcodebuild is expecting BEFORE xcodebuild is ran:
# First get the UDID you need
xcrun instruments -s
# Then launch it
open -a "iOS Simulator" --args -CurrentDeviceUDID <sim device UDID>
# and wait some time....
sleep 5
# Then launch your unit tests
xcodebuild [...] -destination 'platform=iOS Simulator,name=<device name matching the UDID>'
Old post
This bug is fixed in Xcode 6.3 and above. If you are experiencing similar problems in newer Xcode, it's likely another bug.
Apple follow up regarding Bug ID# 18001199:
The context provided by LaunchDaemons is not supported for running GUI
applications. The SSH service, and the default setup for Jenkins, are
both implemented as LaunchDaemons. In earlier versions of Xcode 5
xcodebuild could run tests on the iOS simulator in this context, but
that was never a supported configuration, and as you have noted that
is no longer working as of Xcode 6.
Unlike LaunchDaemons, LaunchAgents provide a context where you can run
GUI applications - if the user is logged in at the time, with a window
server / Aqua session. Converting your Jenkins configuration from
being a LaunchDaemon to being a LaunchAgent would avoid the reported
issue. You can also use launchd for running tests on the iOS simulator
from a SSH session, either by crafting a LaunchAgent and manually
loading / starting that, or by using "launchctl submit”.
Ok, after some more digging around the comments around here (many thanks to Opal), I found out that launching the slave via JNLP instead works.
As many people mentioned, it is not currently possible to run the unit test over SSH, so you might want to turn towards the JNLP agent for now until Apple fixes it.
If connecting with JNLP still does not solve it, try the solution mentioned in this comment.
i.e.: Run these on command line:
DevToolsSecurity -enable
sudo dscl . -append /Groups/_developer GroupMembership "user-that-runs-the-sim"
security authorizationdb write system.privilege.taskport is-developer
See References here and here.
I've recently found out that if you install a new version of Xcode and do not launch it. The simulator might start timing out again. To solve this, I've had to manually launch Xcode, and install the additional tools it requested.
I ended up solving this on Xcode 5 by doing the steps here, essentially running:
sudo security authorizationdb write system.privilege.taskport allow
This will eliminate one class of these authentication popups. You’ll also need to run:
sudo DevToolsSecurity -enable
However, once I upgraded to Xcode 6, I now get an infinite hang when trying to run xcodebuild tests over SSH. They continue to run just fine as long as I'm logged into the console, and running them from the keyboard.
I ran into the same issue. My working theory is that SSH on OSX is started as a LaunchDaemon, and LaunchDaemons are not allowed to present a UI; Reference.
I was able to work around the issue by using Java Web Start to launch the Jenkins slave. I then installed the Jenkins slave as a launchd service.
Unfortunately the Jenkins slave then installs itself as a -you've guessed it- LaunchDaemon, leading to the exact same problem of not being able to launch the tests; Reference.
I worked around that issue by moving the Jenkins Slave LaunchDaemon plist and jar files in /System/Library/LaunchDaemons into ~/Library/LaunchAgents, and updated the paths inside the plist file.
That finally allowed me to run XCode6 (Beta6) tests on an OSX jenkins slave.
I finally managed to find a good simple solution. JNLP was causing numerous issues with our jenkins server.
Workaround for SSH timeout via https://corner.squareup.com/2015/07/ios-build-infrastructure.html
"Mavericks (10.9) and Yosemite (10.10) determine if a process can access accessibility hooks via the parentage of the accessing process. By putting launchd in the list of allowed processes, processes launched via SSH or Jenkins have access to the accessibility hooks across the system. To do this you can modify the TCC database, per this gist. A reboot is required to make the change take effect."
#!/bin/bash
# This will add lauchd to the list of allowed processes for accessibility access
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db "INSERT or REPLACE INTO access VALUES('kTCCServiceAccessibility','/sbin/launchd',1,1,1,NULL)"
# This outputs the rows in the TCC database
sudo sqlite3 /Library/Application\ Support/com.apple.TCC/TCC.db 'select * from access'
echo "Restart is required for these changes to take effect"
Update 8/02/2016
This is now fixed in Xcode 7.2.1 ("Command line tool ‘xcodebuild test’ will no longer time out waiting for Simulator.app to launch")
I've seen this error before, one possibility is that since you probably downloaded the Xcode6 Beta from the internet (not the appstore as its not available yet), the machine you are trying to run it on will show a pop up asking you if you really want to open this app as its from the internet.
The same will happen when xcodebuild tries to launch the iPhone simulator app.
One thing you might want to try is to share screen with the machine and click "Open" in that pop up.
If that still doesn't work, I would try to:
Reset the Content & Settings of the simulator
Reboot the machine and make sure no simulator is running on start up (you can just choose not to re-open any app when restarting)

Error installing ruby on rails on mac osx 10.8

I am first time installing Ruby on Rails on a Mac OSX 10.8 machine and it is generating the following error :-
Error running './configure --prefix=/Users/tcs/.rvm/rubies/ruby-1.9.3-p392 --with-opt- dir=/usr/local/opt/libyaml:/usr/local/opt/readline:/usr/local/opt/libxml2:/usr/local/opt/libxslt:/usr/local/opt/libksba:/usr/local/opt/openssl:/usr/local/opt/sqlite --disable-install-doc --without-tcl --without-tk --enable-shared',
please read /Users/tcs/.rvm/log/ruby-1.9.3-p392/1366722478_configure.log
There has been an error while running configure. Halting the installation.
I have read lot of blogs and articles but this error sticks every time I try to install RoR.
I have Xcode 4.6 installed on the Mac.
if the c compiler can't creat executables you probably just need to install the Xcode command line tools.