Operating System - Linux
1822728 Members
3745 Online
109644 Solutions
New Discussion юеВ

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

 
SOLVED
Go to solution
monu_1
Regular Advisor

configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

Dear Mastero,

I want to install mysql-4.0.27.tar.gz on my fedora core 1.

But after when i buid configure as follow

./configure --prefix=/usr/local/mysql --enable-large-files --enable-shared=yes --with-readline

i get an error at the end

configure: error: no acceptable C compiler found in $PATH


I have also check above rpm as

rpm -qa | grep gcc* and it gives result as-

libgcc -3.3.2-1
libgcj-3.3.2-1
gconf-editor-2.4.0-1


but problem is still there(configure: error: no acceptable C compiler found in $PATH )

what should i do? is that my compiler is not supporting ?

Plz advice me soom i m waiting.

Thanks in Advance.

Manoj K Sharma


18 REPLIES 18
Wouter Jagers
Honored Contributor
Solution

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

There doesn't seem to be a gcc compiler in your list. (libgcc = shared support library)

Try installing gcc-3.3.2-1.i386.rpm.

Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
monu_1
Regular Advisor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

thanks,

But hoe to install above rpm plz suggest.
i haven't got actual location of abve rpm

Regards,
MKS
Wouter Jagers
Honored Contributor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

http://rpm.pbone.net is a nice site for searching RPMs :-)

Check this link:
http://rpm.pbone.net/index.php3?stat=26&dist=31&size=3719822&name=gcc-3.3.2-1.i386.rpm

Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
monu_1
Regular Advisor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

Thanks,

I have installed gcc-3.4.6 in path /usr/local/gcc-3.4.6/gcc

but problem is still there.I m totally confused.
But i think there is problem of setting of environment path for gcc.if it is then how to do it.

Plz suggest if any other issues.

Regards,
MKS
Wouter Jagers
Honored Contributor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

The following command checks whether gcc is in your PATH:
# whereis gcc

Not there ? Try and add the location of your gcc to your PATH variable like this:
# export PATH=$PATH:/usr/local/gcc-3.4.6

Cheers,
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
monu_1
Regular Advisor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

but i have done as u said setting path

whereas whereis gcc response me
gcc:

and nothing

I want run gcc from my shell prompt but its still answering command not found.

is there configuration process for gcc compiler??

i wanna output from $ gcc -v but still sayning command not found.

Plz suggest how to configure gcc


regards
MKS

Wouter Jagers
Honored Contributor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

This command should show whether or not your gcc has been properly installed:
# rpm -qa | grep gcc

This one should tell you which files were installed by the package:
# rpm -ql

This one looks for a file named 'gcc' on your machine:
# find / -type f -name gcc -print

What do these teach us ?

Cheers,
Wout

(no need to keep assigning points, by the way. But who am I to complain :-))
an engineer's aim in a discussion is not to persuade, but to clarify.
monu_1
Regular Advisor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

Thanks Wout,

According to yr given command i got below

# rpm -qa | grep gcc
libgcc-3.3.2-1

# rpm -ql libgcc-3.3.2-1
/lib/libgcc_s-3.3.2-20031023.so.1
/lib/libgcc_s.so.1
/usr/sbin/libgcc_post_upgrade

# find / -type f -name gcc -print
nothing print

Sorry for delay.I was not able go further coz of eve

Plz suggest what to do next!!!!

Regards,
MKS
Wouter Jagers
Honored Contributor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

Looks like you still have only the libgcc -3.3.2-1 and not the gcc one..

Try getting the gcc-3.3.2-1.i386.rpm mentioned above and install it like this:

# rpm -Uvh gcc-3.3.2-1.i386.rpm

It should then tell you it's installed the rpm, and then the 'rpm -qa | grep gcc' should return both the libgcc and the gcc.

Try that.

Also, do you really need to compile mysql from scratch ? The binary distributions of mysql are quite good, I use one as well :-)

Cheers
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
monu_1
Regular Advisor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

Hi Wout,
Thanks for quick reply.

But as per yr suggetion i have getting following dependencies error on installing rpm package

# rpm -Uvh gcc-3.3.2-1.i386.rpm
warning: gcc-3.3.2-1.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
error: Failed dependencies:
binutils >= 2.14.90.0.4-4 is needed by gcc-3.3.2-1
glibc-devel >= 2.2.90-12 is needed by gcc-3.3.2-1

problem always wid me :(
monu_1
Regular Advisor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

:-) i have solve the problem gcc but now another one problem standing in front to me

/configure --prefix=/usr/local/mysql --enable-large-files --enable-shared=yes --with-readline
checking build system type... i686-pc-linux-gnuoldld
checking host system type... i686-pc-linux-gnuoldld
checking target system type... i686-pc-linux-gnuoldld
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)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for gcc... gcc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.


what shb we do? plz help!!!
Wouter Jagers
Honored Contributor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

From http://www.geektimes.com/linux/troubleshooting/c-cant-create-executables.html :

"I solved this by installing the kernel-headers and glibc-devel packages with the Red Hat Package Manager, RPM."

cheers
an engineer's aim in a discussion is not to persuade, but to clarify.
monu_1
Regular Advisor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

Thanks Wout,

I have install both the packages.
#rpm -qa | grep glibc
glibc-devel-2.3.2-101
glibc-common-2.3.2-101
glibc-headers-2.3.2-101
glibc-2.3.2-101

#rpm -qa | grep kernel
kernel-utils-2.4-9.1.101.fedora
kernel-smp-2.4.22-1.2115.nptl
kernel-pcmcia-cs-3.1.31-13
kernel-2.4.22-1.2115.nptl
kernel-headers-2.4.18-2

but problem is still on ./configure
checking for C compiler default output filename.....configure: error: C compiler cannot create executables

Plz help if other ne remaining .

Regards,
MKS

Wouter Jagers
Honored Contributor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

Hmmz.. too bad I don't have a similar system here at the moment, that would make things easier. (I might install one in a vmware if your issues persist)

Could you check the permissions on the directory ? Which user are you compiling as, and does he have writing rights in the directory ?

Cheers
an engineer's aim in a discussion is not to persuade, but to clarify.
monu_1
Regular Advisor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

Hi wout!! Thanks for still wid me

I want to know about below.I think problem starting here.
1)gcc directory is /usr/local/
[root gcc-3.4.6]# ./configure
loading cache ./config.cache
checking host system type... i686-pc-linux-gnuoldld
checking target system type... i686-pc-linux-gnuoldld
checking build system type... i686-pc-linux-gnuoldld
checking for a BSD compatible install... /usr/bin/install -c
gcc: installation problem, cannot exec `as': No such file or directory
*** The command 'gcc -o conftest -O2 conftest.c' failed.
*** You must set the environment variable CC to a working compiler.
I wanna remove last two error of above output.How can i remove it?

Bregds,
MKS

Wouter Jagers
Honored Contributor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

Do you have the binutils package installed ?
an engineer's aim in a discussion is not to persuade, but to clarify.
monu_1
Regular Advisor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

Hi Wout,

Thanks u very very much :-)

As per yr suggetion I installed binutils package and then

[root@ mysql-4.0.27]#./configure --prefix=/usr/local/mysql --enable-large-files --enable-shared=yes --with-readline

and it run till the end and last line was

Thank you for choosing MySQL!

then i run
[root@ mysql-4.0.27]#make

make all-recursive
make[1]: Entering directory `/usr/local/mysql-4.0.27'
Making all in .
make[2]: Entering directory `/usr/local/mysql-4.0.27'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/usr/local/mysql-4.0.27'
Making all in include
make[2]: Entering directory `/usr/local/mysql-4.0.27/include'
make all-am
make[3]: Entering directory `/usr/local/mysql-4.0.27/include'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/usr/local/mysql-4.0.27/include'
make[2]: Leaving directory `/usr/local/mysql-4.0.27/include'
Making all in Docs
make[2]: Entering directory `/usr/local/mysql-4.0.27/Docs'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/mysql-4.0.27/Docs'
Making all in readline
make[2]: Entering directory `/usr/local/mysql-4.0.27/readline'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/local/mysql-4.0.27/readline'
Making all in pstack
make[2]: Entering directory `/usr/local/mysql-4.0.27/pstack'
Making all in aout
make[3]: Entering directory `/usr/local/mysql-4.0.27/pstack/aout'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/usr/local/mysql-4.0.27/pstack/aout'
make[3]: Entering directory `/usr/local/mysql-4.0.27/pstack'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/usr/local/mysql-4.0.27/pstack'
make[2]: Leaving directory `/usr/local/mysql-4.0.27/pstack'
Making all in libmysql
make[2]: Entering directory `/usr/local/mysql-4.0.27/libmysql'
if /bin/sh ../libtool --preserve-dup-deps --tag=CC --mode=compile gcc -DDEFAULT_CHARSET_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/var\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DUNDEF_THREADS_HACK -DDONT_USE_RAID -DMYSQL_CLIENT -I. -I. -I.. -I./../include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -MT libmysql.lo -MD -MP -MF ".deps/libmysql.Tpo" -c -o libmysql.lo libmysql.c; \
then mv -f ".deps/libmysql.Tpo" ".deps/libmysql.Plo"; else rm -f ".deps/libmysql.Tpo"; exit 1; fi
gcc -DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\" -DDATADIR=\"/usr/local/mysql/var\" -DSHAREDIR=\"/usr/local/mysql/share/mysql\" -DUNDEF_THREADS_HACK -DDONT_USE_RAID -DMYSQL_CLIENT -I. -I. -I.. -I./../include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -MT libmysql.lo -MD -MP -MF .deps/libmysql.Tpo -c libmysql.c -fPIC -DPIC -o .libs/libmysql.o
libmysql.c: In function `mysql_real_connect':
libmysql.c:1862: warning: passing arg 5 of `gethostbyname_r' from incompatible pointer type
libmysql.c:1862: error: too few arguments to function `gethostbyname_r'
libmysql.c:1862: warning: assignment makes pointer from integer without a cast
make[2]: *** [libmysql.lo] Error 1
make[2]: Leaving directory `/usr/local/mysql-4.0.27/libmysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/mysql-4.0.27'
make: *** [all] Error 2


it show some error
then i run again

[root@ mysql-4.0.27]#make install
Making install in .
make[1]: Entering directory `/usr/local/mysql-4.0.27'
make[2]: Entering directory `/usr/local/mysql-4.0.27'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: Nothing to be done for `install-data-am'.
make[2]: Leaving directory `/usr/local/mysql-4.0.27'
make[1]: Leaving directory `/usr/local/mysql-4.0.27'
Making install in include
make[1]: Entering directory `/usr/local/mysql-4.0.27/include'
make install-am
make[2]: Entering directory `/usr/local/mysql-4.0.27/include'
make[3]: Entering directory `/usr/local/mysql-4.0.27/include'
make[3]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/mysql/include/mysql" || mkdir -p -- "/usr/local/mysql/include/mysql"
/usr/bin/install -c -m 644 'my_dbug.h' '/usr/local/mysql/include/mysql/my_dbug.h'
/usr/bin/install -c -m 644 'm_string.h' '/usr/local/mysql/include/mysql/m_string.h'
/usr/bin/install -c -m 644 'my_sys.h' '/usr/local/mysql/include/mysql/my_sys.h' /usr/bin/install -c -m 644 'my_list.h' '/usr/local/mysql/include/mysql/my_list.h'
/usr/bin/install -c -m 644 'mysql.h' '/usr/local/mysql/include/mysql/mysql.h'
/usr/bin/install -c -m 644 'mysql_com.h' '/usr/local/mysql/include/mysql/mysql_com.h'
/usr/bin/install -c -m 644 'mysqld_error.h' '/usr/local/mysql/include/mysql/mysqld_error.h'
/usr/bin/install -c -m 644 'mysql_embed.h' '/usr/local/mysql/include/mysql/mysql_embed.h'
/usr/bin/install -c -m 644 'my_semaphore.h' '/usr/local/mysql/include/mysql/my_semaphore.h'
/usr/bin/install -c -m 644 'my_pthread.h' '/usr/local/mysql/include/mysql/my_pthread.h'
/usr/bin/install -c -m 644 'my_no_pthread.h' '/usr/local/mysql/include/mysql/my_no_pthread.h'
/usr/bin/install -c -m 644 'raid.h' '/usr/local/mysql/include/mysql/raid.h'
/usr/bin/install -c -m 644 'errmsg.h' '/usr/local/mysql/include/mysql/errmsg.h' /usr/bin/install -c -m 644 'my_global.h' '/usr/local/mysql/include/mysql/my_global.h'
/usr/bin/install -c -m 644 'my_net.h' '/usr/local/mysql/include/mysql/my_net.h' /usr/bin/install -c -m 644 'my_alloc.h' '/usr/local/mysql/include/mysql/my_alloc.h'
/usr/bin/install -c -m 644 'my_getopt.h' '/usr/local/mysql/include/mysql/my_getopt.h'
/usr/bin/install -c -m 644 'sslopt-longopts.h' '/usr/local/mysql/include/mysql/sslopt-longopts.h'
/usr/bin/install -c -m 644 'my_dir.h' '/usr/local/mysql/include/mysql/my_dir.h' /usr/bin/install -c -m 644 'sslopt-vars.h' '/usr/local/mysql/include/mysql/sslopt-vars.h'
/usr/bin/install -c -m 644 'sslopt-case.h' '/usr/local/mysql/include/mysql/sslopt-case.h'
/usr/bin/install -c -m 644 'mysql_version.h' '/usr/local/mysql/include/mysql/mysql_version.h'
/usr/bin/install -c -m 644 'm_ctype.h' '/usr/local/mysql/include/mysql/m_ctype.h'
/usr/bin/install -c -m 644 'my_config.h' '/usr/local/mysql/include/mysql/my_config.h'
make[3]: Leaving directory `/usr/local/mysql-4.0.27/include'
make[2]: Leaving directory `/usr/local/mysql-4.0.27/include'
make[1]: Leaving directory `/usr/local/mysql-4.0.27/include'
Making install in Docs
make[1]: Entering directory `/usr/local/mysql-4.0.27/Docs'
make[2]: Entering directory `/usr/local/mysql-4.0.27/Docs'
make[2]: Nothing to be done for `install-exec-am'.
make install-data-hook
make[3]: Entering directory `/usr/local/mysql-4.0.27/Docs'
/bin/sh ../mkinstalldirs /usr/local/mysql/info
/usr/bin/install -c -m 644 ./mysql.info /usr/local/mysql/info
make[3]: Leaving directory `/usr/local/mysql-4.0.27/Docs'
make[2]: Leaving directory `/usr/local/mysql-4.0.27/Docs'
make[1]: Leaving directory `/usr/local/mysql-4.0.27/Docs'
Making install in readline
make[1]: Entering directory `/usr/local/mysql-4.0.27/readline'
make[2]: Entering directory `/usr/local/mysql-4.0.27/readline'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/mysql/include/mysql" || mkdir -p -- "/usr/local/mysql/include/mysql"
/usr/bin/install -c -m 644 'readline.h' '/usr/local/mysql/include/mysql/readline.h'
/usr/bin/install -c -m 644 'chardefs.h' '/usr/local/mysql/include/mysql/chardefs.h'
/usr/bin/install -c -m 644 'keymaps.h' '/usr/local/mysql/include/mysql/keymaps.h'
/usr/bin/install -c -m 644 'history.h' '/usr/local/mysql/include/mysql/history.h'
/usr/bin/install -c -m 644 'tilde.h' '/usr/local/mysql/include/mysql/tilde.h'
make[2]: Leaving directory `/usr/local/mysql-4.0.27/readline'
make[1]: Leaving directory `/usr/local/mysql-4.0.27/readline'
Making install in pstack
make[1]: Entering directory `/usr/local/mysql-4.0.27/pstack'
Making install in aout
make[2]: Entering directory `/usr/local/mysql-4.0.27/pstack/aout'
make[3]: Entering directory `/usr/local/mysql-4.0.27/pstack/aout'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/usr/local/mysql-4.0.27/pstack/aout'
make[2]: Leaving directory `/usr/local/mysql-4.0.27/pstack/aout'
make[2]: Entering directory `/usr/local/mysql-4.0.27/pstack'
make[3]: Entering directory `/usr/local/mysql-4.0.27/pstack'
test -z "/usr/local/mysql/lib/mysql" || mkdir -p -- "/usr/local/mysql/lib/mysql"make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/usr/local/mysql-4.0.27/pstack'
make[2]: Leaving directory `/usr/local/mysql-4.0.27/pstack'
make[1]: Leaving directory `/usr/local/mysql-4.0.27/pstack'
Making install in libmysql
make[1]: Entering directory `/usr/local/mysql-4.0.27/libmysql'
if /bin/sh ../libtool --preserve-dup-deps --tag=CC --mode=compile gcc -DDEFAULT_CHARSET_HOME="\"/usr/local/mysql\"" -DDATADIR="\"/usr/local/mysql/var\"" -DSHAREDIR="\"/usr/local/mysql/share/mysql\"" -DUNDEF_THREADS_HACK -DDONT_USE_RAID -DMYSQL_CLIENT -I. -I. -I.. -I./../include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -MT libmysql.lo -MD -MP -MF ".deps/libmysql.Tpo" -c -o libmysql.lo libmysql.c; \
then mv -f ".deps/libmysql.Tpo" ".deps/libmysql.Plo"; else rm -f ".deps/libmysql.Tpo"; exit 1; fi
gcc -DDEFAULT_CHARSET_HOME=\"/usr/local/mysql\" -DDATADIR=\"/usr/local/mysql/var\" -DSHAREDIR=\"/usr/local/mysql/share/mysql\" -DUNDEF_THREADS_HACK -DDONT_USE_RAID -DMYSQL_CLIENT -I. -I. -I.. -I./../include -I../include -I./.. -I.. -I.. -O3 -DDBUG_OFF -MT libmysql.lo -MD -MP -MF .deps/libmysql.Tpo -c libmysql.c -fPIC -DPIC -o .libs/libmysql.o
libmysql.c: In function `mysql_real_connect':
libmysql.c:1862: warning: passing arg 5 of `gethostbyname_r' from incompatible pointer type
libmysql.c:1862: error: too few arguments to function `gethostbyname_r'
libmysql.c:1862: warning: assignment makes pointer from integer without a cast
make[1]: *** [libmysql.lo] Error 1
make[1]: Leaving directory `/usr/local/mysql-4.0.27/libmysql'
make: *** [install-recursive] Error 1


now puzzeled plz help i think now i m at the end plz push me some i will win

with regards,
MKS
Wouter Jagers
Honored Contributor

Re: configure: error: no acceptable C compiler found in $PATH in MySQL 4.0

Hmmz..

I'd say try and compile again, after cleaning up:

# make distclean
# ./configure .....
# make
(errors gone ?)
# make install

You could also try and remove your whole building directory and unpack the source again (that's a sure way to 'start from scratch' as well).

G'luck !
an engineer's aim in a discussion is not to persuade, but to clarify.