I compile in Ubuntu 20.04 with gcc 7.5.0 and g++ 7.5.0(supporting cilk plus), but the error says that 'cilk/cilk.h: No such file or directory'the error is shown in the picture
Anybody could help me with the situation? Thanks a lot!
Your compiler still doesn't support cilkplus, just install it via apt-get install:
sudo apt-get install -y libcilkrts5
there you go,
UPDATE: Cilk is not supported with the gcc package on ubuntu 20.04,
to have cilk on ubuntu 20.04 you have to install gcc version < 7 , by the following instruction it's possible to install gcc-6 g++6 on ubuntu 20.04,
sudo vim /etc/apt/sources.list
add "deb http://dk.archive.ubuntu.com/ubuntu/ bionic main universe" to file
sudo apt update
sudo apt-get install gcc-6 g++-6 -y
check by gcc -v if you have downgraded correctly the gcc version Then the cilk extension should work.
Related
When I do g++ --versionon my Linux Ubuntu I get g++ (Home-brew GCC 5.5.0_7) 5.5.0. This was installed via brew install gcc.
As the latest version of gcc is 10.2, why has brew not installed this version?
I had also tried
sudo apt update
sudo apt install build-essential
sudo apt install gcc-9and
gcc --version
but it did not change the version. Any advice?
Also, when I try to run an installation script I get the following error
error: command 'home/linuxbrew/.linuxbrew/bin/g++ failed with exit code 1
but
which gcc
gives
/home/linuxbrew/.linuxbrew/bin/g++
so I am not sure what happened.
On an Amazon Linux 2 Docker image, "yum install gcc" installs gcc 7.3.1.
I want to install gcc 8. It seems it normally can be installed as part of "devtoolset-8" (https://www.softwarecollections.org/en/scls/rhscl/devtoolset-8/), but the instructions for either CentOS or RHEL seems not working on Amazon Linux.
So the only way to install gcc 8 on Amazon Linux is to install from source?
I also need the devtoolset-8-toolchain, how can that be installed?
Add the scl repo for centos:
sudo yum-config-manager --add-repo http://mirror.centos.org/centos/7/sclo/x86_64/rh/
Install this libgfortran dependency required for devtoolset-8:(source)
sudo yum install -y wget
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/libgfortran5-8.3.1-2.1.1.el7.x86_64.rpm
sudo yum install libgfortran5-8.3.1-2.1.1.el7.x86_64.rpm -y
Install devtoolset-8 with nogpgcheck:(it would be much better to install the key for the repo)
sudo yum install -y devtoolset-8 --nogpgcheck
Finally enable the scl for devtoolset-8:
scl enable devtoolset-8 bash
Running this command shows both the gcc 7 and gcc 8 in the path:
which -a gcc
Output from which -a gcc
/opt/rh/devtoolset-8/root/usr/bin/gcc
/usr/bin/gcc
I am new to kali linux and I try to find my way around it.. I have managed to install vmware workstation 12.1.1 but when I try to run it I get this error
A compatible version of gcc was not found. GNU C Compiler (gcc) version 5.4.0 was not found
I have the gcc 6.1.1 installed and spent 3 days trying to fix this with no result.. Any help?
Edit: I added another answer, that procedure worked for me.
Try running this:
sudo aptitude install gcc-4.3 make linux-headers-`uname -r` -y
and
sudo aptitude install libglib2.0-0
Did you fix it before i could respond? If you did, how did you?
Finally I found the solution here.
Upgrade Kali to the Latest Which is 4.8.0-kali1-amd64
apt upgrade
cd /usr/lib/vmware/modules/source
tar xf vmmon.tar
tar xf vmnet.tar
cd vmmon-only
make
cd ../vmnet
make
cd ..
mkdir /lib/modules/`uname -r`/misc
cp vmmon.o /lib/modules/`uname -r`/misc/vmmon.ko
cp vmnet.o /lib/modules/`uname -r`/misc/vmnet.ko
depmod -a
/etc/init.d/vmware restart
I'm also hope that its will be helpful for someone.
This worked for me.
Remove gcc and add if you don't have the following lines to /etc/apt/sources.list
deb http://http.kali.org/kali kali-rolling main contrib non-free
deb http://old.kali.org/kali sana main non-free contrib
deb http://old.kali.org/kali moto main non-free contrib
Then:
apt-get update
apt-get dist-update
Now install gcc-5
sudo apt-get install gcc-5
And the headers.
But remember: linux-headers-(Put here the output of uname -r)
apt-get install build-essential linux-headers-4.8.0-kali2-amd64
I'm using gcc to compile files in Debian terminal,
but I get back : zsh: command not found: gcc
So I've tried sudo apt-get install gcc.
> The following packages have unmet dependencies:
> gcc :
> Depends:gcc-4.7(>=4.7.2-1~) but it is not going to be installed
> Recommends: libc6-dev but it is not going to be installed or libc-dev
Try installing GCC and its dependencies with this package:
sudo apt-get install build-essential
Run the following command:
aptitude -f install
Then install build-essantial it will install all the dev-tools:
aptitude install build-essential
I am trying to compile some c++11 code on ubuntu 12.04. After invoking my makefile I got
cc1plus: error: unrecognized command line option ‘-std=c++11’
Ubuntu gcc 4.7. Fine, so I ran
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.7
Ran it again, and still the same problem. Great.So then I tried changing the symlink of gcc from gcc4.6 to 4.7. After doing this, it then went and complained about not being able to find g++. So I then ran
sudo apt-get update
sudo apt-get install build-essential
Still no luck. When I typed g++, I just got
The program 'g++' can be found in the following packages:
*g++
*pentium_builder
Try: sudo apt-get install <selected package>
So I then tried
sudo apt-get install pentium_builder
Now I get
Unable to exec g++.real: No such file or directory
How I can compile c++11 code?
Last time I tried, the following worked for me for installing and setting g++ 4.8 as default:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
sudo apt-get install g++-4.8
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50
It seemed painless, and I was able to choose which gcc/g++ version to use without manually setting up symlinks. I suspect this would work for gcc 4.7 as well.
Add the following to your Makefile:
PROJECT_CFLAGS = -std=c++0x