Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to compile a program on Ubuntu 12.04 (LTS), but the following error keeps resulting:

evensteven@pc:~/Desktop/MimoComplexLdpc$ make all
cd ./src; make;
make[1]: Entering directory `/home/evensteven/Desktop/MimoComplexLdpc/src'
g++-3 -Wall -DMV_VECTOR_BOUNDS_CHECK -g '-DCOMPLEX=complex<double>' -include ostream.h     
-Wno-deprecated -fpermissive  -I../include -I../mv/include  -c compcol_double.cc
make[1]: g++-3: Command not found
make[1]: *** [compcol_double.o] Error 127
make[1]: Leaving directory `/home/evensteven/Desktop/MimoComplexLdpc/src'
make: *** [sp] Error 2

At first, I figured it wasn't finding the g++-3 compiler, so I looked, and saw that it was not installed. I went ahead and installed it, as seen below:

evensteven@pc:~$ dpkg -l | grep gcc
ii  gcc                                          4:4.6.3-1ubuntu5                                 GNU C compiler
ii  gcc-3.3                                      1:3.3.6-15ubuntu6                                The GNU C compiler
ii  gcc-3.3-base                                 1:3.3.6-15ubuntu6                                The GNU Compiler Collection (base package)
ii  gcc-3.4                                      3.4.6-6ubuntu5                                   The GNU C compiler
ii  gcc-3.4-base                                 3.4.6-6ubuntu5                                   The GNU Compiler Collection (base package)
ii  gcc-4.6                                      4.6.3-1ubuntu5                                   GNU C compiler
ii  gcc-4.6-base                                 4.6.3-1ubuntu5                                   GCC, the GNU Compiler Collection (base package)
ii  libgcc1                                      1:4.6.3-1ubuntu5                                 GCC support library
evensteven@pc:~$ dpkg -l | grep g++
ii  g++                                          4:4.6.3-1ubuntu5                                 GNU C++ compiler
ii  g++-3.3                                      1:3.3.6-15ubuntu6                                The GNU C++ compiler
ii  g++-3.4                                      3.4.6-6ubuntu5                                   The GNU C++ compiler
ii  g++-4.6                                      4.6.3-1ubuntu5                                   GNU C++ compiler

Even with these changes, the same error as above results. I took a look at the makefile.def file and saw that it was calling gcc-3 and g++-3 specifically:

# g++ v. 2.6.3
#
CCC             = g++-3
#CCC            = g++
CC              = gcc-3
#CC             = gcc   

Changing the makefile.def so that gcc-3 and g++-3 read gcc-3.3 and g++-3.3 (or gcc-3.4 or g++-3.4 for that matter), the following error occurs:

In file included from /usr/include/c++/3.3/iosfwd:48,
             from /usr/include/c++/3.3/ios:44,
             from /usr/include/c++/3.3/ostream:45,
             from /usr/include/c++/3.3/iostream:45,
             from /usr/include/c++/3.3/backward/iostream.h:32,
             from /usr/include/c++/3.3/backward/ostream.h:32,
             from <command line>:8:
/usr/include/c++/3.3/bits/stringfwd.h:54: error: syntax error before `<' token
/usr/include/c++/3.3/bits/stringfwd.h:58: error: explicit specialization in non-namespace scope `int toupper_l(...)'
/usr/lib/gcc-lib/i486-linux-gnu/3.3.6/include/stddef.h:151: confused by earlier errors, bailing out
make[1]: *** [compcol_double.o] Error 1
make[1]: Leaving directory `/home/evensteven/Desktop/MimoComplexLdpc/src'
make: *** [sp] Error 2

Any idea what may be causing these errors? Thank you in advanced for helping.

share|improve this question
    
Can you provide a link to what you are trying to compile? –  Salem Jul 18 '13 at 13:39
    
Unfortunately, I am trying to compile code that is part of proprietary software and cannot link to it. If it is of any help, the code does compile on Cygwin and run correctly. –  Even Steven Jul 19 '13 at 6:35
add comment

1 Answer

Try installing g++ from following command:

sudo apt-get install build-install g++

I was getting same kind of error when I was trying to installl Node.js

I installed g++ by above command.

And finally I was able to install the software

Hope this works. Comment if further help required.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.