Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: PingPing on June 30, 2009, 03:46:38 AM

Title: Problem compiling MySQL
Post by: PingPing on June 30, 2009, 03: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?
Title: Re: Problem compiling MySQL
Post by: junan on June 30, 2009, 04:11:36 AM
try load glibc-apps.tce
there is /usr/bin/getconf inside it.
Title: Re: Problem compiling MySQL
Post by: PingPing on June 30, 2009, 06:33:05 AM
Thanks.  That worked.
Title: Re: Problem compiling MySQL
Post by: PingPing on July 02, 2009, 04:33:12 AM
New problem:

/usr/bin/ld: cannot find -lgcc_s

Any ideas how I correct this?
Title: Re: Problem compiling MySQL
Post by: Juanito on July 02, 2009, 04: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?
Title: Re: Problem compiling MySQL
Post by: PingPing on July 02, 2009, 05:19:37 AM
gcc-binutils.tce
Title: Re: Problem compiling MySQL
Post by: curaga on July 02, 2009, 07: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.
Title: Re: Problem compiling MySQL
Post by: PingPing on July 02, 2009, 07: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. :(
Title: Re: Problem compiling MySQL
Post by: curaga on July 02, 2009, 07:55:40 AM
The BLFS instructions might help:
http://www.linuxfromscratch.org/blfs/view/svn/server/mysql.html
Title: Re: Problem compiling MySQL
Post by: PingPing on July 02, 2009, 09: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.