Jenkins Build, Execute Shell Error - ruby

I'm trying to trigger a shell command via Jenkins 2.54 on Build. I've had this running in the past but decided to rebuild my mac 'clean' without TimeMachine..
In the background, i'm using a node.js app for building applications in Agile Central (Rally) - All of this works fine and even the shell command I use runs in the Shell (Fish to be precise).
As far as I can tell I have all the dependancies installed as this works when running from cmd line..
The command I'm using:
ruby /g2ca/git2ca_agile_central.rb devOps
As mentioned in the shell directly this does everything I need, takes a commit with an artefact ID such as a user story US01 and adds the expected outcome to the user stories Change Set:
BUT.. Jenkins throws a fit in it's console:
+ ruby /g2ca/git2ca_agile_central.rb devOps /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require': cannot load such file -- vcseif (LoadError) from
/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require' from /g2ca/git2ca_agile_central.rb:35:in `' Build
step 'Execute shell' marked build as failure
I'm no professional coder by any stretch!!! So go easy here as I could be way out of my depth, but this is baffling me..
I'm using Brew also, if it helps here is the output from
Brew Config
HOMEBREW_VERSION: 1.1.12
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 8ea778f7c7ea790694485030d105a92a9416ef33
Last commit: 9 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 55a35bb74627e9eee9537dc726ac07c3dbc59444
Core tap last commit: 7 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.0.0-p648
Clang: 8.1 build 802
Git: 2.11.0 => /Applications/Xcode.app/Contents/Developer/usr/bin/git
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/local/bin/ruby => /usr/local/Cellar/ruby/2.4.1_1/bin/ruby
Java: 1.8.0_121
macOS: 10.12.4-x86_64
Xcode: 8.3.1
CLT: N/A
X11: N/A
Do I have a ruby missmatch between my shell and Jenkins??
Here's what i'm using:
RallyConnectorForGit-3.7_3
Node 5.4.1
rally_api 1.2.1
httpclient 2.8.3
vcseif 1.2.0
Jenkins 2.54
I'm lost... Anything else you need please shout!

This is fixed was ruby version on HBrew

Related

error installing ruby old version 2.0.0-p247

I am trying to run command
rbenv install 2.0.0-p247
I tried to follow several steps by googling the errors that I faced but I am still not able to resolve the error
I got this error
BUILD FAILED (macOS 11.4 using ruby-build 20210804)
Inspect or clean up the working tree at /var/folders/xm/rfncj90s56x8d1wdj0sl_0w40000gn/T/ruby-build.20210814020658.2987.F4rCnt
Results logged to /var/folders/xm/rfncj90s56x8d1wdj0sl_0w40000gn/T/ruby-build.20210814020658.2987.log
Last 10 log lines:
compiling ancdata.c
compiling raddrinfo.c
installing default socket libraries
compiling constants.c
1 warning generated.
linking shared-object ripper.bundle
ld: warning: directory not found for option '-L/Users/username/.rbenv/versions/2.0.0-p247/lib'
linking shared-object socket.bundle
ld: warning: directory not found for option '-L/Users/username/.rbenv/versions/2.0.0-p247/lib'
make: *** [build-ext] Error 2
The log file mentioned above has content:
https://easyupload.io/gygw5y
Ruby 2.0.0 is very much past its end of life, so I'm assuming you have a specific reason you need install it. Otherwise, you are much better off installing a modern, supported version such as 2.7.x or 3.0.x.
Older versions of ruby were built with openssl#1.0. After 1.0 went end of life, ruby-build had a breaking change to require openssl#1.1. This means that ruby versions < 2.4 can no longer be installed/built directly using ruby-build (i.e., rbenv). This GitHub issue has details.
Homebrew has removed its openssl#1.0 formula, but you can still install it via an rbenv tap. The following might work for you, though the comments in the issue report mixed results depending on the version of Command Line Tools being used.
brew install rbenv/tap/openssl#1.0
RUBY_CONFIGURE_OPTS="--with-openssl-dir=$(brew --prefix openssl#1.0)" 2.0.0-p247
Note: if you are running on an M1 (Apple Silicon) Mac, you might be out of luck. AFIK, there's no intention of getting openssl#1.0 to to work on Apple Silicon.

OSX fix Selenium Chromedriver launch error spawn Unknown system error -86 Bad CPU type in executable?

Suddenly on the afternoon of January 6, 2021, my Selenium Protractor tests under OSX stopped working with the mysterious error
spawn Unknown system error -86
I did some research and discovered that error number 86 is the same as
Bad CPU type in executable
and ran the following to compare the cpu architecture of my chromedriver binary to my system:
% file chromedriver_87.0.4280.88
chromedriver_87.0.4280.88: Mach-O 64-bit executable arm64
% uname -a
Darwin kobl179273m 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
% uname -p
i386
How can I fix the chromedriver binary used by my Selenium so that it will run on my Intel x64 mac and clear the "system error -86" or "Bad CPU type" message?
The issue is described in https://github.com/angular/webdriver-manager/issues/476.
This has been now fixed in 12.1.8 so just update to that webdriver manager.
For most users this can be accomplished with
npm uninstall protractor && npm install protractor
Edit: this answer should be considered deprecated now that the underlying bug in webdriver-manager has been fixed. A better solution would be to upgrade to the newest version of webdriver-manager. The answer below may be useful if people need to use an older version of webdriver-manager which still has the bug.
As per Deepak Srinivasan's comment above, this error is caused by https://github.com/angular/webdriver-manager/issues/476
Root Cause:
The ChromeDriver team added "_m1" to the end of the filename for their Apple Silicon ARM builds of Chromedriver -- but both the Silicon and Intel versions of chromedriver have "mac64" in the filename, and the version number is exactly the same. This causes webdriver-manager to always download the Silicon build of Chromedriver, even on Intel macs. As a general solution, simply avoid using the chromedriver that has _m1 in its filename if you are on an Intel mac.
Solution 1: Downgrade to Chrome 86.0.4240.198 and Chromedriver 86.0.4240.22. These versions work together and are the most recent versions prior to the new and problematic support for Silicon ARM
Chrome 86 download page:
https://google-chrome.en.uptodown.com/mac/download/2920124
Disable auto-updates in Chrome: https://superuser.com/questions/1359017/how-do-i-disable-automatic-updates-of-google-chrome-on-mac-os-x
Chromedriver 86: https://chromedriver.storage.googleapis.com/index.html?path=86.0.4240.22/
% webdriver-manager update --versions.chrome=86.0.4240.22
Solution 2: Modify the webdriver-manager npm package to point to the correct chromedriver (thanks to ciekaway from the angular github issue page for this fix)
Modify the following file
node_modules/webdriver-manager/built/lib/files/file_manager.js
or, if using protractor
node_modules/protractor/node_modules/webdriver-manager/built/lib/files/file_manager.js
Near the top of the downloadFile method around line 166, add the following line to remove "_m1" from the name of the file:
fileUrl.url = fileUrl.url.replace(/_m1/, '');
It needs to be after the beginning of the .then block that starts with
binary.getUrl(binary.version()).then(fileUrl => {
it also needs to be before the next reference to fileUrl.
For example:
binary.getUrl(binary.version()).then(fileUrl => {
binary.versionCustom = fileUrl.version;
fileUrl.url = fileUrl.url.replace(/_m1/, '');
let filePath = path.resolve(outputDir, binary.filename());
Note that this solution is temporary. It will be overwritten by an npm install. The Chromedriver and/or the webdriver-manager team will probably fix this issue, at which point you should clear the modified version of your webdriver-manager and download the fix from npm.
For macOS Catalina Version 10.15.6 (19G73)
In my case I was working with Rails and Capybara for feature tests. What worked for me was
First, find the actual chromedriver location running:
which chromedriver
# Which returned:
/Users/alex/.webdrivers/chromedriver
Then, install chromedriver via Homebrew:
brew install chromedriver
Then, remove old chromedriver reference found at previous location with:
rm /Users/alex/.webdrivers/chromedriver
Now, link the old chromedriver reference to the one installed with brew:
ln -s /usr/local/bin/chromedriver /Users/alex/.webdrivers/chromedriver
Then, open Finder app, then click on Go menu and then click Go to folder ... option, and enter this route:
/usr/local/Caskroom/chromedriver/
There you should see a folder with the chromedriver version you have installed, something like this:
88.0.4324.96
Enter that folder and you should see the chromedriver binary file.
Right click on it, and click on Open
Now, you should get a terminal window popping up with the output:
Last login: Sun Jan 31 12:29:15 on ttys001
/usr/local/Caskroom/chromedriver/88.0.4324.96/chromedriver ; exit;
  ~  /usr/local/Caskroom/chromedriver/88.0.4324.96/chromedriver ; exit;
Starting ChromeDriver 88.0.4324.96 (68dba2d8a0b149a1d3afac56fa74648032bcf46b- refs/branch-heads/4324#{#1784}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
Finally, press Ctrl+C to stop the execution and quit the terminal window.
Now, you should be able to run capybara tests.
npm uninstall protractor && npm install protractor
If you use webdrivers gem, upgrade it:
bundle update webdrivers

problem while installing rock-robotics package in ubuntu 18.04 LTS [SOLVED]

SOLVED (see answer)
Problem
I've followed the instalation guide proposed at "https://www.rock-robotics.org/documentation/installation.html" .I'm having an error while installing "rock-robotics" I tried at first in my lighter distribution "Lubuntu" and now I'm trying in "Ubuntu 18.04 LTS" and it happens again, I'm getting crazy with this and the very problem is that I need this package to develop my degree final thesis. Please I need help on this matter, at the end you can see the full output when I run $sudo sh bootstrap.sh (I tried both of the bootstraps suggested and both of them give me the same problem) and here you have the output lines of the error message:
configuring CMake for base/orogen/std configured CMake for tools/pocolog_cpp ERROR: got an error processing base/orogen/std, waiting for pending jobs to end updated environment Command failed base/orogen/std(/home/emi/rock-robotics/base/orogen/std): failed in configure phase
'cmake -DCMAKE_INSTALL_PREFIX=/home/emi/rock-robotics/install -DCMAKE_MODULE_PATH= -DCMAKE_PREFIX_PATH=/home/emi/rock-robotics/install;/home/emi/rock-robotics/tools/orogen
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -DROCK_TEST_ENABLED=OFF /home/emi/rock-robotics/base/orogen/std' returned status 1
see /home/emi/rock-robotics/install/log/base/orogen/std-configure.log for details
last 10 lines are:
-- Checking for module 'orocos-rtt-corba-gnulinux>=2.1.0'
-- No package 'orocos-rtt-corba-gnulinux' found
CMake Error at .orogen/config/FindOrocosCORBA.cmake:8 (MESSAGE):
RTT has not been built with CORBA support
Call Stack (most recent call first):
.orogen/typekit/transports/corba/CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/emi/rock-robotics/base/orogen/std/build/CMakeFiles/CMakeOutput.log".
FULL-OUTPUT
--2020-06-24 12:02:16-- http://rock-robotics.org/master/autoproj_bootstrap
Resolviendo rock-robotics.org (rock-robotics.org)... 37.17.224.128
Conectando con rock-robotics.org (rock-robotics.org)[37.17.224.128]:80... conectado.
Petición HTTP enviada, esperando respuesta... 301 Moved Permanently
Ubicación: https://rock-robotics.org/master/autoproj_bootstrap [siguiente]
--2020-06-24 12:02:17-- https://rock-robotics.org/master/autoproj_bootstrap
Conectando con rock-robotics.org (rock-robotics.org)[37.17.224.128]:443... conectado.
Petición HTTP enviada, esperando respuesta... 301 Moved Permanently
Ubicación: https://www.rock-robotics.org/master/autoproj_bootstrap [siguiente]
--2020-06-24 12:02:17-- https://www.rock-robotics.org/master/autoproj_bootstrap
Resolviendo www.rock-robotics.org (www.rock-robotics.org)... 185.199.110.153, 185.199.111.153, 185.199.109.153, ...
Conectando con www.rock-robotics.org (www.rock-robotics.org)[185.199.110.153]:443... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 30078 (29K) [application/octet-stream]
Guardando como: “autoproj_bootstrap”
autoproj_bootstrap 100%[===================>] 29,37K --.-KB/s en 0,03s
2020-06-24 12:02:17 (906 KB/s) - “autoproj_bootstrap” guardado [30078/30078]
Which protocol do you want to use to access rock-core/buildconf.git on github.com? [git|ssh|http] (default: http)
Detected 'gem' to be /usr/bin/gem2.5
Detected bundler at /home/emi/.local/share/autoproj/gems/ruby/2.5.0/bin/bundle
Installing autoproj in /home/emi/.local/share/autoproj/gems/ruby/2.5.0
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
[DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs`
Fetching gem metadata from https://rubygems.org/......
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using rake 12.3.3
Using equatable 0.5.0
Using tty-color 0.4.3
Using pastel 0.7.2
Using tty-cursor 0.5.0
Using necromancer 0.4.0
Using timers 4.3.0
Using tty-screen 0.6.5
Using wisper 2.0.1
Using tty-reader 0.2.0
Using tty-prompt 0.15.0
Using facets 3.1.0
Using utilrb 3.0.1
Using autobuild 1.20.0
Using backports 3.18.1
Using bundler 2.1.4
Using concurrent-ruby 1.0.5
Using ffi 1.13.1
Using rb-inotify 0.10.1
Using thor 0.20.3
Using tty-spinner 0.8.0
Using xdg 2.2.5
Using autoproj 2.12.1
Bundle complete! 2 Gemfile dependencies, 23 gems now installed.
Bundled gems are installed into `/home/emi/.local/share/autoproj/gems`
starting the newly installed autoproj for stage2 install
saving temporary env.sh and .autoproj/env.sh
running 'autoproj envsh' to generate a proper env.sh
[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at /home/emi/rock-robotics/.autoproj/bin/autoproj:8)
Which prepackaged software (a.k.a. 'osdeps') should autoproj install automatically (all, none or a comma-separated list of: os gem pip) ?
The software packages that autoproj will have to build may require other
prepackaged softwares (a.k.a. OS dependencies) to be installed (RubyGems
packages, packages from your operating system/distribution, ...). Autoproj
is able to install those automatically for you.
Advanced users may want to control this behaviour. Additionally, the
installation of some packages require administration rights, which you may
not have. This option is meant to allow you to control autoproj's behaviour
while handling OS dependencies.
* if you say "all", it will install all packages automatically.
This requires root access thru 'sudo'
* if you say "pip", only the Python packages will be installed.
Installing these packages does not require root access.
* if you say "gem", only the Ruby packages will be installed.
Installing these packages does not require root access.
* if you say "os", only the OS-provided packages will be installed.
Installing these packages requires root access.
* if you say "none", autoproj will not do anything related to the
OS dependencies.
Finally, you can provide a comma-separated list of pip gem and os.
As any configuration value, the mode can be changed anytime by calling
autoproj reconfigure
Finally, the "autoproj osdeps" command will give you the necessary information
about the OS packages that you will need to install manually.
So, what do you want ? (all, none or a comma-separated list of: os gem pip) [all]
Would you like autoproj to keep apt packages up-to-date? [yes]
updated environment
running 'autoproj osdeps' to re-install missing gems
[DEPRECATED] `Bundler.with_clean_env` has been deprecated in favor of `Bundler.with_unbundled_env`. If you instead want the environment before bundler was originally loaded, use `Bundler.with_original_env` (called at /home/emi/rock-robotics/.autoproj/bin/autoproj:8)
updated environment
Command finished successfully at 2020-06-24 12:02:30 +0200 (took 1 sec)
The current directory is not empty, continue bootstrapping anyway ? [yes]
checked out autoproj main configuration
autoproj bootstrap successfully finished
To further use autoproj and the installed software, you
must add the following line at the bottom of your .bashrc:
source /home/emi/rock-robotics/env.sh
WARNING: autoproj will not work until your restart all
your consoles, or run the following in them:
$ source /home/emi/rock-robotics/env.sh
To import and build the packages, you can now run
aup
amake
The resulting software is installed in
/home/emi/rock-robotics/install
How should I interact with github.com (git, http, ssh)
If you give one value, it's going to be the method used for all access
If you give multiple values, comma-separated, the first one will be
used for pulling and the second one for pushing. An optional third value
will be used to pull from private repositories (the same than pushing is
used by default) [http,ssh]
operating system: ubuntu,debian - 18.04,18.04.4,lts,bionic,beaver
updating bundler
updating autoproj
bundler: connected to https://rubygems.org/
already up-to-date autoproj main configuration
checking out git:https://github.com/rock-core/package_set.git interactive=false push_to=git#github.com:/rock-core/package_set.git repository_id=github:/rock-c checked out git:https://github.com/rock-core/package_set.git interactive=false push_to=git#github.com:/rock-core/package_set.git repository_id=github:/rock-core/package_set.git retry_count=10
Which flavor of Rock do you want to use ?
Stay with the default ('master') if you want to use Rock on the most recent
distributions (Ubuntu 16.04 and later). Use 'stable' only for
now officially unsupported distributions (Ubuntu 14.04) [master]
Do you want to activate python? [no]
checking out git:https://github.com/rock-core/rock-package_set.git interactive=false push_to=git#github.com:/rock-core/rock-package_set.git repository_id=gith checked out git:https://github.com/rock-core/rock-package_set.git interactive=false push_to=git#github.com:/rock-core/rock-package_set.git repository_id=github:/rock-core/rock-package_set.git retry_count=10
checking out git:https://github.com/rock-tutorials/tutorials-package_set.git interactive=false push_to=git#github.com:/rock-tutorials/tutorials-package_set.gi checked out git:https://github.com/rock-tutorials/tutorials-package_set.git interactive=false push_to=git#github.com:/rock-tutorials/tutorials-package_set.git repository_id=github:/rock-tutorials/tutorials-package_set.git retry_count=10
checking out git:https://github.com/orocos-toolchain/autoproj.git interactive=false push_to=git#github.com:/orocos-toolchain/autoproj.git repository_id=github checked out git:https://github.com/orocos-toolchain/autoproj.git interactive=false push_to=git#github.com:/orocos-toolchain/autoproj.git repository_id=github:/orocos-toolchain/autoproj.git retry_count=10
WARN: osdeps definition for cmake, previously defined in /home/emi/.local/share/autoproj/gems/ruby/2.5.0/gems/autoproj-2.12.1/lib/autoproj/default.osdeps overridden by /home/emi/rock-robotics/autoproj/remotes/rock.core/rock.osdeps:
WARN: resp. apt-dpkg: cmake
WARN: osdep: build-essential
WARN: and apt-dpkg: cmake
Do you need compatibility with OCL ? (yes or no)
New Rock users that don't need backward compatibility with legacy Orocos components
probably want to say 'no'. Otherwise, say 'yes'.
Saying 'yes' will significantly impact compilation time and the size of the resulting binaries
Please answer 'yes' or 'no' [no]
the target operating system for Orocos/RTT (gnulinux, xenomai, or macosx) [gnulinux]
which CORBA implementation should the RTT use ?
Answer "none" to disable CORBA, otherwise pick either tao or omniorb [omniorb] "none"
invalid value: invalid value '"none"', accepted values are 'none', 'tao', 'omniorb' (without the quotes)
which CORBA implementation should the RTT use ?
Answer "none" to disable CORBA, otherwise pick either tao or omniorb [omniorb] none
checked out base/templates/cmake_vizkit_widget
checked out base/orogen/std
checked out base/console_bridge
checked out base/numeric
checked out base/logging
checked out base/templates/bundle
checked out base/templates/vizkit3d_plugin
checked out base/templates/ruby_lib
checked out base/orogen/types
checked out base/templates/cmake_lib
checked out base/scripts
checked out base/cmake
checked out bundles/rock
checked out drivers/orogen/aggregator
checked out bundles/common_models
checked out drivers/orogen/iodrivers_base
checked out drivers/aggregator
checked out drivers/iodrivers_base
checked out drivers/orogen/transformer
checked out drivers/transformer
checked out base/types
checked out perception/frame_helper
checked out perception/jpeg_conversion
checked out gui/osgviz
checked out tools/log_tools
checked out gui/rock_webapp
checked out gui/vizkit3d
checked out tools/logger
tools/class_loader: checking out branch indigo-devel
checked out gui/rock_widget_collection
checked out tools/class_loader
checked out tools/orogen_metadata
checked out gui/vizkit
checked out tools/pocolog2msgpack
checked out tools/pocolog_cpp
checked out tools/pocolog
checked out tools/telemetry
checked out base/templates/doc
checked out tools/rest_api
checked out rtt_typelib
checked out utilrb
checked out tools/orocos.rb
checked out orogen
checked out tools/metaruby
checkout of tools/syskit failed, deleting the source directory /home/emi/rock-robotics/tools/syskit and retrying (1/10)
checkout of tools/msgpack-c failed, deleting the source directory /home/emi/rock-robotics/tools/msgpack-c and retrying (1/10)
checked out tools/syskit
tools/msgpack-c: resetting branch master to 83a82e3eb512b18d4149cabb7eb43c7e8bc081af
checked out tools/msgpack-c
WARN: tools/msgpack-c from rock.core does not have a manifest
checkout of tools/service_discovery failed, deleting the source directory /home/emi/rock-robotics/tools/service_discovery and retrying (1/10)
checkout of typelib failed, deleting the source directory /home/emi/rock-robotics/tools/typelib and retrying (1/10)
checkout of tools/roby failed, deleting the source directory /home/emi/rock-robotics/tools/roby and retrying (1/10)
checkout of external/sisl failed, deleting the source directory /home/emi/rock-robotics/external/sisl and retrying (1/10)
checked out typelib
typelib: using the castxml importer
checked out tools/service_discovery
checked out external/sisl
checked out tools/roby
checkout of rtt failed, deleting the source directory /home/emi/rock-robotics/tools/rtt and retrying (1/10)
checked out rtt
building initial autoproj import log, this may take a while
bundler: connected to https://rubygems.org/
updated environment
Command finished successfully at 2020-06-24 12:08:47 +0200 (took 6 mins 9 secs)
bundler: connected to https://rubygems.org/
updated environment
Command finished successfully at 2020-06-24 12:08:52 +0200 (took 3 secs)
operating system: ubuntu,debian - 18.04,18.04.4,lts,bionic,beaver
WARN: osdeps definition for cmake, previously defined in /home/emi/.local/share/autoproj/gems/ruby/2.5.0/gems/autoproj-2.12.1/lib/autoproj/default.osdeps overridden by /home/emi/rock-robotics/autoproj/remotes/rock.core/rock.osdeps:
WARN: resp. apt-dpkg: cmake
WARN: osdep: build-essential
WARN: and apt-dpkg: cmake
WARN: tools/msgpack-c from rock.core does not have a manifest
typelib: using the castxml importer
configured CMake for tools/msgpack-c
built tools/msgpack-c
installed tools/msgpack-c
configured CMake for rtt
built rtt (10 warnings)
set up Ruby package utilrb
installed rtt
configured CMake for external/sisl
set up Ruby package tools/metaruby
configured CMake for typelib
set up Ruby package tools/roby
built typelib (2 warnings)
set up Ruby package base/scripts
installed typelib
built external/sisl (165 warnings)
set up Ruby package tools/pocolog
configured CMake for rtt_typelib
installed external/sisl
built rtt_typelib
configured CMake for base/cmake
installed rtt_typelib
built base/cmake
set up Ruby package orogen
installed base/cmake
set up Ruby package tools/log_tools
configured CMake for tools/orogen_metadata
configured CMake for gui/osgviz
built tools/orogen_metadata
configured CMake for base/logging
built gui/osgviz (6 warnings)
installed tools/orogen_metadata
installed gui/osgviz
built base/logging
configured CMake for gui/vizkit3d
built gui/vizkit3d (7 warnings)
installed base/logging
installed gui/vizkit3d
configured CMake for tools/service_discovery
configured CMake for base/console_bridge
configured CMake for base/types
built tools/service_discovery
installed tools/service_discovery
built base/types (3 warnings)
built base/console_bridge
generated oroGen base/orogen/std
installed base/types
installed base/console_bridge
configuring CMake for base/orogen/std
configured CMake for tools/pocolog_cpp
ERROR: got an error processing base/orogen/std, waiting for pending jobs to end
updated environment
Command failed
base/orogen/std(/home/emi/rock-robotics/base/orogen/std): failed in configure phase
'cmake -DCMAKE_INSTALL_PREFIX=/home/emi/rock-robotics/install -DCMAKE_MODULE_PATH= -DCMAKE_PREFIX_PATH=/home/emi/rock-robotics/install;/home/emi/rock-robotics/tools/orogen -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=Release -DROCK_TEST_ENABLED=OFF /home/emi/rock-robotics/base/orogen/std' returned status 1
see /home/emi/rock-robotics/install/log/base/orogen/std-configure.log for details
last 10 lines are:
-- Checking for module 'orocos-rtt-corba-gnulinux>=2.1.0'
-- No package 'orocos-rtt-corba-gnulinux' found
CMake Error at .orogen/config/FindOrocosCORBA.cmake:8 (MESSAGE):
RTT has not been built with CORBA support
Call Stack (most recent call first):
.orogen/typekit/transports/corba/CMakeLists.txt:4 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/emi/rock-robotics/base/orogen/std/build/CMakeFiles/CMakeOutput.log".
Finaly I solved it following some advices of the rock-robotics team. I used another bootstrap.sh and also accepted the corba support, the complete process was:
mkdir rock-workspace
cd rock-workspace
wget https://www.rock-robotics.org/bootstrap.sh
sh bootstrap.sh
Then the answers to the critical questions while bootstrapping:
Do you need compatibility with OCL ? (yes or no)
New Rock users that don't need backward compatibility with legacy Orocos components
probably want to say 'no'. Otherwise, say 'yes'.
Saying 'yes' will significantly impact compilation time and the size of the resulting binaries
Please answer 'yes' or 'no' [no] no
the target operating system for Orocos/RTT (gnulinux, xenomai, or macosx) [gnulinux] gnulinux
which CORBA implementation should the RTT use ?
Answer "none" to disable CORBA, otherwise pick either tao or omniorb [omniorb] omniorb
so the answers were no, gnulinux and omniorb

git-svn Can't locate SVN/Core.pm after fresh installation of macOS Catalina 10.15.4

Recently I reinstalled macOS Catalina 10.15.4. After I installed Command_Line_Tools_11.4.1, it told me svn is no longer working with Xcode. Then I installed both git and svn by brew, hopefully git-svn would work. Unfortunately got this error message:
Can't locate SVN/Core.pm in #INC (you may need to install the SVN::Core module) (#INC contains: /usr/local/Cellar/git/2.26.2/share/perl5 /Applications/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level /Library/Developer/CommandLineTools/Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.4 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /usr/local/Cellar/git/2.26.2/share/perl5/Git/SVN/Utils.pm line 6.
Both git & svn are the latest version.
Please help me out.
Finally I figure it out!!!
Open the git-svn file (perl script, in my case file location is /usr/local/opt/git/libexec/git-core/git-svn), change the first line #!/usr/bin/perl to #!/usr/local/bin/perl
And it works!
I guess system perl doesn't include perl SVN/Core, but brew perl has it (dependency of brew svn).
Solution for MacOS Big Sur 11.5
After struggling with this error for hours:
Can't locate SVN/Core.pm in #INC (you may need to install the SVN::Core module)
I've finally found a solution that actually works.
If you run:
brew reinstall subversion
It will print a message like this:
The perl bindings are located in various subdirectories of:
/usr/local/opt/subversion/lib/perl5
Then you just need to run this command before using git svn to load the SVN module from the correct path:
export PERL5LIB=/usr/local/opt/subversion/lib/perl5/site_perl/5.30.2/darwin-thread-multi-2level
Solution for those, who, like me - want to use Sourcetree client on macOS Catalina with git-svn:
First step:
brew install git
brew install perl
brew install subversion
edit
/usr/local/Cellar/git/git_version/libexec/git-core/git-svn
replace
#!/usr/bin/perl
with
#!/usr/local/bin/perl
Second step, install missed perl modules:
cpan SVN::Core
cpan Term::ReadKey
Third step, configure SourceTree:
In Sourcetree->Preferences - set option "use system git", from:
/usr/local/Cellar/git/git_version/git
While not a permanent fix, a workaround is to set ${GITPERLLIB}:
$ export GITPERLLIB=/usr/local/Cellar/git/2.31.1/share/perl5:/usr/local/lib/perl5/site_perl/5.28.2/darwin-thread-multi-2level
$ git svn clone svn+ssh://...
worked for me without editing any scripts installed by brew.
Ensure you've installed Perl, Subversion and dependencies via Homebrew:
brew install perl subversion apr apr-util
Install required Perl modules into ~/perl5:
export PATH="/usr/local/opt/apr/bin:/usr/local/opt/apr-util/bin:$PATH"
PERL_MM_OPT="INSTALL_BASE=$HOME/perl5" cpan local::lib Git::SVN SVN::Core
Verify installed modules by:
PERL5LIB="$HOME/perl5" cpan -l | grep SVN
Then configure Perl as following (based on brew info perl steps):
eval "$(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib=$HOME/perl5)"
Finally run Git's SVN:
PERLLIB="$HOME/perl5" git svn clone https://svn.somecode.example.com/svn/trunk
If you're still stuck, try GitHub and GitLab websites which offer migration with a Git/SVN.
E.g. in GitHub, create a new repository, then import the project by pasting old repository’s clone URL.
The error message says:
$ git svn --version
Can't locate SVN/Core.pm in #INC (you may need to install the SVN::Core module) (#INC contains: /usr/local/opt/subversion/lib/perl5 /usr/local/Cellar/git/2.31.1/share/perl5 /Applications/Xcode.app/Contents/Developer/Library/Perl/5.28/darwin-thread-multi-2level /Library/Developer/CommandLineTools/Library/Perl/5.28/darwin-thread-multi-2level /Library/Perl/5.30/darwin-thread-multi-2level /Library/Perl/5.30 /Network/Library/Perl/5.30/darwin-thread-multi-2level /Network/Library/Perl/5.30 /Library/Perl/Updates/5.30.2 /System/Library/Perl/5.30/darwin-thread-multi-2level /System/Library/Perl/5.30 /System/Library/Perl/Extras/5.30/darwin-thread-multi-2level /System/Library/Perl/Extras/5.30) at /usr/local/Cellar/git/2.31.1/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.31.1/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /usr/local/Cellar/git/2.31.1/share/perl5/Git/SVN.pm line 25.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.31.1/share/perl5/Git/SVN.pm line 32.
Compilation failed in require at /usr/local/Cellar/git/2.31.1/libexec/git-core/git-svn line 23.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.31.1/libexec/git-core/git-svn line 23.
This is because git-svn is implemented by Perl, it needs a Perl library called SVN::Core to run。
Changing the first line of git-svn script from #!/usr/bin/perl to #!/usr/local/bin/perl won't fix this error!!! Because this just changes the Perl library from system default version to brew installed version。If the brew installed version doesn't contains SVN::Core, it'll still fail:
$ git svn --version
Can't locate SVN/Core.pm in #INC (you may need to install the SVN::Core module) (#INC contains: /usr/local/Cellar/git/2.31.1/share/perl5 /Applications/Xcode.app/Contents/Developer/Library/Perl/5.28/darwin-thread-multi-2level /Library/Developer/CommandLineTools/Library/Perl/5.28/darwin-thread-multi-2level /usr/local/Cellar/perl/5.34.0/lib/perl5/site_perl/5.34.0/darwin-thread-multi-2level /usr/local/Cellar/perl/5.34.0/lib/perl5/site_perl/5.34.0 /usr/local/Cellar/perl/5.34.0/lib/perl5/5.34.0/darwin-thread-multi-2level /usr/local/Cellar/perl/5.34.0/lib/perl5/5.34.0 /usr/local/lib/perl5/site_perl/5.34.0/darwin-thread-multi-2level /usr/local/lib/perl5/site_perl/5.34.0) at /usr/local/Cellar/git/2.31.1/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.31.1/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /usr/local/Cellar/git/2.31.1/share/perl5/Git/SVN.pm line 25.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.31.1/share/perl5/Git/SVN.pm line 32.
Compilation failed in require at /usr/local/Cellar/git/2.31.1/libexec/git-core/git-svn line 23.
BEGIN failed--compilation aborted at /usr/local/Cellar/git/2.31.1/libexec/git-core/git-svn line 23.
Note that the Perl version has been changed, but the error still exists. Because there is no SVN:Core in the directories indicated by #INC.
Now some answers may tell you to install SVN::Core by cpan SVN::Core, Don't do that!!! This won't solve the problem! Because the version of SVN::Core it installed, may not match with your SVN version:
$ git svn --version
error: git-svn died of signal 11
By the way, cpan is rubbish, don't use it to install anything. It compiles the source before installation but cannot control the compile flags/options, and it cannot uninstall things that are installed by itself.
Here is the right solution:
The corresponding Perl libraries are already installed when you installed svn, and brew has already told you:
$ brew info svn
subversion: stable 1.14.1 (bottled), HEAD
Version control system designed to be a better CVS
https://subversion.apache.org/
/usr/local/Cellar/subversion/1.14.1_2 (234 files, 32.1MB) *
Poured from bottle on 2021-06-02 at 15:52:30
From: https://mirrors.ustc.edu.cn/homebrew-core.git/Formula/subversion.rb
License: Apache-2.0
==> Dependencies
Build: openjdk ✘, pkg-config ✘, python#3.9 ✔, scons ✘, swig ✘
Required: apr ✔, apr-util ✔, gettext ✔, lz4 ✔, openssl#1.1 ✔, utf8proc ✔
==> Options
--HEAD
Install HEAD version
==> Caveats
svntools have been installed to:
/usr/local/opt/subversion/libexec
The perl bindings are located in various subdirectories of:
/usr/local/opt/subversion/lib/perl5
You may need to link the Java bindings into the Java Extensions folder:
sudo mkdir -p /Library/Java/Extensions
sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
==> Analytics
install: 33,749 (30 days), 67,978 (90 days), 239,148 (365 days)
install-on-request: 33,129 (30 days), 67,011 (90 days), 229,097 (365 days)
build-error: 0 (30 days)
We can see that the Perl bindings are located in /usr/local/opt/subversion/lib/perl5, we just need to let git-svn use this path. With a little investigation of git-svn script, we can see this behavior is controlled by an environment variable called GITPERLLIB:
$ head /usr/local/Cellar/git/2.31.1/libexec/git-core/git-svn
#!/usr/bin/perl
use lib (split(/:/, $ENV{GITPERLLIB} || '/usr/local/Cellar/git/2.31.1/share/perl5:/Applications/Xcode.app/Contents/Developer/Library/Perl/5.28/darwin-thread-multi-2level:/Library/Developer/CommandLineTools/Library/Perl/5.28/darwin-thread-multi-2level'));
# Copyright (C) 2006, Eric Wong <normalperson#yhbt.net>
# License: GPL v2 or later
So the right way to solve this problem is to add the following code to your bashrc or zshrc:
export GITPERLLIB=/usr/local/opt/subversion/lib/perl5/site_perl/$<your_perl_version>/darwin-thread-multi-2level
Problem solved!

How to downgrade Perl on Mac OS X Mavericks

The newly release Mavericks has removed the deprecated module "Switch.pm" from its repository.
However, I have recently try to build AOSP source tree and it somehow uses this module to generate "make-hash-tools.pl"
The Mavericks has perl version of 5.16.2, and its predecessor Mountain Lion has a 5.12.4. Is there a way to downgrade my Perl?
Compilation error looks like this:
Can't locate Switch.pm in #INC (#INC contains: /Library/Perl/5.16/darwin-thread-\
multi-2level /Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level\
/Network/Library/Perl/5.16 /Library/Perl/Updates/5.16.2\
/System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16\
/System/Library/Perl/Extras/5.16/darwin-thread-multi-2level \
/System/Library/Perl/Extras/5.16 .) at external/webkit/Source/WebCore\
/make-hash-tools.pl line 23.
Thanks~!
You can use perlbrew to install a parallel version of Perl in its own directory with its own modules. Currently it lets you install Perl as far back as 5.003_07, although not all of them are supported by Perl Porters for security fixes.
It would probably be simpler to install Switch from CPAN though.
looks like running sudo cpanm Switch --force worked for me
you can also use this:
$ sudo defaults write '/Library/Preferences/com.apple.versioner.perl' Version 5.12
It makes perl run version 12 for most stuff. Unfortunately, not for apache ...
Worked for me on 10.9.2, with no "force".
cpan[2]> install Switch
Running install for module 'Switch'
Running make for C/CH/CHORNY/Switch-2.17.tar.gz
Fetching with LWP:
... bunch of fetch stuff ...
CPAN.pm: Building C/CH/CHORNY/Switch-2.17.tar.gz
Checking if your kit is complete...
Looks good
Writing Makefile for Switch
Writing MYMETA.yml and MYMETA.json
... a bunch of xcode license stuff ...
cp Switch.pm blib/lib/Switch.pm
Manifying blib/man3/Switch.3pm
CHORNY/Switch-2.17.tar.gz
/usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/given.t ... ok
t/nested.t .. ok
t/switch.t .. ok
All tests successful.
Files=3, Tests=590, 0 wallclock secs ( 0.04 usr 0.01 sys + 0.22 cusr 0.01 csys = 0.28 CPU)
Result: PASS
CHORNY/Switch-2.17.tar.gz
/usr/bin/make test -- OK
Running make install
Installing /Library/Perl/5.16/Switch.pm
Installing /usr/local/share/man/man3/Switch.3pm
Appending installation info to /Library/Perl/Updates/5.16.2/darwin-thread-multi-2level/perllocal.pod
CHORNY/Switch-2.17.tar.gz
/usr/bin/make install -- OK
I then ran my code that previously pitched the "Can't locate Switch.pm in #INC" error, and the code ran fine.
I found another command :
sudo cpan -f Switch
I had to execute the command 2 times but for me it works on Yosemite. Thank s this blog.
I find these command works.
sudo perl -MCPAN -e shell
cpan > force install Switch

Resources