|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
CMake problem
Code:
$cmake ../sdcv-0.5.0-beta2-Source $ ls CMakeCache.txt CPackConfig.cmake Makefile config.h CMakeFiles CPackSourceConfig.cmake cmake_install.cmake $make [ 12%] Building CXX object CMakeFiles/sdcv.dir/src/sdcv.cpp.o cc1plus: error: unrecognized command line option "-std=c++11" *** Error 1 in . (CMakeFiles/sdcv.dir/build.make:59 'CMakeFiles/sdcv.dir/src/sdcv.cpp.o': /usr/bin/c++ -DHAVE_CONFIG_H -DVERSION=\"0.5.0-b...) *** Error 1 in . (CMakeFiles/Makefile2:95 'CMakeFiles/sdcv.dir/all') *** Error 1 in /home/sw2wolf/test/tmp (Makefile:137 'all') |
|
||||
The first error message indicates you are not using the correct compiler.
Quote:
This description happens to be from -current: Code:
$ pkg_info g++ Information for http://mirrors.gigenet.com/pub/OpenBSD/snapshots/packages/i386/g++-4.8.4.tgz Comment: GNU compiler collection: C++ compiler Description: The GNU Compiler Collection (GCC) includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, as well as libraries for these languages (libstdc++, libgcj,...). GCC development is a part of the GNU Project and uses an open development environment. Its supports many other platforms in order to foster a world-class optimizing compiler, to attract a larger team of developers, to ensure that GCC and the GNU system work on multiple architectures and diverse environments, and to more thoroughly test and extend the features of GCC. This package contains the C++ compiler. Maintainer: Pascal Stumpf <redacted> WWW: http://gcc.gnu.org/ Information for http://mirrors.gigenet.com/pub/OpenBSD/snapshots/packages/i386/g++-4.9.2p0.tgz Comment: GNU compiler collection: C++ compiler Description: The GNU Compiler Collection (GCC) includes front ends for C, C++, Objective-C, Fortran, Java, and Ada, as well as libraries for these languages (libstdc++, libgcj,...). GCC development is a part of the GNU Project and uses an open development environment. Its supports many other platforms in order to foster a world-class optimizing compiler, to attract a larger team of developers, to ensure that GCC and the GNU system work on multiple architectures and diverse environments, and to more thoroughly test and extend the features of GCC. This package contains the C++ compiler. Maintainer: Pascal Stumpf <redacted> WWW: http://gcc.gnu.org/ $ pkg_info -L g++ Information for http://mirrors.gigenet.com/pub/OpenBSD/snapshots/packages/i386/g++-4.8.4.tgz Files: /usr/local/bin/ec++ /usr/local/bin/eg++ /usr/local/bin/i386-unknown-openbsd5.7-ec++ /usr/local/bin/i386-unknown-openbsd5.7-eg++ /usr/local/include/c++/4.8.4/algorithm /usr/local/include/c++/4.8.4/array /usr/local/include/c++/4.8.4/atomic . . . Last edited by jggimi; 20th January 2015 at 06:09 PM. Reason: redacted $MAINTAINER Email |
|
|||
jggimi, thanks!
Code:
$pkg_info g++ Information for inst:g++-4.9.0p0 Comment: GNU compiler collection: C++ compiler ... Last edited by sw2wolf; 21st January 2015 at 12:36 AM. |
|
|||
If you're just compiling stuff on your own, you can do this:
Code:
$ CC=egcc CXX=eg++ cmake .. Code:
$ CC=egcc CXX=eg++ cmake -G Ninja .. Code:
$ ninja -v Code:
$ cmake -G Ninja -DCMAKE_C_COMPILER=egcc -DCMAKE_CXX_COMPILER=eg++ .. |
|
|||
hi, ibara
Code:
~/test/tmp $ CC=egcc CXX=eg++ cmake ../sdcv-0.5.0-beta2-Source/ -- REQUIRED_VARS -- Configuring done -- Generating done -- Build files have been written to: /home/sw2wolf/test/tmp ~/test/tmp $ make [ 12%] Building CXX object CMakeFiles/sdcv.dir/src/sdcv.cpp.o cc1plus: error: unrecognized command line option "-std=c++11" *** Error 1 in . (CMakeFiles/sdcv.dir/build.make:59 'CMakeFiles/sdcv.dir/src/sdcv.cpp.o': /usr/bin/c++ -DHAVE_CONFIG_H -DVERSION=\"0.5.0-b...) *** Error 1 in . (CMakeFiles/Makefile2:95 'CMakeFiles/sdcv.dir/all') *** Error 1 in /home/sw2wolf/test/tmp (Makefile:137 'all') |
|
|||
It's still trying to use the in-base c++ (note the /usr/bin/c++ in your output). (Did you install g++-4.8?)
What are you trying to compile? If I can look at it I can probably get a better feel for it. |
|
|||
Quote:
Regards! |
|
|||
Yup it looks like you didn't install g++-4.8
Code:
# pkg_add g++ I found this to work: Code:
$ tar xvjf sdcv-0.5.0-beta2-Source.tar.bz2 $ cd sdcv-0.5.0-beta2-Source $ mkdir -p build $ cd build $ CXX=eg++ CXXFLAGS='-O2 -pipe -pthread' LDFLAGS=-lncurses cmake -G Ninja .. $ ninja -v Last edited by ibara; 21st January 2015 at 06:26 AM. Reason: Typos are cool. All the cool kids are doing it. |
|
|||
It works like a charm, thanks!
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Boot problem. Geometry problem? | gulanito | FreeBSD Installation and Upgrading | 0 | 3rd July 2009 03:03 AM |