Bug #793 Compilation of 4.1.0-alpha fails when using --with-client-ldflags
Submitted: 4 Jul 2003 13:45 Modified: 8 Feb 2005 19:45
Reporter: Daniel Blumenthal Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:4.1.0-alpha OS:Linux (linux 8.0)
Assigned to: Assigned Account CPU Architecture:Any

[4 Jul 2003 13:45] Daniel Blumenthal
I have tried building mysql 4.1.0-alpha with the following configuration:
- redhat linux 8.0
- gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)
- GNU Make version 3.79.1 built for i386-redhat-linux-gnu
- 512MB ram
- more than enough disk space

when I add the "--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static" options to "configure", i get the following error message when i run mysql_install_db:

Installing privilege tables
mysqld got signal 11;

I have succeeded in building (and using) 4.1.0-alpha without the "--with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static" options (the reason I've been trying with these options is that they're listed in INSTALL-SOURCE as the options used to compile the distribution binaries).

The same error occurs when prepending the line with:
  CFLAGS="-O2 -mcpu=pentiumpro" CXX=gcc CXXFLAGS="-O2 -mcpu=pentiumpro -felide-constructors"

How to repeat:
1) download mysql-4.1.0-alpha.tar.gz 
2) tar zxvf mysql-4.1.0-alpha.tar.gz 
3) cd mysql-4.1.0-alpha 
4) ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static
5) make 
6) su 
7) make install 
8) ./scripts/mysql_install_db 

Suggested fix:
Possible problems:
1)  the documentation is out of date
2)  these options don't work with my versions of the compilers
3)  the code is broken

for 1 & 2, adjust the documentation.
for #3, fix the code ;)
[27 Aug 2003 4:15] Michael Widenius
I tested this on a quite fresh Redhat 9 installation and the newest mysql 4.1 version from our source repository.

Executed the following commands:
aclocal    || autoheader || aclocal || automake || autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)

./configure --prefix=/usr/local/mysql --with-extra-charsets=complex \
--enable-thread-safe-client --enable-local-infile --enable-assembler \
--disable-shared --with-client-ldflags=-all-static \

gmake -j 4

All tests passed for me (the tests does run mysql_install_db), which indicates that there is something wrong in our setup (or something is very different on RedHat 9)

Could you try to configure with --debug and see if you can run mysqld under gdb to give us a back trace for what goes wrong ?
[8 Feb 2005 19:45] Sergei Golubchik
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.