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.

After using "sh ./configure" command, I encountered another error during lbflow package installation (a scientific one).

The sequence of operations is here with error:

./configure --disable-gts

sudo make

[sudo] password for alireza:
make all-recursive
make[1]: Entering directory `/home/alireza/lbflow-1.1'
Making all in src
make[2]: Entering directory `/home/alireza/lbflow-1.1/src'
source='lbflow.cpp' object='lbflow-lbflow.o' libtool=no \
DEPDIR=.deps depmode=none /bin/bash ../depcomp \
g++ -DHAVE_CONFIG_H -I. -I. -I.. -c -o lbflow-lbflow.o `test -f 'lbflow.cpp' || echo    './'`lbflow.cpp
**../depcomp: line 432: exec: g++: not found**
**make[2]: *** [lbflow-lbflow.o] Error 127
make[2]: Leaving directory `/home/alireza/lbflow-1.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/alireza/lbflow-1.1'
make: *** [all] Error 2**

Do you have any idea to troubleshoot this problem?

(And please notice that i have installed both g++ and gcc. it says g++: not found, but i have installed g++ from Ubuntu Software Center!)

share|improve this question
    
Before trying to troubleshoot this, based on your previous thread I strongly suggest you delete the folder and unpack it again from the tar.gz file in your /home directory - it is possible other file permissions got messed up when you originally unpacked it on an external drive and then moved it. –  steeldriver Oct 17 '13 at 21:17
    
Please include a link to the piece of software in your question. Then we (including myself) can try to build the software as well to see what the problem might be. –  gertvdijk Oct 17 '13 at 21:20
    
Can you please add the output of sed -n -e 432p ../depcomp and which g++. –  chaos Oct 17 '13 at 21:24
    
@steeldriver i did it. the ./configure worked this time, but the make error is still present. –  Ali.A Oct 17 '13 at 21:26
    
@gertvdijk Here's the package: forums.fedoraforum.org/… –  Ali.A Oct 17 '13 at 21:28

1 Answer 1

up vote 1 down vote accepted

Check if g++ is installed with dpkg --list | grep g++. In my case:

ii  g++                                       4:4.6.3-1ubuntu5                                    GNU C++ compiler
ii  g++-4.6                                   4.6.3-1ubuntu5                                      GNU C++ compiler

ii stands for installed. Then check with which g++, it should output something like this:

/usr/bin/g++

If the which command outputs nothing it is not installed or the patch where the binary is stored is not in your $PATH variable.

To install g++ compiler:

sudo apt-get install build-essential 

Finally the last check whould be g++ --version, in my case:

g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If that all works everything is fine with your compiler. After g++ is installed and available retry your ./configure and make commands. Let me know if it works.

EDIT Compilation errors:

So I got it. I organized the package you try to compile form another forum and compiled it myself. The problem is, gcc has cleaned up header dependencies, so with a gcc version >=4.3 some code isn't compiling anymore. See http://gcc.gnu.org/gcc-4.3/porting_to.html for what to include to avoid compile errors. In your folder where you executed the ./configure and make command, open the file src/parser.h file and add this lines to the include statements at line 15 under #include <iostream>:

#include <iostream>
#include <sys/types.h>
#include <stdio.h>
#include <cstdlib>
#include <algorithm>

Then the run the make command again. It should not fail. In my test is was a success.

share|improve this answer
    
Thanx for your reply. the 'code' dpkg --list | grep g++ 'code' returns: 'code' ii g++-4.6 4.6.3-1ubuntu5 GNU C++ compiler 'code' The 'code' which g++ 'code' did not return any outputs. so i used the 'code' sudo apt-get install build-essential 'code' command. Yes. it installed the compiler. But i still encounter the error. –  Ali.A Oct 17 '13 at 21:59
    
If the error exec: g++: not found still encounters then your compiler isn't installed correctly yet. What's the output of the last check g++ --version? –  chaos Oct 17 '13 at 22:13
    
then what should i do now? g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. –  Ali.A Oct 17 '13 at 22:16
    
Sorry i didn't notice that exec: g++: not found message perished. But this is the error which is now appered: make all-recursive make[1]: Entering directory /home/alireza/lbflow-1.1' Making all in src make[2]: Entering directory /home/alireza/lbflow-1.1/src' if g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT lbflow-lbflow.o -MD -MP -MF ".deps/lbflow-lbflow.Tpo" -c -o lbflow-lbflow.o test -f 'lbflow.cpp' || echo './'lbflow.cpp; \ then mv -f ".deps/lbflow-lbflow.Tpo" ".deps/lbflow-lbflow.Po"; else rm -f ".deps/lbflow-lbflow.Tpo"; exit 1; fi –  Ali.A Oct 17 '13 at 22:23
    
...continued In file included from lbflow.cpp:27:0: parser.h:67:5: error: ‘uint’ does not name a type make[2]: *** [lbflow-lbflow.o] Error 1 make[2]: Leaving directory /home/alireza/lbflow-1.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory /home/alireza/lbflow-1.1' make: *** [all] Error 2 –  Ali.A Oct 17 '13 at 22:24

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.