installing ceres in ubuntu 16 - ubuntu-16.04

Im trying to install ceres solver in ubuntu 16 as follows. When i try to test make "make test" it gives me the error no tests were found! Can someone please explain what i am doing wrong?
I am following the official ceres-solver installation instructions as in:
http://ceres-solver.org/installation.html
niraj#niraj-ThinkPad-L380-Yoga:~/ceres/ceres-bin$ sudo make -j3
[ 88%] Built target ceres
[ 91%] Built target helloworld_numeric_diff
[ 91%] Built target curve_fitting
[ 92%] Built target helloworld_analytic_diff
[ 93%] Built target curve_fitting_c
[ 95%] Built target ellipse_approximation
[ 95%] Built target helloworld
[ 96%] Built target rosenbrock
[ 98%] Built target robust_curve_fitting
[ 99%] Built target simple_bundle_adjuster
[100%] Built target sampled_function
niraj#niraj-ThinkPad-L380-Yoga:~/ceres/ceres-bin$ sudo make test
Running tests...
Test project /home/niraj/ceres/ceres-bin
No tests were found!!!

What cmake call did you use? the log indicates that you built the library and examples but none of the tests.

Related

Why did HSL extension stop working on VS Code?

I am using Windows 11. I've been using Haskell with VS Code. Suddenly yesterday it stopped giving me problems section (one that displays syntax errors and such before code is compiled). I am using Haskells own extension (ID: haskell.haskell).
I am not entirely sure, but it might be that Haskell Language Server is causing the issue. Every time I start VS Code, disable / re-enable, uninstall and install, it will prompt me this:
Obviously I hit "Yes". Then this is displayed for a fraction of a second and this disappears without any fail or pass message:
I am not keen on installing it manually, since it worked before and it should again.
Edit:
As suggested by #Ismor I checked ghcup list -c installed. It gave me this info:
[ Warn ] New cabal version available. If you want to install this latest version, run 'ghcup install cabal 3.8.1.0'
[ Info ] verifying digest of: gs.exe
Tool Version Tags Notes
IS ghc 9.2.5 recommended,base-4.16.4.0
IS cabal 3.6.2.0 recommended
I stack 2.9.3 latest
IS ghcup 0.1.19.0 latest,recommended
As hsl was not in the list I tried ghcup install hsl 1.9.0.0 --set which gave me:
[ Warn ] This is an old-style command for installing GHC. Use 'ghcup install ghc' instead.
[ Warn ] New ghc version available. If you want to install this latest version, run 'ghcup install ghc 9.4.4'
[ Warn ] New cabal version available. If you want to install this latest version, run 'ghcup install cabal 3.8.1.0'
[ Info ] verifying digest of: gs.exe
[ Error ] [GHCup-07140] Both installation and setting the tool failed. Install error was: Unable to find a download for the requested version/distro.
[ ... ] Set error was: The version hsl of the tool ghc is not installed.
[ Error ] Also check the logs in C:\ghcup\logs
For now I got the end result I wanted, but I am not quite sure what was the problem. Anyway I installed the ghc again, but I had to disable my antivirus before that. After that hsl was already installed and I only had to reload the extension from VS Code.
I would guess that there it was trying to update hsl and my antivirus messed up the update for some reason. I remember that when installing Haskell in the first place it required me to momentarily disable my antivirus. But take that with a large grain of salt, because I deffinetly am not sure about that.

Publish CMS (by Sundell) compiling for wrong platform version

I created a new Publish: A static site generator for Swift developers project with publish new in the terminal.
When building the project in Xcode I get this error:
"The package product 'Publish' requires minimum platform version 12.0 for the macOs
platform, but this target supports 10.10"
I'm on macOS 12.4, Xcode 13.4.1, Swift 5.6.1 and Publish 0.9.0.
I've only got one installation of Xcode installed, and xcode-select points to this installation.
I've tried to set the platform version in the Package.swift file:
let package = Package(
name: "MySite",
platforms: [
.macOS(.v12_4)
],
products: [
.executable(
name: "MySite",
targets: ["MySite"]
)
],
dependencies: [
.package(name: "Publish", url: "https://github.com/johnsundell/publish.git", from: "0.7.0")
],
targets: [
.target(
name: "MySite",
dependencies: ["Publish"]
)
]
)
But this gives me another error instead:
"Reference to member 'v12_4' cannot be resolved without a contextual type" and "Cannot build "MySite" without a run destination. Select a run destination to perform this action."
I can not choose a destination because as it says: "No devices because active scheme has no targets".
And sure enough if I look at my scheme it says my target it missing, which isn't a surprise since it hasn't been build yet.
I've tried to open older projects (both my own and others) and there is no errors with them. And it's possible to choose a destination (My Mac).
I've tried to compare a new project with one of the older projects, but I can't for the better of me see where the difference in behaviour comes from.
So the question is, where to set the right platform version for compiling?
If this wasn't a Swift Package I could have set this in the Project Editor, but this option is not there for packages.
.macOS(.v12) was introduced in Package Description 5.5.
Setting it to .v12 and setting the swift-tools-version to 5.5 or above (at the top of the Package.swift file) fixes this issue.
Thanks to Joakim Danielson for solving it.

Error executing catkin_make: Invoking "make -j1 -l1" failed

I am new to ROS and got issues with catkin_make. At first it was working properly, when executing it inside a catkin workspace (catkin_ws). Then I created a catkin package inside src named rosjava without dependecies (catkin_create_pkg rosjava) and catkin_make began to fail:
~/catkin_ws$ catkin_make
Base path: /home/jon/catkin_ws
Source space: /home/jon/catkin_ws/src
Build space: /home/jon/catkin_ws/build
Devel space: /home/jon/catkin_ws/devel
Install space: /home/jon/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/jon/catkin_ws/build"
####
####
#### Running command: "make -j1 -l1" in "/home/jon/catkin_ws/build"
####
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Digital
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_SetupChannel
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Relax
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Analog
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_SetSpeed
[ 0%] Built target std_msgs_generate_messages_nodejs
[ 0%] Built target _arbotix_msgs_generate_messages_check_deps_Enable
[ 3%] Built target arbotix_msgs_generate_messages_nodejs
[ 3%] Built target std_msgs_generate_messages_py
[ 7%] Built target arbotix_msgs_generate_messages_py
[ 8%] Generating Java gradle project from arbotix_msgs
Traceback (most recent call last):
File "/opt/ros/kinetic/share/genjava/cmake/../../../lib/genjava/genjava_gradle_project.py", line 11, in <module>
import genjava
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genjava/__init__.py", line 39, in <module>
from .genjava_main import main, standalone_main
File "/opt/ros/kinetic/lib/python2.7/dist-packages/genjava/genjava_main.py", line 45, in <module>
import rosjava_build_tools
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rosjava_build_tools/__init__.py", line 7, in <module>
import console
ImportError: No module named 'console'
arbotix_ros/arbotix_msgs/CMakeFiles/arbotix_msgs_generate_messages_java_gradle.dir/build.make:77: recipe for target 'arbotix_ros/arbotix_msgs/java/arbotix_msgs/build.gradle' failed
make[2]: *** [arbotix_ros/arbotix_msgs/java/arbotix_msgs/build.gradle] Error 1
CMakeFiles/Makefile2:931: recipe for target
'arbotix_ros/arbotix_msgs/CMakeFiles/arbotix_msgs_generate_messages_java_gradle.dir/all' failed
make[1]: *** [arbotix_ros/arbotix_msgs/CMakeFiles/arbotix_msgs_generate_messages_java_gradle.dir/all]
Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1 -l1" failed
Does anyone know how to solve it? If so I would really appreciate receiving your help.
Thank you in advance,
Jon.
This seems to be a dependency issue.
The line ImportError: No module named 'console' indicates console python package is missing.
Install console using pip.
Thanks for your answer Shrijit Singh. I tried console instalation using pip and seems instalation did not worked properly:
~/catkin_ws$ pip install console
/home/jon/.local/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py:83: RequestsDependencyWarning: Old version of cryptography ([1, 2, 3]) may cause slowdown.
warnings.warn(warning, RequestsDependencyWarning)
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Defaulting to user installation because normal site-packages is not writeable
Collecting console
Using cached console-0.990-py2.py3-none-any.whl (74 kB)
ERROR: Package 'console' requires a different Python: 2.7.12 not in '>=3.4'
I tried then installing pytest 4.6, as it is last series supporting Python 2.7 an 3.4. But got same error.

Electron Forge packaging configuration not working

I am trying to package my app with electron-forge package using the following configuration:
"config": {
"forge": {
"make_targets": {
"linux": [
"deb"
],
"win32": [
"squirrel"
]
},
"electronPackagerConfig": {
"asar": false,
"dir": "./src",
"platform": [
"linux",
"win32"
],
"arch": [
"ia32",
"x64"
],
"ignore": [
".idea"
]
}
}
}
The version of electron-forge I am using is 3.0.1.
Only the values asar and ignore are recognized, while dir, platform and arch are ignored. I do not see an error and would highly appreciate help, a hint or a link to any working example.
Update:
It has since been suggested here to use the command line for providing these options.
While
electron-forge package --arch=ia32,x64 --platform=win32,linux
does package the app for all the specified systems, although the output looks like this:
✔ Checking your system
✔ Preparing to Package Application for arch: ia32,x64
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application
✔ Preparing to Package Application for arch: x64
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application
✔ Preparing to Package Application for arch: armv7l <-- ???
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application
✔ Preparing to Package Application for arch: x64
✔ Compiling Application
✔ Preparing native dependencies
✔ Packaging Application
It does not seems to actually be packaging the app for the armv7l architecture as it says there, I think that this is just a bug with the console output, the results in the output directory look good.
Anyway.. providing the packaging options via command line does not solve my initial problem, because I still can not specify the dir option for electron-packer that way. So, while the documentation for electronPackagerConfig suggests all options for electron-packer can be set with this configuration object:
This config object provides options directly to electron-packager, the tool we use to package your app behind the scenes.
And while electron-forge package --help says I can set the current working directory after the options:
Usage: electron-forge-package [options] [cwd]
Which is actually not the case, this just simply sets the out directory where everything is written to.
I am still stuck with this. Is there any way to provide the dir option via electron-forge? If not, my suggestion to the developers of electron-forge would be to implement the configuration for this in a way that makes my initial configuration from above work, because I think this is an intuitive way to configurate these parameters, using the command line to override them could still be an option, I guess.

Installing Tensorflow from source

I've been trying to install Tensorflow and get it working over the past few days. Whilst I have managed to install TF and get it working as tested by opening Python in the terminal and typing,
import tensorflow as tf
I have not been successful attempting to retrain Inception v3. I managed to install it from source once by following the instructions laid out here however I am no longer able to do so. When I get to the section 'Create the pip package and install' and go to run bazel build -c opt //tensorflow/tools/pip_package:build_pip_package in the root of my Tensorflow directiory I get the following error.
kieran#kieranUbuntu:~/tensorflow$ bazel build -c opt //tensorflow/tools/pip_package:build_pip_package
ERROR: /home/kieran/tensorflow/tensorflow/core/BUILD:1068:1: no such target '//tensorflow/tools/git:gen/spec.json': target 'gen/spec.json' not declared in package 'tensorflow/tools/git' defined by /home/kieran/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /home/kieran/tensorflow/tensorflow/core/BUILD:1068:1: no such target '//tensorflow/tools/git:gen/head': target 'gen/head' not declared in package 'tensorflow/tools/git' defined by /home/kieran/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: /home/kieran/tensorflow/tensorflow/core/BUILD:1068:1: no such target '//tensorflow/tools/git:gen/branch_ref': target 'gen/branch_ref' not declared in package 'tensorflow/tools/git' defined by /home/kieran/tensorflow/tensorflow/tools/git/BUILD and referenced by '//tensorflow/core:version_info_gen'.
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted.
INFO: Elapsed time: 3.063s
This is the same error I ran into when I managed to install it and then attempted retaining the classifier following this tutorial. At the section, bazel build tensorflow/examples/image_retraining:retrain.
I just can't figure out what is going wrong and I have been trying for so long.
I'm using this pip version, # Ubuntu/Linux 64-bit, CPU only, Python 2.7
I think you should search before ask, This link can probably solve your issue.
The issue lied in the incorrect use of ./configure. Whilst it was ran I currently have two versions of python on my computer, both of which are stored in different locations, when running ./configure I pointed it to the wrong python version. After rectifying the issue everything worked correctly.