Author Topic: Problem compiling MySQL  (Read 3317 times)

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
Problem compiling MySQL
« on: June 30, 2009, 12:46:38 AM »
I'm trying to compile MySQL 5.1.35 Community Edition.
Configuring gives an error about not being able to find 'getconf'.
I couldn't see 'getconf' in the repos.
Is it part of a particular package in the repos?

Offline junan

  • Jr. Member
  • **
  • Posts: 88
Re: Problem compiling MySQL
« Reply #1 on: June 30, 2009, 01:11:36 AM »
try load glibc-apps.tce
there is /usr/bin/getconf inside it.
fun and fearless ...

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
Re: Problem compiling MySQL
« Reply #2 on: June 30, 2009, 03:33:05 AM »
Thanks.  That worked.

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
Re: Problem compiling MySQL
« Reply #3 on: July 02, 2009, 01:33:12 AM »
New problem:

/usr/bin/ld: cannot find -lgcc_s

Any ideas how I correct this?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14631
Re: Problem compiling MySQL
« Reply #4 on: July 02, 2009, 01:52:07 AM »
I'm not at a tc machine at the moment, but this might be something to do with the latest version of gcc being compiled to /usr/local, except for libgcc_s, which is in /usr.

Are you using the gcc-binutils extension or the gcc + binutils extensions?

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
Re: Problem compiling MySQL
« Reply #5 on: July 02, 2009, 02:19:37 AM »
gcc-binutils.tce

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10988
Re: Problem compiling MySQL
« Reply #6 on: July 02, 2009, 04:02:32 AM »
Is this with the flags from the other thread? It appears gcc_s cannot be compiled statically, only a dynamic version exists.
The only barriers that can stop you are the ones you create yourself.

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
Re: Problem compiling MySQL
« Reply #7 on: July 02, 2009, 04:23:36 AM »
Yes.  It will compile with the flags:

--prefix=/usr/local
--enable-assembler

but if I try the flag

--with-mysqld-ldflags=-all-static

I get the error.  I get other errors if I try

--without-docs
--without-man
--without-bench

but I want to get it to compile first before I start passing these parameters.  Given what you said about no static gcc_s library, it would appear I will have to keep excluding the --with-mysqld-ldflags=-all-static parameter.

If I compile with:
 
--prefix=/usr/local
--enable-assembler
--with-gnu-ld

I get the error:

configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:  
config.sub: missing argument
Try `config.sub --help' for more information.
configure: error: /bin/sh ./config.sub   failed
./build_source: line 18: --with-gnu-ld: not found
make: *** No targets specified and no makefile found.  Stop.
mkdir: cannot create directory '/tmp/mysql': File exists
make: *** No rule to make target `install'.  Stop.
chown: /tmp/mysql/usr/local: No such file or directory

If I compile with:

--prefix=/usr/local
--enable-assembler
--without-docs

I get the error:

onfigure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type:  
config.sub: missing argument
Try `config.sub --help' for more information.
configure: error: /bin/sh ./config.sub   failed
./build_source: line 18: --without-docs: not found
make: *** No targets specified and no makefile found.  Stop.
mkdir: cannot create directory '/tmp/mysql': File exists
make: *** No rule to make target `install'.  Stop.
chown: /tmp/mysql/usr/local: No such file or directory

And so on.  It seems I am destined to build a large (aka. fully-documented) MySQL package. :(
« Last Edit: July 02, 2009, 04:25:28 AM by PingPing »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10988
Re: Problem compiling MySQL
« Reply #8 on: July 02, 2009, 04:55:40 AM »
The only barriers that can stop you are the ones you create yourself.

Offline PingPing

  • Jr. Member
  • **
  • Posts: 99
Re: Problem compiling MySQL
« Reply #9 on: July 02, 2009, 06:04:13 AM »
Thanks.  I will take a look at them.  I was following the official MySQL documentation (chapter 10: MySQL Installation Using a Source Distribution) which, unfortunately, is not as newbie-friendly as I would have liked.  C'est la vie.
« Last Edit: July 02, 2009, 06:06:50 AM by PingPing »