LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   No compiler for LAMP (https://www.linuxquestions.org/questions/linux-newbie-8/no-compiler-for-lamp-526867/)

Degrader 02-08-2007 05:40 PM

No compiler for LAMP
 
I'm new to Linux and I am running a version LAMP from rPath.
I'm trying to install PHP5. When I run

./configure --with-mysql --with-apxs=/usr/sbin/apxs

I get this:

checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking host system type... i686-pc-linux-gnuoldld
checking target system type... i686-pc-linux-gnuoldld
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH


It looks as though there is no compiler installed. So I downloaded gcc-4.0.4.tar untar'd it and once again I get the same error.

Is there a compiler I can install without compiling or a way to install php without the compiler?

Thanks for any help.

Emerson 02-08-2007 06:12 PM

Welcome to LQ!

You are trying to do it hard way. Every distro has some sort of package management for upgrading and installing new software. Tell us what distro you are using and our experts here will kick in and advise you.

unSpawn 02-08-2007 06:56 PM

Quote:

Tell us what distro you are using and our experts here will kick in and advise you.
He says he's using rPath. Package manager is Conary, read all about it.

Degrader 02-09-2007 10:44 AM

AWESOME! Thanks I was able to download the gcc compiler using some conary update commands. But they do not seem to have a php5 update. So I thought I would go back to my orginal plan. Now I'm having some configuration problems with gcc I get this:

loading cache ./config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking for gcc... gcc
checking whether the C compiler (gcc ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.


I'm not sure what I need to change to make this work. I'm going to keep looking for this on google and see what I can find. Thanks again!

unSpawn 02-09-2007 11:46 AM

Look in config.log?

wpn146 02-09-2007 02:11 PM

"configure" tests for a working compiler by compiling and executing a small "c" program. You can test this yourself by writing a small "hello" program and getting it to produce an executable that says "hello" when executed. You will probably see messages that will point you at what is missing.

What are you using for an Assembler? gcc produces assembly code and internally invokes the assembler to produce the object code, which then invokes the linker "ld" to take the object code and produce the executable. You need the whole chain.

Degrader 02-09-2007 03:21 PM

I'm not sure how to tell the type of Assembler. But I did write a quick "hello" program called test.c:

#include <stdio.h>
void main()
{
printf("Hello world\n");
}

test.c:1:20: stdio.h: No such file or directory
test.c: In function `main':
test.c:3: warning: return type of 'main' is not `int'

It looks like it can't find the libraries. Also is there some sort of linking or make file I have to run after I dowmload it from rPath with "conary update gcc"?

Any ideas?

wpn146 02-09-2007 04:54 PM

It looks like your include directory is missing or not in its expected location.
Code:

test.c:1:20: stdio.h: No such file or directory
test.c: In function `main':
test.c:3: warning: return type of 'main' is not `int'

The last two lines above are not important.

Degrader 02-09-2007 05:36 PM

My include directory is located in /usr/include however my stdio.h is located in /usr/include/isc
does gcc navigate through the files or do I need to the path? Also I'm not sure what the default path is.
When I run this:
gcc test.c -o test -I /usr/include/isc
I get

In file included from /usr/lib/gcc/i386-unknown-linux/3.4.4/include/syslimits.h:7,
from /usr/lib/gcc/i386-unknown-linux/3.4.4/include/limits.h:11,
from /usr/include/isc/offset.h:26,
from /usr/include/isc/types.h:27,
from /usr/include/isc/result.h:24,
from /usr/include/isc/stdio.h:26,
from test.c:1:
/usr/lib/gcc/i386-unknown-linux/3.4.4/include/limits.h:122:61: limits.h: No such file or directory
In file included from /usr/include/isc/types.h:27,
from /usr/include/isc/result.h:24,
from /usr/include/isc/stdio.h:26,
from test.c:1:
/usr/include/isc/offset.h:27:23: sys/types.h: No such file or directory
In file included from /usr/include/isc/types.h:27,
from /usr/include/isc/result.h:24,
from /usr/include/isc/stdio.h:26,
from test.c:1:
/usr/include/isc/offset.h:29: error: parse error before "isc_offset_t"
In file included from test.c:1:
/usr/include/isc/stdio.h:31: error: parse error before "FILE"
/usr/include/isc/stdio.h:34: error: parse error before '*' token
/usr/include/isc/stdio.h:37: error: parse error before '*' token
/usr/include/isc/stdio.h:40: error: parse error before "size_t"
/usr/include/isc/stdio.h:44: error: parse error before "size_t"
/usr/include/isc/stdio.h:48: error: parse error before '*' token
/usr/include/isc/stdio.h:58: error: parse error before '*' token
test.c: In function `main':
test.c:4: warning: return type of 'main' is not `int'


Which i think is a step in the right direction. Thanks again for the help!


All times are GMT -5. The time now is 01:07 AM.