Bug #13656 Unable to compile mysql-5.0.13 on fedora core 3.
Submitted: 30 Sep 2005 13:45 Modified: 12 Nov 2005 9:10
Reporter: Ravi Yadav Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.13 OS:Linux (fedora core 3)
Assigned to: CPU Architecture:Any

[30 Sep 2005 13:45] Ravi Yadav
Description:
Hi ,
      I recently downloaded the mysql-5.0.13 .src.rpm.When building the rpm i get the following errors...........................................................................
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)... yes
checking "character sets"... default: latin1, collation: latin1_swedish_ci; compiled in: latin1 latin1 utf8 big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8
checking whether to compile national Unicode collations... yes
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.
error: Bad exit status from /var/tmp/rpm-tmp.76980 (%build)
PM build errors:
   Bad exit status from /var/tmp/rpm-tmp.76980 (%build)

However the output of config.log that may help you is as follows.....................................
## Core tests. ##
## ----------- ##

configure:1674: checking build system type
configure:1692: result: i686-pc-linux-gnu
configure:1700: checking host system type
configure:1714: result: i686-pc-linux-gnu
configure:1722: checking target system type
configure:1736: result: i686-pc-linux-gnu
configure:1766: checking for a BSD-compatible install
configure:1821: result: /usr/bin/install -c
configure:1832: checking whether build environment is sane
configure:1875: result: yes
configure:1932: checking for gawk
configure:1948: found /bin/gawk
configure:1958: result: gawk
configure:1968: checking whether make sets $(MAKE)
configure:1988: result: yes
configure:2213: checking "character sets"
configure:2794: result: default: latin1, collation: latin1_swedish_ci; compiled in: latin1 latin1 utf8 big5 cp1250 cp932 eucjpms euckr gb2312 gbk latin1 latin2 sjis tis620 ucs2 ujis utf8
configure:2832: checking whether to compile national Unicode collations
configure:2837: result: yes
configure:3133: checking whether build environment is sane
configure:3176: result: yes
configure:3179: checking whether make sets $(MAKE)
configure:3199: result: yes
configure:3277: checking for gawk
configure:3303: result: gawk
configure:3359: checking for gcc
configure:3385: result: gcc
configure:3629: checking for C compiler version
configure:3632: gcc --version </dev/null >&5
2.96
configure:3635: $? = 0
configure:3637: gcc -v </dev/null >&5
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux7/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.3 2.96-126)
configure:3640: $? = 0
configure:3642: gcc -V </dev/null >&5
gcc: argument to `-V' is missing
configure:3645: $? = 1
configure:3668: checking for C compiler default output file name
configure:3671: gcc -O2 -g -pipe -m32 -march=i386 -mtune=pentium4     conftest.c  >&5
cc1: Invalid option `32'
cc1: Invalid option `tune=pentium4'
configure:3674: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE "mysql"
| #define VERSION "5.0.13-rc"
| #define DEFINE_ALL_CHARACTER_SETS 1
| #define HAVE_CHARSET_latin1 1
| #define HAVE_CHARSET_latin1 1
| #define HAVE_CHARSET_utf8 1
| #define USE_MB 1
| #define USE_MB_IDENT 1
| #define HAVE_CHARSET_big5 1
| #define USE_MB 1
| #define USE_MB_IDENT 1
| #define HAVE_CHARSET_cp1250 1
| #define HAVE_CHARSET_cp932 1
| #define USE_MB 1
| #define USE_MB_IDENT 1
| #define HAVE_CHARSET_eucjpms 1
| #define USE_MB 1
| #define USE_MB_IDENT 1
| #define HAVE_CHARSET_euckr 1
| #define USE_MB 1
| #define USE_MB_IDENT 1
| #define HAVE_CHARSET_gb2312 1
| #define USE_MB 1
| #define USE_MB_IDENT 1
| #define HAVE_CHARSET_gbk 1
| #define USE_MB 1
| #define USE_MB_IDENT 1
| #define HAVE_CHARSET_latin1 1

with regards
ravi yadav

                

How to repeat:
It can be repeated using my subject line .
[30 Sep 2005 14:19] Valeriy Kravchuk
What configure options had you used? Please, provide the list of all the steps you performed. Please, specify the amount RAM on your machine also.
[30 Sep 2005 20:01] Ravi Yadav
Additional information provided as requested.

Attachment: steps_performed (application/octet-stream, text), 487 bytes.

[3 Oct 2005 12:18] Ravi Yadav
Hi Valeriy Kravchuk,
 These are the steps i performed.
1>Downloaded MySQL-5.0.13-0.src.rpm
2>Ran the command  rpmbuild --rebuild --clean MySQL-5.0.13-0.src.rpm.

I have an amd athlon processor with 1GB Ram.
output of uname -p=athlon
output of uname -r=2.6.9-1.667
output of uname -a=Linux ns.ravislab.org 2.6.9-1.667 #1 Tue Nov 2 14:41:25 EST 2004 i686 athlon i386 GNU/Linux
output of rpm -qa gcc = gcc-3.4.2-6.fc3
output of rpm -qa glibc = glibc-2.3.3-74

Hope this helps will throw some light on my problem

with regards
ravi yadav
[4 Oct 2005 10:12] Valeriy Kravchuk
Please, try to build from the sources (http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.13-rc.tar.gz/from/pick)
with a simple configure command (see http://dev.mysql.com/doc/mysql/en/quick-install.html for details):

./configure --prefix=/base_directory

and inform about the results. It works for me on Fedora Core 1 (and several other Linux and UNIX systems). Source RPM includes a lot of additional configure options by default - may be a reason for a problem.
[5 Oct 2005 6:45] Ravi Yadav
I complied as per your instructions, (eg. ./configure --prefix=/usr/local/mysql-5.0) .It compiled without any problems and everything seems to be working fine.Now most of my databases are  
locate in /var/lib/mysql.Now how do i make the new mysql server read the data from /var/lib/mysql directory ,right now it reads the data from /usr/local/mysql-5/var directory.
           Once agains thanks for the support.
  Ravi Yadav
[5 Oct 2005 8:17] Valeriy Kravchuk
You may use --datadir=/var/lib/mysql startup option for mysqld (or mysql_safe). See the manual (http://dev.mysql.com/doc/mysql/en/server-options.html) for details.

Please, inform me about the results. Although this will allow you to work, it does not really solve the original problem (.src.rpm istalls OK for me, but on Fedora Core 1, and, more importantly, on Pentium II, not Athlon). So, some further investigation may be needed.
[5 Oct 2005 13:17] Ravi Yadav
Valeriy,i think the problem is with this parameters being set during compilation from src.rpm,
"CFLAGS='-O2 -g -pipe -m32 -march=i386 -mtune=pentium4" .If u remember i have an athlon machine ,then why is it showing a pentium4 .Is there a way to change or set the CFLAGS options during rpmbuild command ,or can we figure out from where these paramaters are being set.
          I am attaching the entire  config.log for you.Hope thats throws some light into the problem.
[5 Oct 2005 13:19] Ravi Yadav
complete config.log .

Attachment: config.log (text/x-log), 13.70 KiB.

[10 Oct 2005 13:48] Valeriy Kravchuk
Please, send the content of the following files from your machine:

/usr/lib/rpm/rpmrc
/usr/lib/rpm/redhat/rpmrc
/etc/rpmrc
~/.rpmrc

The last is from the home directory of the user (root?) that installs source RPM. Looks like you'll have to redefine (or define new value) for the RPM_OPT_FLAGS in one of these files...
[11 Oct 2005 15:14] Ravi Yadav
rpmrc from /var/lib/rpm/rpmrc

Attachment: rpmrc (application/octet-stream, text), 11.11 KiB.

[11 Oct 2005 15:15] Ravi Yadav
rpmrc from /var/lib/rpm/redhat

Attachment: rpmrc (application/octet-stream, text), 2.26 KiB.

[11 Oct 2005 15:19] Ravi Yadav
I did not find any /etc/rpmrc  and /root/.rpmrc  file as requested .The other files you requested have been attached.
[12 Oct 2005 9:10] Valeriy Kravchuk
Ravi,

Please, remove that -mtune=pentium4 from i386 and i686 lines at the beginning of /var/lib/rpm/redhat/rpmrc file, repeat your compiling attempts and inform me about the results.
[13 Nov 2005 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".