Your C++ compiler does NOT fully support C++17 - vim

Searching Python 3.6 libraries...
Found Python library: /home/luan/anaconda3/envs/za/lib/libpython3.6m.so
Found Python headers folder: /home/luan/anaconda3/envs/za/include/python3.6m
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:232 (message):
**Your C++ compiler does NOT fully support C++17.**
-- Configuring incomplete, errors occurred!
See also "/tmp/ycm_build_6b5ro8ju/CMakeFiles/CMakeOutput.log".
ERROR: the build failed.
NOTE: it is *highly* unlikely that this is a bug but rather
that this is a problem with the configuration of your system
or a missing dependency. Please carefully read CONTRIBUTING.md
and if you're sure that it is a bug, please raise an issue on the
issue tracker, including the entire output of this script
and the invocation line used to run it.

My solution: Install G++-8 (follow this answer https://askubuntu.com/a/1028656/987517)
sudo apt-get install g++-8
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 700 --slave /usr/bin/g++ g++ /usr/bin/g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8

As an alternative to setting gcc-8 as the default compiler as done in the accepted answer you can also pass environment variables to the installation command of YouCompleteMe, like so:
CC=gcc-8 CXX=g++-8 python3 ./install.py
Then you don't need to update the default gcc, if that is not wanted.

If you're using centos, you should install devtoolset-8
see Developer Toolset 8
sudo yum install centos-release-scl
sudo yum-config-manager --enable rhel-server-rhscl-7-rpms
sudo yum install devtoolset-8
scl enable devtoolset-8 bash

If you happen to be using gcc installed using Homebrew, the steps are slightly different:
> brew install gcc#8
> brew unlink gcc
> brew link gcc#8
(Homebrew has other versions of gcc, you can run brew search gcc to see them all.)
Note that, even if the gcc in your PATH points to your system gcc (e.g., /usr/bin/gcc), a setup/install/make script running in a different environment may still be seeing your Homebrew version of gcc. This is what happened to me, and the steps in #Luan Pham's answer didn't work as a result!

Related

Binaries are not executing after AFL installation in qemu mode

I have recently installed AFL and then its qemu mode, for which I required following packages.
'sudo apt-get install libtool automake bison libglib2.0-dev zlib1g-dev'
With these packages installed qemu installation worked fine. But after its installation whenever I tried to run binary with it, it generated AFL FORK SERVER HANDSHAKE FAILED error. I run my binary independently and it generated this error
cannot execute binary file: Exec format error.
I searched and found out this error is because of conflicting architectures which isn't in my case as I have build and run on same machine. Compiling with libtool also hasnot been a success libtool --mode=compile gcc -c one.c -o testlib.o.
I am also unable to execute any binary I create as default permissions are -rw-rw-r--, so I have to change their mods after creating them. This was not happening before above packages and installations. I even un-installed libtool but no success.
Any suggestions?
This has nothing to do with the libtool installation. I was making a silly mistake by using gcc -c test.c -o test.o which was not performing linking, see this. All I did is use command gcc test.c -o test.o and everything worked fine.

Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler

I'm running Ubuntu 16.10 in my laptop;
I have recently downloaded Linux kernel from git, but when I am trying to compile it with a make command from the terminal.
It is giving me
"error:Cannot use CONFIG_CC_STACKPROTECTOR_STRONG:
-fstack-protector-strong not supported by compiler"
What should I do to resolve this problem?
See this thread and this answer: this error could be the result of multiple gcc versions alternatives.
See "What exactly does update-alternatives do?"
Clear them out:
$ sudo update-alternatives --remove-all gcc
$ sudo update-alternatives --remove-all g++
Then re-install them, and make sure your gcc and g++ reference the same version.
sudo update-alternatives --config gcc
sudo update-alternatives --config g++
Note (March 2017): doug65536 mentions in the comments another case:
I found a solution to the issue with my nvidia driver package.
I had installed a custom build of binutils for a gdb patch.
Forcing it to reinstall binutils resolved the issue. It makes no sense, but it worked.

Autoconf installed but doesn't work (ubuntu)

I'm trying to install GNU automake. When running ./configure I get the following error message in the terminal:
checking whether autoconf is installed... yes
checking whether autoconf works... no
configure: error: The installed version of autoconf does not work.
Please check config.log for error messages before this one
Looking at the config.log I can't figure out where the problem is. My guess it that it's with tex but I'm not sure what program that is even referring to. I installed TexStudio and that didn't resolve it.
The log file is pasted below:
configure:2784: checking for tex
configure:2814: result: no
configure:2822: --version </dev/null
./configure: line 2823: --version: command not found
configure:2825: $? = 127
configure:2843: checking for yacc
configure:2859: found /usr/local/bin/yacc
configure:2870: result: yacc
configure:2886: checking for lex
configure:2916: result: no
configure:2886: checking for flex
configure:2902: found /usr/local/bin/flex
configure:2913: result: flex
configure:2934: checking whether autoconf is installed
configure:2939: autoconf --version
Autoconf version 2.10
configure:2942: $? = 0
configure:2950: result: yes
configure:2957: checking whether autoconf works
configure:2964: cd conftest && autoconf -o /dev/null conftest.ac
Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir]
[-l dir] [--localdir=dir] [--version] [template-file]
configure:2967: $? = 1
configure:2976: result: no
configure:2979: error: The installed version of autoconf does not work.
Please check config.log for error messages before this one.
As Diego said, if you install autoconf from the repositories it will install the version 2.68. For some reason, you might have the version 2.13 installed.
If it is the case remove the old version and install the default version:
sudo apt-get remove autoconf2.13 && sudo apt-get install autoconf
Autoconf 2.1 is very old and has significantly different semantics from the current version (2.69, called the "2.5 series".)
Ubuntu appears to have separate packages for autoconf 2.1 and 2.6x but I'm not sure how they select across the two.

Install libgd 2.1.1 (final) on rhel using cmake?

Hoping someone might have seen this or be able to help me reason it through.
I'm installing libgd 2.1.1 for mrtg on Centos/Rhel and see cmake files instead of configure and make files. The wiki and files show no hint of how to install and now I understand the basics of cmake, but still cannot install it correctly.
....yum is not an option to install php-gd
the farthest I've gotten is: cmake CMakeCache.txt with the results:
...The CXX compiler identification is unknown,
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not
found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Checking whether system has ANSI C header files
-- ANSI C header files - not found
-- Configuring incomplete, errors occurred!
Anyone have a thought how to satisify the compiler questions in cmake or a process that might work? Thanks for the help!
You will need to install a suitable development environment. On CentoS5/RHEL5 you can run
sudo yum groupinstall "Development Tools"
and possibly
sudo yum groupinstall "Development Libraries"

Error installing cuda module in Mac OS X 10.7.5 (checking whether the C compiler works… no)

I'm trying to install cuda package with cabal on Mac OS X 10.7.5.
The haskell was installed with haskell platform 64bit mac version. ghc version is 7.6.3, gcc version is 4.2.
>> cabal install cuda
Resolving dependencies...
[1 of 1] Compiling Main ( /var/folders/ng/h2hkycqd2q5g2hz42c47bt4w0000gn/T/cuda-0.5.1.1-59169/cuda-0.5.1.1/Setup.hs, /var/folders/ng/h2hkycqd2q5g2hz42c47bt4w0000gn/T/cuda-0.5.1.1-59169/cuda-0.5.1.1/dist/setup/Main.o )
Linking /var/folders/ng/h2hkycqd2q5g2hz42c47bt4w0000gn/T/cuda-0.5.1.1-59169/cuda-0.5.1.1/dist/setup/setup ...
Configuring cuda-0.5.1.1...
checking for gcc... cc -arch i386 /usr/bin/gcc
checking whether the C compiler works... no
configure: error: in `/private/var/folders/ng/h2hkycqd2q5g2hz42c47bt4w0000gn/T/cuda-0.5.1.1-59169/cuda-0.5.1.1':
configure: error: C compiler cannot create executables
See `config.log' for more details
Failed to install cuda-0.5.1.1
cabal: Error: some packages failed to install:
cuda-0.5.1.1 failed during the configure step. The exception was:
ExitFailure 77
It seems like that 32bit architecture of gcc is invoked when I installed 64 bit version of haskell.
What might be wrong?
I could use Install CUDA for Haskell using Autoconf on Win7 to solve the issue with Mac OS X.
Remove previous versions - sudo uninstall-hs all --remove
Install cuda sdk from https://developer.nvidia.com/cuda-downloads?sid=407404
download haskell cuda source http://hackage.haskell.org/package/cuda
Open Setup.hs
At line 56, modify the code to use clang - [("CC", "/usr/bin/clang")
Or you can setup any c/c++ compiler "/opt/local/bin/gcc-mp-4.8".
Then run the runhaskell:
> cabal install
Or, you can execute these three commands:
>runhaskell Setup.hs configure
>runhaskell Setup.hs build
>runhaskell Setup.hs install

Resources