How to use software built from source and installed with brew in the same project? - cmake

I am trying to get my head around package managers. I recently installed llvm in macOS using
brew install llvm
I installed python3.8 using pyenv and CMake latest release from https://cmake.org/download/. Brew displayed this message after the installation:
==> Dependencies
Build: cmake ✘, python#3.8 ✘
Required: libffi ✔
I have 2 questions:
Should I be concerned that I did not install CMake nor python3.8 using brew? I would like to know before replacing my previous CMake and python3.8 installations with those offered by brew.
Is there a way to use pakages/software installed with brew and without it in the same project and not make everything a mess? If there is, how can I learn to do it?
I am a physics major so my knowledge in these topics is not as good as I would like to.
Thanks for the help!

Related

how to update meson version in flatpak builder

I'm trying to work on a gnome project (Aisleriot). It requires meson, so I installed it using
sudo apt install meson
That installed version 0.61.2. Unfortunately, the project requires version >= 0.62.0. Next, I ran the following command:
sudo apt-get install python3 python3-pip python3-setuptools python3-wheel ninja-build
Now meson is at version 0.64.0. Unfortunately, when I run Builder
flatpak run org.gnome.Builder
and load my project, it still uses meson version 0.61.2. Why is it using this earlier version and how do I tell Builder to use the system version instead?
There is a similar question from 4 years ago, but it talks about a build settings panel, which I couldn't find. Does the build settings panel still exist and how do I display it?

spa/meson.build:29:4: ERROR: Dependency "bluez" not found, tried pkgconfig and cmake while installing PIPEWIRE in Ubuntu 16.04

I am trying to install Pipewire in my Ubuntu 16.04 x86 amd64 machine using instructions found here : https://pipewire.org/#getting
./autogen.sh --prefix=$PREFIX
On running the above command, I get this error
spa/meson.build:29:4: ERROR: Dependency "bluez" not found, tried pkgconfig and cmake
I have installed bluez already. This is the output for running
**sudo apt-get install bluez**
Reading package lists... Done
Building dependency tree
Reading state information... Done
bluez is already the newest version (5.37-0ubuntu5.3).
0 upgraded, 0 newly installed, 0 to remove and 19 not upgraded.
The files that are required to do development on top of a package are often separate (since this is really only needed by developers, and would take up too much size for no reason otherwise).
In your case, the package you're looking for is libbluetooth-dev. So you can do sudo apt install libbluetooth-dev

installation of cmake on debian 8

I tried to install mcsema on my debian linux but I am stopped by error
Cmake 3.1 or higher is required. You are running 3.0.2. On debian this is the only version could be installed by apt-get install. Building CMake from sources, I get several errors as well. Does anyone know how to install the latest version of Cmake on Debian 8?
Download latests cmake release and follow the README.rst instructions:
UNIX/Mac OSX/MinGW/MSYS/Cygwin ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You need to have a compiler and a make installed. Run the
bootstrap script you find in the source directory of CMake. You
can use the --help option to see the supported options. You may
use the --prefix=<install_prefix> option to specify a custom
installation directory for CMake. You can run the bootstrap script
from within the CMake source directory or any other build directory of
your choice. Once this has finished successfully, run make and
make install. In summary::
$ ./bootstrap && make && make install

How to provide standard library sources for IntelliJ IDEA's Rust project?

I am using Mac for development. I installed Rust 1.13.0 using brew install rust and the Rust plugin 0.1.0.1385 for IntelliJ IDEA. I created my first test project with cargo and while opening it with IDEA I got the message
No standard library sources found, some code insight will not work
I haven't found any sources installed, nor the Rust sources package in Homebrew.
How do I provide sources for the project and what are the practical implication if I ignore this step?
As commented, the supported approach is to use rustup:
Navigate to https://rustup.rs/ and follow the installation instructions for your platform.
Add the rust-src component by running: rustup component add rust-src
Create a new Rust project in IntelliJ and choose your existing Rust project source. If the folder already contains previous IntelliJ project files, you may have to delete those first before it will let you proceed.
IntelliJ-Rust should automatically configure the standard library sources to point to the sources downloaded by rustup.
As a reference, since the question title is broad, for Fedora 28 I had to:
dnf install cargo rust-src
sudo ln -s /usr/lib/rustlib/src /usr/lib/rustlib/x86_64-unknown-linux-gnu/
then give /usr/lib/rustlib/x86_64-unknown-linux-gnu/src/rust/src as "Standard library"
Full setup:
Issue opened to simplify the process
When not using the rustup installer, one can install the source package and direct the rust plugin to use those:
(Tested with CLion 2020.2.1, rust-1.46.0-x86_64-pc-windows-gnu.msi, rustc-1.46.0-src.tar.gz. Offline Rust installers and source archive from there: https://forge.rust-lang.org/infra/other-installation-methods.html )
Although the preferred way of installing Rust is by using rustup, as pointed out by the other posts, it is not uncommon to use the packages that your distro makes available.
I use, for example, the packages provided by Gentoo and I share the same problem about the not prefilled field for standard libraries.
Nevertheless, you can easily find out where your standard libraries have been installed by typing the following find command:
find /usr/lib* -type d -name "rust" | grep src
or the following if you installed rust in your home
find -type d -name "rust" | grep src
The previous commands will help, unless, of course, in your distro there is a package for the binaries and one for the source and you only installed the binary one.
I know the question is for MacOS but this answer is shown up when searching for it on Linux. Below I will answer for Ubuntu.
The path is /usr/lib/rustlib/src/rust/src for Ubuntu 20.04
The way I did is:
Installed rustc from the repositories, which includes cargo
sudo apt install rustc
Then installed rust source package
sudo apt install rust-src
I used apt-file (can be installed with sudo apt install apt-file) to search for the install path of the sources
sudo apt-file update
apt-file list rust-src
This show the path as /usr/src/rustc-1.41.0/src .
But a ls -la in /usr/lib/rustlib/ will reveal symlinks and /usr/lib/rustlib/src/rust/src points to the previous found directory.
Using the symlink on IntelliJ will survive new rust versions.
For Fedora 32 install Rust using command:
dnf install cargo rust-src
and the path to standard libary source is:
/usr/lib/rustlib/src/rust
I used Ubuntu. I follow these steps:
sudo apt install rust-src
wait for the install, then
dpkg -L rust-src
copy the last line. For me it is the standard library path:
/usr/lib/rustlib/src/rust
For MacOS, you need to put /opt/homebrew/bin/.

How can I get Mono 2.11+ installed on Travis-CI?

I build my C# project on Travis-CI like this:
# .travis.yml
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq mono-devel gtk-sharp2
install:
- xbuild Source/Pash.sln
Travis uses Precise (Ubuntu 12.04 LTS) which seems like a good choice for them, but it includes Mono 12.10. My C# project hits a bug in Mono 2.10. The bug appears to be fixed in Mono 2.11+.
I read that Ubuntu is slow to pick up new builds of Mono because so much depends on it, and it can break so much. That's fine, but for Travis dependencies aren't really a problem - the machine goes away at the end of the build!
I have considered
compiling a new Mono in .travis.yml but I don't want to put that much burden on the Travis servers.
Building a MCS (Mono C# compiler) with just this fix.
Downloading and installing a newer Mono from somewhere (where?)
Checking a recent Mono in to my GIT repo.
Suggestions?
If you're going to use something higher than what standard distro packages provide, I recommend you to go all the way and not use unstable 2.11.x series, but official/beta 3.x ones.
So, grab yourself some preview Debian/Ubuntu 3.0.6 packages from this PPA:
http://www.meebey.net/posts/mono_3.0_preview_debian_ubuntu_packages/
The best way I've found to get a full up to date mono environment is to use an OS X travis profile
language: objective-c
before_install:
# Make sure mono is installed,
- wget http://download.mono-project.com/archive/3.0.10/macos-10-x86/MonoFramework-MDK-3.0.10.macos10.xamarin.x86.dmg
- hdid MonoFramework-MDK-3.0.10.macos10.xamarin.x86.dmg
- sudo installer -pkg "/Volumes/Mono Framework MDK 3.0.10/MonoFramework-MDK-3.0.10.macos10.xamarin.x86.pkg" -target /
install:
- xbuild Source/Pash.sln