FAQ

[MySQL-internals] How to build MySQL in release mode with UDF support from source

Yuan Wang
Aug 13, 2010 at 7:30 am
I recently found that if MySQL is built from source using
BUILD/compile-pentium64-max, I could not create UDF in it. I checked
the build script and found that --with-client-ldflags=-all-static is
given is this situation, so UDF is disabled. Howver if it is built in
DEBUG MODE using BUILD/compile-pentium64-debug-max, then UDF will be
enabled.

So, how could I build MySQL in RELEASE MODE with UDF support from source?
reply

Search Discussions

3 responses

  • Sergei Golubchik at Aug 13, 2010 at 7:39 am
    Hi, Yuan!
    On Aug 13, Yuan Wang wrote:
    I recently found that if MySQL is built from source using
    BUILD/compile-pentium64-max, I could not create UDF in it. I checked
    the build script and found that --with-client-ldflags=-all-static is
    given is this situation, so UDF is disabled. Howver if it is built in
    DEBUG MODE using BUILD/compile-pentium64-debug-max, then UDF will be
    enabled.

    So, how could I build MySQL in RELEASE MODE with UDF support from source?
    For example, edit SETUP.sh to remove -all-static

    Regards,
    Sergei
  • Sergei Golubchik at Aug 16, 2010 at 9:20 am
    Hi, Yuan!
    On Aug 13, Yuan Wang wrote:
    I saw the following line in BUILD/compile-pentium64-max

    extra_configs="$pentium_configs $max_configs $static_link"

    If I remove $static_link from this line, it will be ok too. Maybe this
    way is better for it won't affect other build scripts, but SETUP.sh is
    shared by many many build scripts. Is that so?
    As you like. It's your own copy of the tree.

    If you use other build scripts and want them to produce static builds -
    then yes, changing BUILD/compile-pentium64-max is better.
    I just wonder why $static_link is specified in the STANDARD build
    script. If it is specified in the STANDARD build script, it usually
    means it is the recommended way. So, why $static_link is recommended?
    Does it has something to do with performance?
    Historically, yes. Fully static build is (or, at least, was) a little
    bit faster.

    Regards,
    Sergei
  • Davi Arnaut at Aug 13, 2010 at 1:03 pm

    On 8/13/10 4:30 AM, Yuan Wang wrote:
    I recently found that if MySQL is built from source using
    BUILD/compile-pentium64-max, I could not create UDF in it. I checked
    the build script and found that --with-client-ldflags=-all-static is
    given is this situation, so UDF is disabled. Howver if it is built in
    DEBUG MODE using BUILD/compile-pentium64-debug-max, then UDF will be
    enabled.
    BUILD/ scripts are mainly used for development and testing purposes, not
    to build release binaries. For example, BUILD/compile-pentium64-max
    builds the server with ndb support, which is commonly not needed.
    So, how could I build MySQL in RELEASE MODE with UDF support from source?
    See documentation for "Building MySQL from Source":

    http://dev.mysql.com/doc/mysql-sourcebuild-excerpt/5.1/en/index.html

Related Discussions

Discussion Navigation
viewthread | post