LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-08-2007, 06:40 PM   #1
Degrader
LQ Newbie
 
Registered: Feb 2007
Posts: 4

Rep: Reputation: 0
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.
 
Old 02-08-2007, 07:12 PM   #2
Emerson
LQ Guru
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~arch
Posts: 5,872

Rep: Reputation: Disabled
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.
 
Old 02-08-2007, 07:56 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
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.
 
Old 02-09-2007, 11:44 AM   #4
Degrader
LQ Newbie
 
Registered: Feb 2007
Posts: 4

Original Poster
Rep: Reputation: 0
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!
 
Old 02-09-2007, 12:46 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,332
Blog Entries: 55

Rep: Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533Reputation: 3533
Look in config.log?
 
Old 02-09-2007, 03:11 PM   #6
wpn146
Member
 
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170

Rep: Reputation: 30
"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.
 
Old 02-09-2007, 04:21 PM   #7
Degrader
LQ Newbie
 
Registered: Feb 2007
Posts: 4

Original Poster
Rep: Reputation: 0
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?
 
Old 02-09-2007, 05:54 PM   #8
wpn146
Member
 
Registered: Jan 2005
Distribution: Solaris, Linux Fedora Core 6
Posts: 170

Rep: Reputation: 30
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.
 
Old 02-09-2007, 06:36 PM   #9
Degrader
LQ Newbie
 
Registered: Feb 2007
Posts: 4

Original Poster
Rep: Reputation: 0
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!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
checking for C compiler default output... configure: error: C compiler cannot create fiorejm Linux - Software 6 11-12-2009 01:35 PM
LXer: LAMP vs. LAMP Rematch LXer Syndicated Linux News 0 11-08-2006 04:03 AM
LXer: LAMP vs. LAMP LXer Syndicated Linux News 0 08-23-2006 12:33 AM
v9.2 Trying to get lamp going boardtc Mandriva 4 03-21-2005 09:05 PM
Compiler conundrum: Which came first, a compiler, or it's source code? fr0zen Programming 21 01-29-2004 05:31 AM


All times are GMT -5. The time now is 09:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration