List:Packagers« Previous MessageNext Message »
From:Lenz Grimmer Date:July 22 2003 8:56pm
Subject:Re: MySQL 4.x RPM with gcc 3.x
View as plain text  
Hash: SHA1


On Fri, 18 Jul 2003, Bernhard Graf wrote:

> to build the 4.x MySQL-RPM (currently 4.0.13) I started with the current
> SuSE-8.2 mysql.spec (3.23.55), which is quited similar to the originaL

Surprise, as I used the MySQL spec file as a template to create the
initial SuSE RPMs :)

(I used to work for SuSE before)

What's wrong with using the "official" 4.0 MySQL RPMs?

> With Google's help I was able to solve the first and often reported
> linker problems, like
> : undefined reference to `operator new(unsigned)'
> : undefined reference to `operator delete(void*)'
> and
> ../libmysqld.a(field.o)(.gnu.linkonce.d._ZTV9Field_str+0x10): undefined
> reference to `__cxa_pure_virtual'
> by setting enironment variables
> export CXX='gcc -O3'
> export LDFLAGS='-lstdc++'
> in the SPEC file's BuildMySQL routine.

The latter should not be necessary. Try to aviod linking against libstdc++
when compiling MySQL, if possible - the manual has some more info on that

> This causes the linker to link with libstdc++ and libgcc_s.
> Because only shared versions of these libs exist (*.so but no *.a), it
> seems impossible now to build a statically linked mysql-binary.
> So far I'm able to create a dynamicly linked mysql binary, by removing
> configure arguments
> --disable-shared --with-mysqld-ldflags='-all-static'
> --with-client-ldflags='-all-static'.
> Any help how to link it staticly is much appreciated.
> OS: SuSE Linux 8.2
> Compiler gcc 3.3 final (

I just rebuilt the 4.0.14 SRPM on my SuSE Linux 8.2 box with gcc 3.3
final. The server binary is statically linked, as expected. Please have a
look at the 4.0 spec file for more info.

- -- 
 Lenz Grimmer <lenz@stripped>
 Senior Production Engineer
 MySQL GmbH,
 Hamburg, Germany

 For technical support contracts, visit
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)
Comment: For info see

MySQL 4.x RPM with gcc 3.xBernhard Graf18 Jul
  • Re: MySQL 4.x RPM with gcc 3.xLenz Grimmer22 Jul
    • Re: MySQL 4.x RPM with gcc 3.xBernhard Graf24 Jul
      • Re: MySQL 4.x RPM with gcc 3.xLenz Grimmer30 Jul
        • Re: MySQL 4.x RPM with gcc 3.xBernhard Graf30 Jul
          • Re: MySQL 4.x RPM with gcc 3.xLenz Grimmer6 Aug
            • Re: MySQL 4.x RPM with gcc 3.xBernhard Graf6 Aug
              • MySQL 4.0.14 RPM crashes (was: MySQL 4.x RPM with gcc 3.x)Bernhard Graf9 Aug
                • Re: MySQL 4.0.14 RPM crashes (was: MySQL 4.x RPM with gcc 3.x)Lenz Grimmer13 Aug