I just set up a Ubuntu.
I'm trying to turn the yolo of darknet. and I've got this error.
/usr/local/cuda/include/crt/host_config.h:138:2: error: #error -- unsupported GNU version! gcc versions later than 8 are not supported!
138 | #error -- unsupported GNU version! gcc versions later than 8 are not supported!
Even I tried
sudo apt install gcc-4.9 g++-4.9
I got
Package g++-4.9 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gcc-4.9' has no installation candidate
E: Package 'g++-4.9' has no installation candidate
It seems that the version error occurs by downloading the recent version.
Do you know how to downgrade the gcc version?
I solved it!
The Python version control was the cause.
It was resolved by re-establishing and reinstalling the paths of the packages.
Related
When I tried to build gem5 with command scons build/X86/gem5.opt -j12, I received an error message saying
lto1: fatal error: bytecode stream in file '/home/beihai/anaconda3/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.a' generated with LTO version 6.0 instead of the expected 8.1
I think it might be the problem of wrong gcc version. But I do not know how to fix it.
My system is Kubuntu 20.04
By running gcc -v, I got the global gcc version gcc version 9.3.0
By running /home/beihai/anaconda/envs/gem5build/bin/x86_64-conda_cos6-linux-gnu-gcc -v, I got the anaconda gcc version gcc version 7.3.0 (crosstoll-NG 1.23.0.449-a04d0)
Please tell me how to fix this problem.
I came across almost the same issue, except that mine said "LTO version 6.0 instead of the expected 6.2".
I searched for general solution for LTO compatibility issue and got some inspiration from this link: https://github.com/rust-lang/rust/issues/57176
Quick take from the above link: "I've looked into how this is related to python and found that the error only happens with python installed through anaconda."
So I removed my entire anaconda software package, and removed the build directory inside Gem5, and rerun the scon commands with an additional "--force-lto" arguments, now the installation is successful. Hope it can solve your issue as well.
The command I used: "scons --force-lto build/X86/gem5.opt -j6"
My setups is:
Ubuntu 18 withe kernel 4.15.0-134-generic
g++ --version = g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
I have big trouble installing openpose from git repository.
I'm kinda beginner so I think problem is from me.
Github repository :
https://github.com/CMU-Perceptual-Computing-Lab/openpose
My system
Ubuntu 18.04.2 LTS
cmake 3.14.5
caffe 1.0.0
opencv : seems 2 versions are installed : 4.0.1-dev and 3.2.0.
I don't know if I can switch versions when installing openpose. when I run python3, then
import cv2
cv2.__version__
gives 4.0.1-dev
gcc 7.4.0
cudnn 7.1.2
cuda 9.1.85
gpu is Nvidia GP102 [titan X]
I'trying to follow installation instructions :
https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/doc/installation.md#installation
I had trouble using cmake GUI so insted I ran the following commands :
$ cmake -DCaffe_INCLUDE_DIRS=/usr/include -DCaffe_LIBS=/usr/lib/x86_64-linux-gnu/libcaffe.so -DBUILD_CAFE=OFF ..
$ cmake -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0 -DCUDA_NVCC_EXECUTABLE=/usr/local/cuda-8.0 -DCUDA_INCLUDE_DIRS=/usr/local/cuda-8.0 CUDA_CUDART_LIBRARY=/usr/local/cuda-8.0
then cmake told that that was correct.
Maybe installation wasn't correct since these steps.
Then step openpose building : I ran following commands :
$ cd build/
$ make -j`nproc`
got many errors like that :
In file included from /usr/include/host_config.h:50:0,
from /usr/include/cuda_runtime.h:78,
from <command-line>:0:
/usr/include/crt/host_config.h:121:2: error: #error -- unsupported GNU version! gcc versions later than 6 are not supported!
#error -- unsupported GNU version! gcc versions later than 6 are not supported!
gcc version is 7.4.0 so I ran make command again specifying older gcc versions, according to gcc versions installed :
$ make CC=gcc-6 CPP=g++-6 CXX=g++-6 LD=g++-6 -j`nproc`
then :
$ make CC=gcc-4.8 CPP=g++-4.8 CXX=g++-4.8 LD=g++-4.6 -j`nproc`
but got the same errors again.
I want to make the faster rcnn, I have a VM with UBUNTU 17.10 64bit.
I install CUDA8 and CuDNN 6 then CUDNN 5.
However, when I want to build the lib folder in faster project, I got this
error: /usr/local/cuda/include/host_config.h:119:2: error: #error --
unsupported GNU version! gcc versions later than 5 are not supported!
#error -- unsupported GNU version! gcc versions later than 5 are not supported! ^~~~~ error: command '/usr/local/cuda/bin/nvcc' failed
with exit status 1
Although the default gcc version is:
$ gcc --version
gcc-5 (Ubuntu 5.5.0-1ubuntu2) 5.4.1 20171010
This is to verify the CudNN version is 5:
$ cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 5
#define CUDNN_MINOR 1
#define CUDNN_PATCHLEVEL 10
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#include "driver_types.h"
CUDA version:
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
I tried some suggestion to install gcc 4.9 but it can't be downloaded!
$ sudo apt install gcc-4.9 g++-4.9
Package g++-4.9 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'gcc-4.9' has no installation candidate
E: Package 'g++-4.9' has no installation candidate
error: /usr/local/cuda/include/host_config.h:119:2: error: #error -- unsupported GNU version! gcc versions later than 5 are not supported!
There is a ABI standard change from gcc 5.0 to support C++11. I think if you want to use some feature of C++11, you'd better to find a new version for cuda as mentioned by #harlelf.
Package g++-4.9 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
This is an usual problem when using apt-get, you need add a PPA repository as followings.
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-4.9 g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
I'm starting to learn Haskell and I found out that ghc can compile using LLVM with the -fllvm flag. Whenever I use the flag, I get the error message:
<no location info>: error:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM 3.7
ghc: could not execute: opt
However, I have opt in my /usr/local/Cellar/llvm/3.9.0/ folder. I'm on a Mac OS X and I've installed the full LLVM with brew install llvm but error persists. Is this a genuine version problem where I have to unistall LLVM and reinstall its 3.7 version? Or is ghc having trouble finding opt and there is some kind of search path I can modify to fix the problem? Thanks for the help and have a great day.
The GHC documentation says that it's compatible with llvm-2.8+, but as you've discovered, it actually requires llvm-3.7.
The simplest way to get it is:
brew install llvm#3.7
This installs llvm binaries in your path with a -3.7 suffix, like clang-3.7. GHC will need the unadorned names, which are in a subdirectory:
export PATH=/usr/local/opt/llvm#3.7/lib/llvm-3.7/bin:$PATH
I have a Kubuntu 11.10 system with Eclipse-CDT Indigo. gcc-4.6 was installed along with Eclipse. I have since installed gcc-4.4 and gcc-4.2 via Ubuntu packages.
I can switch the /usr/bin/gcc symlink to 4.4 or 4.6 and Eclipse builds my code either way. However when I set the symlink to use gcc-4.2 I get the following error (and many more):
In file included from /usr/include/c++/4.2/cstring:52,
from /usr/include/c++/4.2/i486-linux-gnu/bits/c++locale.h:47,
from /usr/include/c++/4.2/iosfwd:45,
from /usr/include/c++/4.2/ios:43,
from /usr/include/c++/4.2/ostream:45,
from /usr/include/c++/4.2/iostream:45,
from ../ProjStructure.h:4,
from ../Scanner.h:3,
from ../Scanner.cpp:1:
/usr/include/string.h:29: error: ‘__BEGIN_DECLS’ does not name a type
So it appears that the string.h I have in /usr/include expects __BEGIN_DECLS to be defined by one of the compiler specific includes.
/usr/include/string.h comes from the libc6-dev package, which does not seem to have compiler specific versions. I expected the package system to handle this and install all the right versions of things.
I've read the GNU documents on multiple versions of GCC, but they don't say anything about include files/directories.
What am I doing wrong here?
From which Ubuntu is your gcc-4.2 package?
It is probably from an older Ubuntu release. New Ubuntu releases have changed some header and library directories, which break older compilers.