LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem with $PATH (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-%24path-358263/)

halfpower 08-29-2005 05:37 PM

Problem with $PATH
 
I'm trying to install a C library on a Debian machine. The instructions state that I first need to issue the command "./configure". This is what happens when I do:

Code:

halfpower@computer:~/libsndfile/libsndfile-1.0.11$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
halfpower@computer:~/libsndfile/libsndfile-1.0.11$

Note that my GCC is actually named gcc-3.3. DO I need to edit $PATH? If so how do I go about doing that?

bosewicht 08-29-2005 05:43 PM

type

apt-get install gcc

as su in a terminal. you can't compile and app if you don't have a compiler.

Edit: Did you install gcc? the check make failed as well. If you do have it installed i would try reinstalling it. You shouldn't have to add it to ur path

Dommy 08-30-2005 12:37 AM

Re: Problem with $PATH
 
Quote:

Originally posted by halfpower
I'm trying to install a C library on a Debian machine. The instructions state that I first need to issue the command "./configure". This is what happens when I do:

Code:

halfpower@computer:~/libsndfile/libsndfile-1.0.11$ ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
halfpower@computer:~/libsndfile/libsndfile-1.0.11$

Note that my GCC is actually named gcc-3.3. DO I need to edit $PATH? If so how do I go about doing that?

I'd say its looking for gcc not gcc-3.3 make a soft link (ln -s ) between gcc-3.3 and gcc and make sure your link winds up in /usr/bin. if you then type gcc you should get an error msg saying that there is no input file, you might also care to create a small C program and see if you can compile it.

You may also have a problem with make.

halfpower 08-30-2005 10:33 AM

I added the symbolic link, but now I seem to have a different error message (pasted at the end of this post). It looks like I may need to have a C++ compiler properly configured as well as it states at the end "configure: error: C++ preprocessor "/lib/cpp" fails sanity check." Does any one know how I can fix this?

Code:

computer:/home/halfpower/libsndfile/libsndfile-1.0.11# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... none
checking dependency style of gcc... none
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
computer:/home/halfpower/libsndfile/libsndfile-1.0.11#


bosewicht 08-30-2005 12:49 PM

You need to download the g++ compiler. A lot of distros assume that you're not going to need the full gcc suite.
make sure you have gcc, gcc-cpp, and gcc-c++ installed.
Also, occasionally if you do not have the kernel source installed, this error can occur. Take a look at config.log


gcc = C compiler
g++ = C++ compiler


All times are GMT -5. The time now is 05:35 PM.