[Maria-discuss] Help with RPM src build
I have gone over every document concerning building mariadb using src rpm. I am trying to build mariadb against RHEL 6. I have run rpmbuild against the src rpm and I get this error everytime: error: configure: error: C compiler cannot create executables The instructions, I have to admit, are not very good about building using the source rpm. If there is anyone who has a better howto, I would really appreciate it. Thanks! Brent
Hi, bwellsnc! On Jul 19, bwellsnc wrote:
I have gone over every document concerning building mariadb using src rpm. I am trying to build mariadb against RHEL 6. I have run rpmbuild against the src rpm and I get this error everytime:
error: configure: error: C compiler cannot create executables
In the source directory you can find config.log file. And in it you will find the reason for this error. Regards, Sergei
This is the error I am getting: ## ----------- ## ## confdefs.h. ## ## ----------- ## #define PACKAGE_NAME "MariaDB Server" #define PACKAGE_TARNAME "mysql" #define PACKAGE_VERSION "5.2.7-MariaDB" #define PACKAGE_STRING "MariaDB Server 5.2.7-MariaDB" #define PACKAGE_BUGREPORT "" #define PACKAGE "mysql" #define VERSION "5.2.7-MariaDB" configure: exit 77 On Wed, Jul 20, 2011 at 5:58 AM, Sergei Golubchik <serg@askmonty.org> wrote:
Hi, bwellsnc!
On Jul 19, bwellsnc wrote:
I have gone over every document concerning building mariadb using src rpm. I am trying to build mariadb against RHEL 6. I have run rpmbuild against the src rpm and I get this error everytime:
error: configure: error: C compiler cannot create executables
In the source directory you can find config.log file. And in it you will find the reason for this error.
Regards, Sergei
Hi, bwellsnc! On Jul 20, bwellsnc wrote:
This is the error I am getting:
#define PACKAGE_BUGREPORT "" #define PACKAGE "mysql" #define VERSION "5.2.7-MariaDB"
configure: exit 77
you need to look further up. At the end of the log configure dumps the environment - various defines. Scroll up until you see the command that fails. Or start from the top and scroll down until you see the environment dump, the failed command should be right above.
On Wed, Jul 20, 2011 at 5:58 AM, Sergei Golubchik <serg@askmonty.org> wrote:
Hi, bwellsnc!
On Jul 19, bwellsnc wrote:
I have gone over every document concerning building mariadb using src rpm. I am trying to build mariadb against RHEL 6. I have run rpmbuild against the src rpm and I get this error everytime:
error: configure: error: C compiler cannot create executables
In the source directory you can find config.log file. And in it you will find the reason for this error.
Regards, Sergei
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Regards, Sergei
Wow, I'm not thinking at all. Found the problem. There needs be an entry in the SPEC file like below: if [ "%{elversion}" = "6" ] ; then export CFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 $CPUOPT" export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 $CPUOPT" else export CC="gcc" CXX="gcc" export CFLAGS="-O2 -fno-omit-frame-pointer -g -pipe $CPUOPT" export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe $CPUOPT" fi The problem is that the entry before references gcc4 which in RHEL 5 and RHEL 6 there isn't a gcc4 executable. On Wed, Jul 20, 2011 at 9:43 AM, Sergei Golubchik <serg@askmonty.org> wrote:
Hi, bwellsnc!
On Jul 20, bwellsnc wrote:
This is the error I am getting:
#define PACKAGE_BUGREPORT "" #define PACKAGE "mysql" #define VERSION "5.2.7-MariaDB"
configure: exit 77
you need to look further up. At the end of the log configure dumps the environment - various defines. Scroll up until you see the command that fails.
Or start from the top and scroll down until you see the environment dump, the failed command should be right above.
On Wed, Jul 20, 2011 at 5:58 AM, Sergei Golubchik <serg@askmonty.org> wrote:
Hi, bwellsnc!
On Jul 19, bwellsnc wrote:
I have gone over every document concerning building mariadb using src rpm. I am trying to build mariadb against RHEL 6. I have run rpmbuild against the src rpm and I get this error everytime:
error: configure: error: C compiler cannot create executables
In the source directory you can find config.log file. And in it you will find the reason for this error.
Regards, Sergei
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Regards, Sergei
Actually, after more investigation, I have no clue why gcc4 is referenced since Centos, Scientific Linux, and RHEL 5 does not have a gcc4 executable. On Wed, Jul 20, 2011 at 10:00 AM, bwellsnc <bwellsnc@gmail.com> wrote:
Wow, I'm not thinking at all. Found the problem. There needs be an entry in the SPEC file like below:
if [ "%{elversion}" = "6" ] ; then export CFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 $CPUOPT" export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 $CPUOPT" else export CC="gcc" CXX="gcc" export CFLAGS="-O2 -fno-omit-frame-pointer -g -pipe $CPUOPT" export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe $CPUOPT" fi
The problem is that the entry before references gcc4 which in RHEL 5 and RHEL 6 there isn't a gcc4 executable.
On Wed, Jul 20, 2011 at 9:43 AM, Sergei Golubchik <serg@askmonty.org> wrote:
Hi, bwellsnc!
On Jul 20, bwellsnc wrote:
This is the error I am getting:
#define PACKAGE_BUGREPORT "" #define PACKAGE "mysql" #define VERSION "5.2.7-MariaDB"
configure: exit 77
you need to look further up. At the end of the log configure dumps the environment - various defines. Scroll up until you see the command that fails.
Or start from the top and scroll down until you see the environment dump, the failed command should be right above.
On Wed, Jul 20, 2011 at 5:58 AM, Sergei Golubchik <serg@askmonty.org> wrote:
Hi, bwellsnc!
On Jul 19, bwellsnc wrote:
I have gone over every document concerning building mariadb using src rpm. I am trying to build mariadb against RHEL 6. I have run rpmbuild against the src rpm and I get this error everytime:
error: configure: error: C compiler cannot create executables
In the source directory you can find config.log file. And in it you will find the reason for this error.
Regards, Sergei
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Regards, Sergei
Hi, bwellsnc! To solve this you'd better have somebody who uses RHEL to answer. I only pointed out how to get a bit more information than "cannot create executables" from config.log. On Jul 20, bwellsnc wrote:
Actually, after more investigation, I have no clue why gcc4 is referenced since Centos, Scientific Linux, and RHEL 5 does not have a gcc4 executable.
On Wed, Jul 20, 2011 at 10:00 AM, bwellsnc <bwellsnc@gmail.com> wrote:
Wow, I'm not thinking at all. Found the problem. There needs be an entry in the SPEC file like below:
if [ "%{elversion}" = "6" ] ; then export CFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 $CPUOPT" export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 $CPUOPT" else export CC="gcc" CXX="gcc" export CFLAGS="-O2 -fno-omit-frame-pointer -g -pipe $CPUOPT" export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe $CPUOPT" fi
The problem is that the entry before references gcc4 which in RHEL 5 and RHEL 6 there isn't a gcc4 executable.
On Wed, Jul 20, 2011 at 9:43 AM, Sergei Golubchik <serg@askmonty.org> wrote:
On Wed, Jul 20, 2011 at 5:58 AM, Sergei Golubchik <serg@askmonty.org> wrote:
On Jul 19, bwellsnc wrote:
I have gone over every document concerning building mariadb using src rpm. I am trying to build mariadb against RHEL 6. I have run rpmbuild against the src rpm and I get this error everytime:
error: configure: error: C compiler cannot create executables
In the source directory you can find config.log file. And in it you will find the reason for this error.
Regards, Sergei
Yes, I do believe a "RHEL" person is needed on this. I don't understand why the build process has been made so complicated. It appears that some things have been purposely removed or not configured in the spec file. Like this one: rpm2cpio: /root/rpmbuild/SOURCES/%{compat50rpm}: No such file or directory There is nothing concerning compat50rpm in the SOURCES, only the mariadb tgz and an ourdelta rpm file which will not install because it's looking for dependencies for RHEL 5. Also, the upstream_source variable was not configured, there was 2 Source entries that pointed to this which broke because they where basically the same. Not sure if anyone else is having these types of problems with the src rpm, but this is a little frustrating. On Wed, Jul 20, 2011 at 11:08 AM, Sergei Golubchik <serg@askmonty.org> wrote:
Hi, bwellsn
To solve this you'd better have somebody who uses RHEL to answer.
I only pointed out how to get a bit more information than "cannot create executables" from config.log.
On Jul 20, bwellsnc wrote:
Actually, after more investigation, I have no clue why gcc4 is referenced since Centos, Scientific Linux, and RHEL 5 does not have a gcc4 executable.
On Wed, Jul 20, 2011 at 10:00 AM, bwellsnc <bwellsnc@gmail.com> wrote:
Wow, I'm not thinking at all. Found the problem. There needs be an entry in the SPEC file like below:
if [ "%{elversion}" = "6" ] ; then export CFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 $CPUOPT" export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 $CPUOPT" else export CC="gcc" CXX="gcc" export CFLAGS="-O2 -fno-omit-frame-pointer -g -pipe $CPUOPT" export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe $CPUOPT" fi
The problem is that the entry before references gcc4 which in RHEL 5 and RHEL 6 there isn't a gcc4 executable.
On Wed, Jul 20, 2011 at 9:43 AM, Sergei Golubchik <serg@askmonty.org> wrote:
On Wed, Jul 20, 2011 at 5:58 AM, Sergei Golubchik <serg@askmonty.org> wrote:
On Jul 19, bwellsnc wrote: > I have gone over every document concerning building mariadb using src > rpm. I am trying to build mariadb against RHEL 6. I have run > rpmbuild against the src rpm and I get this error everytime: > > error: configure: error: C compiler cannot create executables
In the source directory you can find config.log file. And in it you will find the reason for this error.
Regards, Sergei
I poked on this problem a little bit today and was able to generate RPMs. I didn't have time to test the built RPMs. I posted my notes at http://www.oktud.com/mariadb/fix-mariadb-rpm-rhel6.notes and the spec file at http://www.oktud.com/mariadb/mysql52-ourdelta-centos.spec . Again, installation of the resultant RPM was not tested. -Adam
Thanks adam. I will take a look. Probably something simple I missed. Thanks again. On Jul 21, 2011 5:00 PM, "Adam M. Dutko" <dutko.adam@gmail.com> wrote:
I poked on this problem a little bit today and was able to generate RPMs. I didn't have time to test the built RPMs.
I posted my notes at http://www.oktud.com/mariadb/fix-mariadb-rpm-rhel6.notes and the spec file at http://www.oktud.com/mariadb/mysql52-ourdelta-centos.spec .
Again, installation of the resultant RPM was not tested.
-Adam
After a little bit more tinkering, I was able to build the rpm's. The problem is that RHEL 6 has a built in dependency for mysql-libs which caused the install to fail. It's trying to find libmysqlclient.so.16. This also causes another problem, postfix. Postfix is the default on RHEL 6 and it's been built with mysql. So if you remove mysql-libs it removes postfix. CentOS has purposely taken out the mysql requirement in there version of postfix, so this shouldn't be a problem. Scientific Linux and RHEL keep it. On Thu, Jul 21, 2011 at 5:01 PM, bwellsnc <bwellsnc@gmail.com> wrote:
Thanks adam. I will take a look. Probably something simple I missed. Thanks again.
On Jul 21, 2011 5:00 PM, "Adam M. Dutko" <dutko.adam@gmail.com> wrote:
I poked on this problem a little bit today and was able to generate RPMs. I didn't have time to test the built RPMs.
I posted my notes at http://www.oktud.com/mariadb/fix-mariadb-rpm-rhel6.notes and the spec file at http://www.oktud.com/mariadb/mysql52-ourdelta-centos.spec .
Again, installation of the resultant RPM was not tested.
-Adam
Ok, after doing a few more changes, I have gotten a sucessful build of MariaDB on RHEL 6. In order to get this done, I had to download this file and set it as Source1: mysql-libs-5.1.52-1.el6_0.1.i686.rpm This is the libs from scientific linux. I chose this because of scientific linux's decision to not mess to much with RHEL. The only thing that will be a problem will be postfix. The problem comes when you try to re-install it. Postfix requires mysql-libs and has been built against mysql-libs that comes with RHEL 6. On Fri, Jul 22, 2011 at 8:02 AM, bwellsnc <bwellsnc@gmail.com> wrote:
After a little bit more tinkering, I was able to build the rpm's. The problem is that RHEL 6 has a built in dependency for mysql-libs which caused the install to fail. It's trying to find libmysqlclient.so.16. This also causes another problem, postfix. Postfix is the default on RHEL 6 and it's been built with mysql. So if you remove mysql-libs it removes postfix. CentOS has purposely taken out the mysql requirement in there version of postfix, so this shouldn't be a problem. Scientific Linux and RHEL keep it.
On Thu, Jul 21, 2011 at 5:01 PM, bwellsnc <bwellsnc@gmail.com> wrote:
Thanks adam. I will take a look. Probably something simple I missed. Thanks again.
On Jul 21, 2011 5:00 PM, "Adam M. Dutko" <dutko.adam@gmail.com> wrote:
I poked on this problem a little bit today and was able to generate RPMs. I didn't have time to test the built RPMs.
I posted my notes at http://www.oktud.com/mariadb/fix-mariadb-rpm-rhel6.notes and the spec file at http://www.oktud.com/mariadb/mysql52-ourdelta-centos.spec .
Again, installation of the resultant RPM was not tested.
-Adam
participants (3)
-
Adam M. Dutko
-
bwellsnc
-
Sergei Golubchik