I am working on a data distribution service protocol using eProsima FastRTPS in Linux (Ubuntu), but I am not able to make it run because FastRTPS has file "makefile_x64Linux2.6gcc" which i need to compile but i dont know the commands to do it . I have tried make option, too, but still having the same problem. Is there any command for compiling .6cc file?
You must compile using cmake as indicated in the README file from eProsima Fast-RTPS github
In you case:
$ cmake -DTHIRDPARTY=ON ..
$ make
$ sudo make install
You can install in an user's folder setting -DCMAKE_INSTALL_PREFIX=/path on the cmake command.
$ cmake -DTHIRDPARTY=ON -DCMAKE_INSTALL_PREFIX=~/path/Fast-RTPS ..
$ make
$ make install
Actually everything is working fine now. The problem was I was only using make command. If I use make -f command it will make an executable file of it.
Related
I am running the following to configure my project: $ cmake -G Eclipse CDT4 - Unix Makefiles -D CMAKE_BUILD_TYPE=Debug path/to/cmake/file. Then, I do message(STATUS ${CMAKE_CONFIGURATION_TYPES}) in my CMake files and the output is nothing.
I don't beliebe there is a problem with the way that I am passing the build type since when I run make, the Gflag has been added. Seems like everything works besides setting CMAKE_CONFIGURATION_TYPES. This is on Ubuntu 18.04. Any ideas?
I checked diverse forums but I still did not make it working.
I like to install go (golang) on my Raspberry PI - Raspbian:
With
sudo apt-get install golang
I installed go and with
export GOPATH=$home/pi/gocode
i set the GOPATH so i tryed to install from a homepage a new program with (sudo go get -u github.com/....) but, I only get "cannot download, $GOPATH not set. For more details see: go help gopath".
I really get crazy for my studip simple mistake that i do not see.
I would be pleased if i get a very detailed "how to do" discription since I am new to Linux and Raspbian, so everything which is made for real dummys should be good enough for me.
Thank you for your help.
This are detailed instructions about how to install Go on Raspbian Stretch from the repositories.
As of today, 2018-01-30, this will install Go 1.7. The most actual version for manual installation from the downloads is Go 1.9.3.
I. Login to your user on the Raspberry Pi (I'm using the default user pi).
II. Install Go (golang)
pi#pi3-2:~ $ sudo apt update
pi#pi3-2:~ $ sudo apt install golang
III. Create a working directory for all your go projects in your $HOME directory. It's best to name it go, as this defaults to the GOPATH in future Go versions (starting with Go 1.8).
pi#pi3-2:~ $ mkdir go
IV. Append the $GOPATH environment variable and modified PATH settings to your .profile
pi#pi3-2:~ $ echo 'export GOPATH=$HOME/go' >> ~/.profile
pi#pi3-2:~ $ echo 'PATH="$HOME/go/bin:$PATH"' >> ~/.profile
V. Logout and Relog with the new settings then check your settings
pi#pi3-2:~ $ go env
GOARCH="arm"
GOBIN=""
GOEXE=""
GOHOSTARCH="arm"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/pi/go"
GORACE=""
GOROOT="/usr/lib/go-1.7"
GOTOOLDIR="/usr/lib/go-1.7/pkg/tool/linux_arm"
CC="gcc"
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build187598155=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
Especially make sure GOPATH points to your previously created Go working directory. Don't care about setting GOBIN as mentioned in some documentation. It's usually not necessary and Go will automatically use $GOPATH/bin/ for your Go installs.
However, you might also want to check the path settings (/home/pi/go/bin should be included) to make sure you can run the code you installed with go install.
pi#pi3-2:~ $ echo $PATH
/home/pi/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
VI. A few words about the Go working directory structure
Over time, the Go working directory will contain three sub-directories: bin, src and pkg. Except src they will be automatically created, when needed the first time. The structure for user pi will look like this:
/home
/pi
/go
/src
/pkg
/bin
bin will contain all Go executable's you have installed using go install command.
pkg will contain all compiled packages that can be imported into your projects.
src will contain all your source files, either your own or sources downloaded from external repositories.
For eksample the command go get github.com/petergloor/hello-go will automatically fetch and place the source files from the corresponding external Github repository into the local directory $HOME/go/src/github.com/petergloor/hello-go.
As it's rather common to fetch external repositories either for reference or contribution it becomes important to keep your directory structure always well organized and clean.
Apart from that you are free to organize your projects as long they are hierarchically structured below the $HOME/go/src/ directory and follow the rules mentioned in the documentation.
However, to clearly organize my projects I personally always place my projects into $HOME/go/src/github.com/my-github-account even if I don't have an external repository for it.
If you don't have a github account you can likewise use any other external repository account.
As I mentioned, even it's not needed at all I prefere to use my Github account to clearly identify my projects. And even it's not needed I will use the username pi to distinct the user from other project maintainers in the following example.
VII. So let's add a "hello world" project to test our installation.
a) First let's create the project folder and cd into its directory.
pi#pi3-2:~ $ mkdir -p $HOME/go/src/pi/helloworld
pi#pi3-2:~ $ cd $HOME/go/src/pi/helloworld
pi#pi3-2:~/go/src/pi/helloworld $
b) With an editor of your choice create a file main.go with the following content
// helloworld project main.go.
package main
import ("fmt")
// main is the entrypoint of the application.
func main() {
fmt.Println("Hello world! Greetings from Raspberry Pi")
}
Spacing doesn't matter at this point. Go provides a nice tool to do this for you.
c) Now try to run the program.
pi#pi3-2:~/go/src/pi/helloworld $ go run main.go
Hello world! Greetings from Raspberry Pi
pi#pi3-2:~/go/src/pi/helloworld $
In case you get an error, fix it! Carefully, check the spelling and cases (Go is case-sensitive).
d) Next lets format the code:
pi#pi3-2:~/go/src/pi/helloworld $ go fmt
Without a file name this will properly (re-)format all source files within this directory and below.
e) Next let's build helloworld as an executable procram, within this directory.
pi#pi3-2:~/go/src/pi/helloworld $ go build
pi#pi3-2:~/go/src/pi/helloworld $ ls
helloworld main.go
pi#pi3-2:~/go/src/pi/helloworld $
f) Now you can run it.
pi#pi3-2:~/go/src/pi/helloworld $ ./helloworld
Hello world! Greetings from Raspberry Pi
pi#pi3-2:~/go/src/pi/helloworld $
g) Finally let's install the program into the $HOME/go/bin/ directory.
pi#pi3-2:~/go/src/pi/helloworld $ go install
pi#pi3-2:~/go/src/pi/helloworld $ ls $HOME/go/bin
hello-go helloworld
pi#pi3-2:~/go/src/pi/helloworld $
h) If everything is done right it can be run by our pi user from anywhere by just entering the name of the command.
pi#pi3-2:~/go/src/pi/helloworld $ helloworld
Hello world! Greetings from Raspberry Pi
pi#pi3-2:~/go/src/pi/helloworld $ cd ~
pi#pi3-2:~ $ helloworld
Hello world! Greetings from Raspberry Pi
pi#pi3-2:~ $
Congratulations!
as of Nov 2019. (Please note if you need version 1.13+ please wget go1.13.3.linux-amd64.tar.gz manually)
OR sudo apt-get install golang-go - source
You just have to type following commands on your RPi
sudo apt-get update
sudo apt-get install golang --fix-missing
and when you type now go version following should be your output
pi#rpi1:~ $ go version
go version go1.11.6 linux/arm
Additionally, I also had the following installed before running everything
sudo apt-get install make gcc g++
How to install golang:
Download the latest tarball, go1.9.linux-armv6l.tar.gz, to a directory such as /home/pi/downloads.
Then use:
sudo tar -C /home/pi -xzf go1.9.linux-armv6l.tar.gz
to extract the go installation to the directory
/home/pi
creating /home/pi/go
to check use
go version
Which will give you the actual version of go.
It should be go1.9 linux/arm.
Please check with:
go env
or
go env GOPATH
the GOPATH direction
with
ls -a # (used in /home/pi/ )
give you a list of all files and also shows you ~/.profile
with
sudo nano ~/.profile
you can open that file an add the reccommended code for the go directory
export GOROOT=/home/pi/go
export GOPATH=/home/pi/go/bin
close with STRG + O and ENTER and STRG + X
check with
go env GOPATH
then use
source ~/.profile
then you can check again with
go env
Now go should be running on the latest version and should have the correct GOPATH directory
For me helpful was this link: https://tecadmin.net/install-go-on-debian/#
I really hope some others also give detailed descriptions of how to install a program in a brief and detailed way. Instead of 3 lines of single code.
I'm running Cygwin 64bit but can't seem to get OpenShift oc command line to work
I downloaded oc.tar.gz ( from here https://mirror.openshift.com/pub/openshift-v3/clients/3.6.173.0.5/linux/oc.tar.gz ), unzipped it and placed it in my path in /usr/bin
When I try to run: oc login I get the following.
-bash: /usr/bin/oc: cannot execute binary file: Exec format error
Do I need to somehow 'install' the executable ?
Any help would be much appreciated.
In addition to #Graham Dumpleton's answer:
open cygwin and check for directory /usr/local/bin
mkdir -p local/bin
$ cd /usr/local/bin
if it does not exists:
$ mkdir -p local/bin
finally extract the windows package:
$ cp /cygdrive/c/Users/me/Downloads/oc-3.5.5.31.24-windows.zip /usr/local/bin/
unzip oc-3.5.5.31.24-windows.zip
$ oc version
oc v3.5.5.31.24
kubernetes v1.5.2+43a9be4
features: Basic-Auth
Use the Windows binary from the following page:
https://github.com/openshift/origin/releases
From project homepage
https://www.cygwin.com/
Cygwin is not:
a way to run native Linux apps on Windows. You must rebuild your
application from source if you want it to run on Windows.
a way to magically make native Windows apps aware of UNIX®
functionality like signals, ptys, etc. Again, you need to build your
apps from source if you want to take advantage of Cygwin
functionality.
I want to test rna-star code. I have Ubuntu 12.04 on my machine.I have downloaded all the packages necessary:
sudo apt-get update
sudo apt-get install g++
sudo apt-get install make
But in the installation step I have problem running make command on STAR executable file.on the installation manual I see it says:
Unzip/tar STAR_x.x.x.tgz file into a directory of your choice <
STARsource >, cd < STARsource > and run make. The source code will be
compiled and the STAR executable will be generated.
when I run 'make STAR' it says:
make: Nothing to be done for `STAR'.
any suggestion?
This means that the "STAR" target does not exist. In a makefile, you define targets (implicit or explicit) and make takes care of building in the correct orders the dependencies for your target.
You should read documentation on this project or glance at the makefile : it's likely you need to run "make" without parameters (which is stated in your documentation excerpt), something like :
tar zxvf star...tgz
cd star...
make
So I just ran into the same problem.
Apparently the following solved it:
Redirect to source map: cd STAR-2.5.3a/source
The Makefile is in this location, after this just enter the command make.
It should start running. If you work in a cluster do not forget to edit your shell configuration before using;
export PATH=$HOME/STAR-2.5.3a/source:$PATH
I'm at a bit of a loss, the problem is that I need to install GCC on X-Linux. Basically what's happening is I have been told to try and get wine on X-Linux...so I transfer the files over run the configure and I'm told I need GCC, so I download GCC only to find that I don't have a 'make' command...So I download the tar for the make command, turns out make needs a C compiler to run!
I'm stuck in a kind of chicken-and-the-egg loop here....help me!
A GNU Make source tarball contains a build.sh script to resolve this chicken-and-egg situation. From the README:
If you need to build GNU Make and have no other make program to use,
you can use the shell script build.sh instead. To do this, first run
configure as described in INSTALL. Then, instead of typing make to
build the program, type sh build.sh. This should compile the program
in the current directory. Then you will have a Make program that you
can use for ./make install, or whatever else.