i want to build .px4 file
so i trying build with Qt Creator in ubuntu 14
but did not work
how to fix this problem...
If you have cloned into the native git px4 repo (https://github.com/PX4/Firmware) I would suggest you to go for a suitable tagged release branch (other than beta-unless you think of developing the firmware) depending on your board version instead of master as it is most probably tbd..
Open the terminal, manual build is mostly recommended. cd to go to your cloned/source directory of px4 firmware with:
cd <fmu_source_directory>/
and just use
make build px4fmu-v**x**_default upload
(x can be any version you like to build for your board [1-4])
this way you would be able to bypass the config errors of qt and easily manually deploy your px4 firmware (assuming that you have a gnu compiler and all other dependencies built and ready to use on your computer)..
Related
I am using Rust to cross compile a CLI.
An issue I am having is that typically the Rust compiler only works flawlessly when it compiles for the same OS/arch as the host it is running on (otherwise there are missing components, e.g. dynamic libs or compiler toolchains).
I want to release a binary that I have compiled on my Mac, but I want to be able to archive all inputs so that I can recreate the build for any future security audits.
For Linux I am using Docker containers which snapshot all files used as input to the cargo build process.
But for my Mac I have no idea how to isolate the cargo install, or what other toolchains or dynamic libs it may be calling out to.
Thanks
I am trying to set up Go on my offline Windows computer, using Visual Studio Code. I have successfully installed VS Code, Go, etc., but am running into trouble installing the Go tools. Unfortunately putting my Windows computer online isn't an option.
The most important tool for me is gopls the Go Language Server tool that provides hover, autocomplete, etc., and will really boost productivity.
I have tried various things, including:
Copying the binary file from $GOROOT/bin/gopls from my Internet-connected Mac to Windows.
Cloning the gopls repo from Github and rebuilding gopls for Windows as covered here by running go build -o gopls.exe main.go.
However I get the following error:
Couldn't start client gopls
Copying the cloned repo to my offline computer and running go install does not work as there are other dependencies needed to fully build and install gopls.
Another tool, staticcheck, provides precompiled binaries for all platforms here.
I have two questions:
Is there a publicly available repo/mirror/site that provides ready-made, downloadable binaries for the main set of Go tools for Windows?
Is there a way that the Go tools can be built for a Windows OS?
The bug on this was setting the environment variable correctly.
To give exact steps:
Browse to your Go src directory: $GOPATH/src/golang.org/x/
Clone Go tools repo: git clone https://github.com/golang/tools.git
cd tools/gopls.
Run GOOS=windows GOARCH=386 go build -o gopls.exe main.go to compile a binary file for gopls that is compatible on Windows.
Repeat steps 3 and 4 for each tool you need to install.
Ref: https://github.com/golang/go/wiki/WindowsCrossCompiling
In one of our projects we have used Gstreamer good plugins. I see that each element has a Makefile for building.
Now I wanted to upgrade rtpmanager code (https://github.com/GStreamer/gst-plugins-good/tree/master/gst/rtpmanager) inside Gstreamer. But, I see that there are no Makfiles anymore but 'meson.build' file.
Currently our project build does not support meson. So, is there a way to convert the latest rtpmanager code involving meson.build to traditional Makefile kind of build so that I can integrate its latest changes into my project.
Meson does not and never will generate makefiles.
Qemu meson PoC is using a tool to convert ninja files to Makefile:
https://github.com/bonzini/qemu/blob/meson-poc/scripts/ninjatool.py
How can I build a Linux kernel in Travis CI. I have added script: make menuconfig to my Travis config and it doesn't work and says
No output has been received in the last 10 minutes
How can I fix this?
Link to GitHub repo : https://github.com/ProjectPolyester/tegra_kernel and submit fixes in PRs if possible
Travis monitors your build process and if there is no output for about 10 minutes, it assumes that your process is stuck somewhere for unknown reasons, and then kills it.
Solution in your case :
You need to provide with the actual build command.
make menuconfig
actually just allows you to configure the kernel. It doesn't really starts the kernel build process. So there is no output of this command.
Also, the kernel should already be configured or you can download the appropriate .config file if its available some where online. And then there will be no need to execute:
make menuconfig
The build command
It can be simply
make
or something like
make -j3 modules ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- LOCALVERSION=-$SOURCE_VERSION
The second one is actually to perform cross compilation.
You also need to set all the prerequisites like downloading the header file etc
You may want to take a look at this script , it crosscompiles the modules only, not the entire kernel.
If you want to use the old config for a new kernel, you can use make olddefconfig. Here is my example how to compile and boot a new kernel in travis: https://github.com/avagin/criu/blob/linux-next/scripts/travis/kexec.sh#L54
I know that this is an old thread but I was recently able to get Travis CI working on building a Linux kernel
https://github.com/GlassROM-devices/android_kernel_oneplus_msm8994/commit/6ed484812bbd4a25c3b22e730b7489eaaf668da1
GCC fix is for toolchains compiled on Debian unstable, arch, gentoo, etc. These toolchains will fail to compile on Ubuntu so you'll have to use the GCC fix for these toolchains
And you really want to upgrade GCC before you even try building a kernel. Travis CI has a very old GCC that will fail if you try to compile the kernel
In my commit I'm building it with GCC 8 linaro built by myself
Would it be possible to have a nightly build Rust compiler for convenience (faster build cycle, auto-update) and a dev version of Rust cloned from GitHub for experimentation purposes?
The idea is I have a binary version of Rust for my various project and a version of Rust I can hack on, without them causing havoc between each other.
If it matters, assume my OS is Ubuntu 64-bit.
The current solution is to use rustup. Once installed, you can install multiple toolchains:
rustup install nightly
rustup install stable
rustup install 1.7
If you have a local build of Rust, you can link it as a toolchain
rustup toolchain link my-development /path/to/rust/code
You can pick a default toolchain
rustup default stable
Or add an override toolchain for a specific directory on your machine only via rustup
cd /my/cool/project
rustup override set nightly
Or add an override toolchain that lives with a specific directory, like a repository, via a rust-toolchain file
cd /my/cool/project
echo "nightly" > rust-toolchain
If you want to just use a different toolchain temporarily, you can use the "plus syntax":
rustc +1.7 --help
cargo +nightly build
In other cases you can use rustup run to run any arbitrary command in a specific toolchain:
rustup run nightly any command you want here
See also:
How to execute cargo test using the nightly channel?
Sure. In the development version, use the --prefix option to ./configure, e.g. --prefix=~/opt/rust-dev, and then its installed files will be contained entirely inside that directory.
Try to configure your IDE. Though I am working on Windows computer, I think the idea is similar to Ubuntu.
First, I've installed 3 versions of Rust into:
C:\Rust\64 beta MSVC 1.9
C:\Rust\64 nightly MSVC 1.10
C:\Rust\64 stable MSVC 1.8
Then I configured my IDE (in this case, IntelliJ IDEA 2016 + Rust Plug-In) to use different versions of Rust depending on build selector.
After this I can compile my code with different Rust versions just by selecting build-config from toolbar.
You also don't need to install your development version. You could just make symlink from somewhere in your $PATH to the rustc binary that lives somewhere inside the source tree/build directory, the compiler will find its dynamically linked dependencies and it will emit binaries that know about that path too (if even dynamically linked).
Try envirius.
It allows you to create any number of environments with any version of the rust.
For the first time it will download the source code of the rust and will compile it.
And it will take some time. But second and subsequent attempts will takes under 10 seconds as it just will copy the binaries into the target environment.
For example:
➥ nv mk --rust=0.9
Creating environment: rust-0.9 ...
* installing rust==0.9 ...
* done (in 5 secs.)
➥ nv ls
Available environment(s):
rust-0.9
➥ nv on rust-0.9
Environment rust-0.9 activated.
(rust-0.9) ➥ rustc -v
rustc 0.9
Usually when dealing with rustup, you're dealing with toolchains–a single installation of the Rust compiler. There are 3 major release channels:
stable
beta
nightly
The channel can be appended with optional date and host names: channel[-date][-host].
You can install multiple toolchains using rustup:
rustup toolchain install nightly
rustup toolchain install stable-x86_64-pc-windows-msvc
Be careful when nightly is installed as any updates using rustup update will also update stable.
You can have different level of overrides:
# command level
rustc +beta <command>
cargo +beta <command>
# environment level
export RUSTUP_TOOLCHAIN=nightly-2019-05-22
# directory level
rustup override set stable
The toolchain configuration can also be version controlled using a rust-toolchain file, which contains just the toolchain name.
$ cat rust-toolchain
nightly-2019-05-22
No host name can be configured in the rust-toolchain file.
The override precedence is:
An explicit toolchain, e.g. cargo +beta
The RUSTUP_TOOLCHAIN environment variable
A directory override, ala rustup override set beta
The rust-toolchain file
The default toolchain
Reference: https://github.com/rust-lang/rustup.rs#toolchain-specification