I am trying to configure my project on GitHub using continuous integration and would like to use Travis CI to do so. However, I am getting a build error with the current configuration of my travis.yml. My project uses Qt5, SQLite, and is in C++.
This is the yml:
language: cpp
compiler: gcc
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq sqlite3 qt5-dev-tools
before_script:
- mkdir build
- cd build
- cmake
script: make
I am new to this and I tried reading up on the documentation on their site, but I'm still having an issue understanding it. If anyone has an example, I would greatly appreciate it. OS is Windows.
Error:
make: *** No targets specified and no makefile found. Stop.
The command "make && make test" exited with 2.
I'd say that CMake has a non-intuitive error reporting here:
before_script:
- mkdir build
- cd build
- cmake
It returns success, although it hasn't configured anything in the build/ directory because it didn't know where the sources are.
Try cmake .. instead. Or cmake <your source directory>
Related
I am trying to install and run this software https://github.com/mit-biomimetics/Cheetah-Software
it's for a project but it can t compile for missing dependancies (eigen3).
I would like to create an auto install script to run it.
I have already do the most but i think i have problems in linking path in cmake and qt5.10 and eigen...
The autoinstall.sh code:
Install dependancies
sudo apt install mesa-common-dev freeglut3-dev coinor-libipopt-dev libblas-dev liblapack-dev gfortran liblapack-dev coinor-libipopt-dev cmake gcc build-essential libglib2.0-dev default-jdk python-all-dev liblua5.1-dev golang doxygen python-epydoc
Clone MIT Minicheetah software
git clone https://github.com/mit-biomimetics/Cheetah-Software.git
cd Cheetah-Software
Eigen library
wget https://gitlab.com/libeigen/eigen/-/archive/3.3.7/eigen-3.3.7.zip
unzip eigen-3.3.7.zip
lcm library
wget https://github.com/lcm-proj/lcm/releases/download/v1.4.0/lcm-1.4.0.zip
unzip lcm-1.4.0.zip
cd lcm-1.4.0
mkdir build
cd build
cmake ..
make
sudo make install
cd ..
cd ..
Qt
wget http://mirrors.ukfast.co.uk/sites/qt.io/archive/qt/5.10/5.10.0/qt-opensource-linux-x64-5.10.0.run
chmod +x qt-opensource-linux-x64-5.10.0.run
./qt-opensource-linux-x64-5.10.0.run
build
cd scripts # for now, you must actually go into this folder
./make_types.sh # you may see an error like `rm: cannot remove...` but this is okay
cd ..
mkdir build
cd build
cmake .. # there are still some warnings here
make -j
configure or setup.py or anything relqted in INSTALL or README.MD ( mandatory )
make
make install
but really you did not choose the most straitforward job, even as a developper I've been surprised many times when using cloned sources.
You should give a try to precompiled ROS for your robots or any distribution that let you install from binary yet you can still cross-compile when dev is done.
So i was able to compile and run it after several research and asking forums, it was a problem of compatibility with lcm library and openjdk, so download oracle jdk, do some linking manually and it was all good, absolutely no error in compilation.
Cheetah-Sofware-Ubuntu 18.04-AutoInstall.sh :
https://github.com/STRATOS-ROBOTICS/LeopardMK1/blob/master/install.sh
I just tried to compile the latest AzerothCore on Debian 9 and did not touch the source, just pulled it and used exactly the sh described in the installation guide. CMake gives me that error:
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
ACE_INCLUDE_DIR (ADVANCED)
Debian 9 with the latest AzerothCore. Ace is definitely installed with their latest version.
Expected: No error.
Actual Result: Error.
sudo apt-get update then do sudo apt-get install libace-6.* libace-dev
current version working for myself at this time is 6.3.3.
Also, I don't use the sh installer, so not sure if that could be your issue.
I just use cmake ../ -DCMAKE_INSTALL_PREFIX=/home/youruser/azeroth-server/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DTOOLS=0 -DSCRIPTS=1
I started with the TrinityCore requirements and sadly forgot to install the libace needed for AzerothCore. Needed to to sudo apt-get install libace-6.* libace-dev like DJ Boxer suggested.
I have cloned this repository https://github.com/grpc/grpc.git for installing the grpc. I want to use the framework with C++ programming so I followed the instructions given in folder src/cpp.
To build grpc for C++ from the source (in OpenSUSE) there are some pre-requisites given in this link
$ [sudo] apt-get install build-essential autoconf libtool pkg-config
As mentioned, to build from source and run tests, one needs
$ [sudo] apt-get install libgflags-dev libgtest-dev
$ [sudo] apt-get install clang libc++-dev
I could not find any build-essential, libgflags-dev and libgtest-dev. I don't know whether this is the reason for not getting grpc installed.
Later,
I have manually installed protocol buffer compiler protoc before running the make.
When I run make in the grpc root directory. I get this error
[PROTOC] Generating protobuf CC file from src/proto/grpc/channelz/channelz.proto
make: protoc: Command not found
make: *** [Makefile:2601: /home/rohan/Downloads/grpc/gens/src/proto/grpc/channelz/channelz.pb.cc] Error 127
Unable to figure out why this error is showing as I already have installed protoc. Is some linking problem, then please share how to solve it. I am new to Linux so I really am a little bit hesitant to change and env file or some make file by my own.
Please suggest some help. Thanks for your time.
I have resolved this problem by installing protocol buffer compiler properly.
The important step which I forgot to do earlier is to update the submodules with git submodule update --init --recursive when you are building protoc with git repository.
The steps for C++ version are mentioned at this link.
Thanks,
I'm a beginner with opencv library. I've installed it on Ubuntu 17.04 and everything during the installation was perfect, no error at all.
I've installed the Opencv-master, builded it, then I downloaded the opencv_contrib-master and added it to the build folder.
I'm trying to build the scene_reconstruction using SFM (structure for motion). I've installed all the dependencies with:
sudo apt-get install libeigen3-dev libgflags-dev libgoogle-glog-dev
Then I've installed the Ceres Solver:
git clone https://ceres-solver.googlesource.com/ceres-solver
cd ceres-solver
mkdir build && cd build
cmake ..
make -j4
make test
sudo make install
Everything was ok, no error at all.
I tried to write the example_sfm_scene_reconstruction.cpp following the official documentation from here (Tutorial Scene Reconstruction).
With cmake . there weren't any errors but when I try to do make I've this error:
screenshot
The english version is fatal error: opencv2/sfm.hpp: no such file or directory #include
Maybe the path is not correct or I don't know what to think.
Thanks!
You have to build the OpenCV Release together with the Contrib Release. To build OpenCV with the Contrib Repository you will have to add a parameter to cmake:
cd <opencv_build_directory>
cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib>/modules <opencv_source_directory>
make -j5
I recommend getting a stable opencv version (e.g. 3.3.1) as opposed to checking out the master branch. Make sure that contrib is the same version. If you are unsure at all, just follow the instructions here:
https://github.com/opencv/opencv_contrib
Also, you will need the dependencies for the sfm module before compiling opencv.
I tried to install boost 1.64 in Travis CI environment in several way. But none of them was succeeded.
In my first naive attempt I just added following line in travis script:
install:
- sudo apt-get install libboost1.64-all-dev
The result was error message: cannot find package libboost1.64-all-dev
In second attempt I specified repository with necessary boost version.
before_install:
- sudo add-apt-repository -y ppa:nschloe/boost-nightly
- sudo apt-get update -qq
install:
- sudo apt-get install libboost-all-dev
# - sudo apt-get install libboost1.64-all-dev (also tried)
In the first case default boost version (1.54) was installed.
In second case result was same error message: cannot find package libboost1.64-all-dev
In third attempt I manually typed instructions to install boost:
install:
- sudo wget -O boost_1_64_0.tar.gz http://sourceforge.net/projects/boost/files/boost/1.64.0/boost_1_64_0.tar.gz/download
- sudo tar xzvf boost_1_64_0.tar.gz
- cd boost_1_64_0/
- sudo ./bootstrap.sh --prefix=/usr/local
- sudo ./b2
- sudo ./b2 install
As result my script took more than 30 min then was terminated.
Is any simple (or just working) way to install other than default boost version to Travis CI?
To look which all packages are available (esp. when you add the extra repository), you can run the "apt-cache search" command, e.g.:
sudo apt-cache search libboost
Then you can see the available versions.
When building manually, by default it builds "everything" (all static/shared debug/release libs), which then takes a lot of time and therefore it might timeout.
You can try to build only the libraries you actually need, for examle:
./bootstrap.sh --with-libraries=program_options,filesystem,system
./b2 link=shared threading=multi variant=release
(see here for details: http://www.boost.org/build/doc/html/bbv2/overview/invocation.html)
Precompiled Boost
Here are the steps I followed to get this to work:
Search on launchpad until I found a recent boost package build for the trusty environment. That was non trivial, but there is a currently maintained ppa from mhier called libboost-latest
I found configuring the .travis.yml correctly to use the ppa nontrivial, so I present a working snippet below which I hope will help anyone else struggling with the same problem.
The following works for clang and gcc:
language: cpp
dist: trusty
sudo: false
os: linux
matrix:
include:
- env: COMPILER=g++-6 BUILD=Debug STANDARD=14
compiler: gcc
addons:
apt:
update: true
sources:
- sourceline: 'ppa:mhier/libboost-latest'
- ubuntu-toolchain-r-test
packages:
- g++-6
- boost1.67
- env: COMPILER=g++-6 BUILD=Release STANDARD=14
compiler: gcc
addons:
apt:
update: true
sources:
- sourceline: 'ppa:mhier/libboost-latest'
- ubuntu-toolchain-r-test
packages:
- g++-6
- boost1.67
# the rest of your yaml file...
Hopefully mhier will keep this ppa running for a while, otherwise you'll have to go through step 1, or provide your own ppa. As the boost version numbers progress the package number will change, so check the ppa page to keep the package name up to date.
A complete working example can be found at the monstar github project.
Compiling boost from source
You can also compile boost from source within your travis build, although you run the risk of timing out. The instruction for this are found in item 12 of boost's best practice handbook
I've run into the same issue and limiting the informational output from the commands seemed to do the trick.
The three that flood the log:
- tar -xzf boost_1_64_0.tar.gz
- ./b2 -d0
- ./b2 install -d0