I am working on a project that depends on CMake. When I download CMake and I add it to the root of the repo I still have the same error.
CMake is a pre-requisite to build this repository but it was not found on the path.
Please install CMake from http://www.cmake.org/download/ and ensure it is on your path.
Where and how should I add CMake to the project?
While I don't know what you mean by repo, after searching for the error message
CMake is a pre-requisite to build this repository but it was not found on the path.
It seems you are working with dotnet/corefx or an older version of dotnet/coreclr.
Indeed, it looks like a problem similar to yours has been fixed on May 30, see commit entitled Improve CMake detection on Windows when not in PATH here: https://github.com/dotnet/corefx/issues/28799
Related
I copied the commands (from these instructions: http://www.shogun-toolbox.org/install#ubuntu) into the terminal and they seem to have worked, but there is no documentation on how to make Octave find the libraries. I have tried modshogun and init_shogun but Octave cannot find them. I do have the libraries in usr/lib, and I have put that directory on PATH. I have even set usr/lib as my working directory in Octave and that did not help. As far as I have found, there is no Shogun documentation on what to do at this point.
I have also tried compiling Shogun from source, but configure couldn't find GCC. Apparently, this is a known problem with newer versions of GCC. I decided to ask for help with the former method because at least I have the libraries with that.
Edit: I am following the instructions here http://www.shogun-toolbox.org/install#manual-basics
When i do cd build and then "cmake -DINTERFACE_OCTAVE=ON" it tells me there is no cmakelists.txt. There is one in in the above folder, but when I go to that directory and do "cmake -DINTERFACE_OCTAVE=ON" again, it tells me "Shogun can only be built with GPL codes if the source files are in /home/derose/shogun/src/shogun/src/gpl. Please download or disable with LICENSE_GPL_SHOGUN=OFF."
However, when I add -LICENSE_GPL_SHOGUN=OFF as an option, i get the error "CMake Error: The source directory "/home/derose/shogun/src/shogun/-LICENSE_GPL_SHOGUN=OFF" does not exist."
You've linked to the Ubuntu install instructions. From there
These currently do contain the C++ library and Python bindings..
No word that this would include the GNU Octave binding. See below on the same page:
The native C++ interface is always included. The cmake options for building interfaces are -DINTERFACE_PYTHON=ON -DINTERFACE_R .. etc. For example, replace the cmake step above by cmake -DINTERFACE_PYTHON=ON...
So you have to grab the source and fire up cmake with something like -DINTERFACE_OCTAVE=ON
Steps to build the bleeding edge of shogun (the github repo) and the Octave interface:
git clone https://github.com/shogun-toolbox/shogun && cd shogun
git submodule update --init
mkdir build && cd build
cmake .. -DINTERFACE_OCTAVE=ON
make -j4
I am trying to setup a MySQL server using CentOS (No GUI) and I need to switch to OpenSSL instead of YaSSL in order to have access to the encryption tools.
The issues happen when runing the cmake. At first I got the error that cmake was not able to find boost, I fixed this adding the parameter -DWITH_BOOST.
The cmake line is as follows.
cmake . -DWITH_READLINE=ON -DWITH_SSL=system -DWITH_BOOST=/usr/local/src/mysql-5.7.20/boost/
After the adjustment I ran again the CMAKE the I got several errors.
SSL Error, cmake can not find the OpenSSL files. I checked if the library was installed, I also downloaded the tar.gz file and decompress it and pointed the cmake to the folder, none of this worked.
Can not find NUMA libraries, again I checked and it is installed, at this point I ran the system update to check for everything but this did not solve the issue.
Can not find the ncurses, the same thing, is on the system but for some reason cmake is not able to find those.
Can not fin libaio, I didn't have this one installed, I installed, ran cmake again, and again cmake was not able to find it.
I been looking around, trying to figure out all this issues, I've been joining information from different websites but still not able to figure out this.
Thanks ahead to everyone for the help.
You're facing the dependencies hell with MySQL. If you don't really need to compile from the sources, you still can install with the RPM which is much easier. The RPM method is described here : https://dev.mysql.com/doc/mysql-yum-repo-quick-guide/en/
As you're asking a ready-to-go install from the sources, this is what I just did and it worked, on a fresh CentOS 7.4 minimal, 2 vcpus 3Gb :
yum group install -y 'Development Tools'
yum install -y cmake ncurses-devel curl
curl -Ovk https://cdn.mysql.com/Downloads/MySQL-5.7/mysql-5.7.20.tar.gz
tar zxf mysql-5.7.20.tar.gz
cd mysql-5.7.20
cmake . -DDOWNLOAD_BOOST=1 -DWITH_BOOST=$HOME/boost -DENABLE_DOWNLOADS=1
make -j2
make install
After that you need to configure it, add the startup scripts, and of course secure it. Here are some additional docs :
http://howtolamp.com/lamp/mysql/5.6/installing/
https://dev.mysql.com/doc/refman/5.7/en/mysql-secure-installation.html
Perhaps try make clean; cmake clean; ldconfig then run your cmake command. Sometimes the system can't find the shared libraries, and ldconfig refreshes the library search path. This helped once when I was compiling something (emscripten?) which required a lot of libraries which I was installing as compilation errors arose.
The make clean; cmake clean will ensure that the compiler isn't looking at the old library search path when you recompile.
I want to build 'riscv-gnu-toolchain' for Sodor Project available in :
ucb-bar/riscv-sodor
I failed to clone it as suggested by its readMe using :
'git clone git#github.com:riscv/riscv-gnu-toolchain.git'
I also tried to use the latest version of the repository, and it generates the following warning :
'configure: WARNING: unrecognized options: --disable-float, --with-xlen'
Which suggests that this is not the right version. I tried to use the version in ROCKET CHIP, but I failed also.
Which version of 'riscv-gnu-toolchain' I can use to compile Sodor's tests?
Thank you Chris. I found a version that work with Sodor. Here are the commands that can be used to checkout this version and build it:
git clone https://github.com/riscv/riscv-gnu-toolchain
cd riscv-gnu-toolchain
git submodule update --init --recursive
git checkout 06c957ab
mkdir build
cd build
../configure --prefix=${INSTALL_LOC} --disable-float --disable-atomic --with-xlen=32 --with-arch=RV32I
make
Sodor currently only supports the Privileged Spec v1.7, so you need to use an older version of riscv-gnu-toolchain. Older versions of the toolchain will recognize the options --disable-float and --with-xlen. It appears that there are no tags on riscv-gnu-toolchain, so you'll have to do some detective work to find the correct commit.
I'm looking for a command like cmake --features or cmake --config which shows me how my CMake executable was built. For example, I want to know weather the flags like --system-bzip2 really did get used and check the paths to the libraries CMake uses.
I am not interested in knowing what features are available on which CMake version, but which options were actually used in the build.
To find out, which libraries are used for the compiling of your CMake executable, I see three ways, as there is no --feature or --config provided by CMake.
Check the output of CMake's configure run. For most libraries, it indicates the path to the library.
Check the CMakeCache.txt within the build directory. You can find out the library paths
When you build CMake, call make VERBOSE=ON and check the output.
As far as I know, there's no such a feature in the CMake executable.
You should check your CMake version toward the official documentation to check whether a given feature is included in that version.
There's a nice tool, written in CMake language, that automates this work, you can find more info here.
I'm working with a project that [used to] support both Autotools and Cmake. In the past, I would:
cd project/build
...
../llvm/configure --enable-optimized --enable-cxx11 $OTHER_OPTIONS --prefix=/usr/local
make -j2
sudo make install
The project has kind of abandoned it support for Autotools, so I have to use Cmake now. Using Cmake to configure seems like it should be relatively easy.
Unfortunately, Mac OS X lacks man pages for Cmake, so I can't RTFM. And the search hits I am finding discuss how to build Cmake packages (and other stuff package maintainers would do), and not how to use it as a dumb project user.
I tried to simply use Cmake in place of Configure, but it did not work:
$ cd project/build
$ OTHER_OPTIONS=" --enable-libcpp"; cmake ../llvm --enable-optimized --enable-cxx11 "$OTHER_OPTIONS" --prefix=/usr/local
CMake Error: The source directory ".../clang-3.6/build/--prefix=/usr/local" does not exist.
Why is Cmake treating a configuration option like a directory (--prefix=/usr/local)?
How do I configure and build a project that uses Cmake as a dumb project user?
You're trying to configure a CMake project like it was autotools. The syntax of the command is;
cmake -Doptions -Dmore_options src_dir
src directory is the last argument, which is why it treats --prefix that way. You will need to know the name of the parameters available to you though. If you're new to CMake, your best bet is to run, either the Qt gui or the curses gui ( ccmake /path/to/src while your in the build directory ). Those gui tools will let you pick your options, configure then generate. Then all you need is to type make ....
Note
cmake --help
does provide info even if your man pages aren't installed. Also, if you have access to google and the internet, searching "cmake man page" should give you access the your missing man pages.