On Tue, 20 Sep 2005, Dan Nelson wrote:
> In the last episode (Sep 20), Hugh Sasse said:
>> So I started again and built using this script:
>> #!/bin/bash
>> CFLAGS="-O3 -L$LD_LIBRARY_PATH" CXX=gcc MAKE=gmake \
>> CXXFLAGS="-O3 -L$LD_LIBRARY_PATH -felide-constructors -fno-exceptions
>> -fno-rtti" ./configure \
>> --prefix=/usr/local/mysql --enable-assembler \
>> --enable-thread-safe-client \
>> --with-mysqld-ldflags=-all-static --with-tcp-port=3308 \
>> --with-unix-socket-path=/tmp/mysql4.sock \
>> --with-pthread --with-gnu-ld && \
>> gmake && \
>> cd mysql-test && ./mysql-test-run --force
>> exit
>
> Get rid of the --with-mysqld-ldflags=-all-static flag; Solaris 9
> doesn't provide a static pthread, and in Solaris 10, you can't build
> static binaries at all:
>
> http://partneradvantage.sun.com/protected/solaris10/adoptionkit/tech/proc.html
> http://blogs.sun.com/roller/page/rie/?anchor=static_linking_where_did_it
Thank you. This worked. I'd like to propose the following patch
against 4.1.13:
neelix hgs 96 %> gdiff -u INSTALL-SOURCE INSTALL-SOURCE.new
--- INSTALL-SOURCE 2005-07-15 11:42:14.000000000 +0100
+++ INSTALL-SOURCE.new 2005-09-21 10:40:23.848026000 +0100
@@ -60,12 +60,16 @@
`-fno-rtti' along with `-fno-exceptions'. When in doubt, do the
following:
- CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors \
- -fno-exceptions -fno-rtti" ./configure \
+ CFLAGS="-O3"
+ CXX=gcc
+ CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti"
+ export CFLAGS CXX CXXFLAGS
+ ./configure \
--prefix=/usr/local/mysql --enable-assembler \
--with-mysqld-ldflags=-all-static
-On most systems, this gives you a fast and stable binary.
+On most systems, this gives you a fast and stable binary, but avoid
+--with-mysqld-ldflags=-all-static on Solaris 2.9 and above.
If you run into problems, _please always use `mysqlbug'_ when
posting questions to a MySQL mailing list. Even if the problem isn't
neelix hgs 97 %>
This is mainly because the variables need to be exported for
recursive make to work correctly, from what I saw.
>
> --
> Dan Nelson
> dnelson@stripped
>
Thank you,
Hugh