Bug 149829 - RFE: build MySQL with embedded server
RFE: build MySQL with embedded server
Product: Fedora
Classification: Fedora
Component: mysql (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tom Lane
: FutureFeature, Patch
: 355891 (view as bug list)
Depends On:
Blocks: F10Target 465019
  Show dependency treegraph
Reported: 2005-02-27 22:23 EST by Nathan Fredrickson
Modified: 2013-07-02 23:03 EDT (History)
5 users (show)

See Also:
Fixed In Version: mysql-5.0.67-2.fc10
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-10-02 11:24:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Change mysql.spec to build the embedded server. (1.05 KB, patch)
2005-02-28 14:14 EST, Nathan Fredrickson
no flags Details | Diff
--with-embedded-server (2.01 KB, patch)
2008-09-30 14:56 EDT, Rex Dieter
no flags Details | Diff

  None (edit)
Description Nathan Fredrickson 2005-02-27 22:23:17 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050224 Firefox/1.0.1 Fedora/1.0.1-1.3.1

Description of problem:
This is a request to build MySQL with the embedded server, libmysqld.a.  This will allow for developement of progams that use an embedded MySQL server.  It can be accomplished by adding a single configure option: --with-embedded-server

The resulting libmysqld.a archive will be included in the -devel package by the exisitng %{_libdir}/mysql/*.a rule.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. rpm -ql mysql-devel | grep libmysqld  

Actual Results:  no output

Expected Results:  /usr/lib/mysql/libmysqld.a

Additional info:
Comment 1 Nathan Fredrickson 2005-02-28 14:14:07 EST
Created attachment 111492 [details]
Change mysql.spec to build the embedded server.

In addition to adding the --with-embedded-server configure option, this also
includes libgcc.a in the package as mysql/libmygcc.a.  Apparently libmygcc.a is
needed when linking the C++ embedded sever (libmysqld.a) into a C program.  The
upstream MySQL packages include libmygcc.a the same way (see MySQL bug #4921).
Comment 2 Tom Lane 2005-03-12 01:58:10 EST
This would make for a rather large increase in the size of the mysql-devel package, no?
Comment 3 Nathan Fredrickson 2005-03-12 02:22:39 EST
Yes, the devel package would increase in size from 566K to 4.7M.  But
that's why devel is a separate package, right?  It's only needed by
developers and downloading a 4 meg devel package is alot easier than
having to build mysql from source or find up-to-date and trusted
3rd-party RPMs.
Comment 4 Stephen 2007-11-21 16:43:32 EST
*** Bug 355891 has been marked as a duplicate of this bug. ***
Comment 5 Stephen 2007-11-21 16:53:51 EST
Any chance this is going to happen?

If package size is a concern, how about creating mysql-server-devel?
Comment 6 Rex Dieter 2008-09-30 11:32:38 EDT
Add another interested consumer in mysql-embedded.  Turns out amarok2 will need this, and if remotely possible, we'd would like to ship it with F-10.  

Tom?  Need help packaging/spec wise?
Comment 7 Kevin Kofler 2008-09-30 11:48:17 EDT
Why is a libmygcc.a needed at all? Can't we just symlink this to the system version? Or even better, patch it to use the shared libgcc?
Comment 8 Kevin Kofler 2008-09-30 11:57:43 EDT
Setting F10Target on this, as it blocks upgrades of Amarok 2 beyond the beta we currently have.
Comment 9 Rex Dieter 2008-09-30 14:56:36 EDT
Created attachment 318106 [details]

Can't comment on the libgcc thing.  From reading the upstream bug, it's unclear (to me) whether that's still required or not.
Comment 10 Rex Dieter 2008-09-30 16:51:52 EDT
Looks like building libmysql.a with -fPIC is required for amarok2 as well (I'm testing taking out the conditional %ifarch alpha)
Comment 11 Tom Lane 2008-09-30 23:27:02 EDT
You just now decided that this is a "must have" for F-10?  Seems a tad late in the cycle.
Comment 12 Kevin Kofler 2008-10-01 03:17:18 EDT
We have been tracking Amarok 2 development, we're currently at Beta 1, and it so happens that Amarok upstream decided to switch from SQLite to MySQL Embedded starting from Beta 2 (ignoring their own feature freeze). :-(
Comment 13 Rex Dieter 2008-10-01 09:35:07 EDT
Fwiw, amarok-1.9.92 (2 beta2) builds/runs fine(*) against patched mysql per comment #9 and comment #10 .

(*) In my own limited testing
Comment 14 Tom Lane 2008-10-01 10:42:36 EDT
From my perspective, two non-negotiable requirements for this would be

(a) we ship a .so library, not .a.

(b) it goes into a separate subpackage, perhaps mysql-embedded.

Is this workable for amarok?
Comment 15 Rex Dieter 2008-10-01 10:51:08 EDT
Should be fabulous, many thanks.
Comment 16 Kevin Kofler 2008-10-01 12:36:41 EDT
> (a) we ship a .so library, not .a.
> (b) it goes into a separate subpackage, perhaps mysql-embedded.
> Is this workable for amarok?

Yes, this is definitely workable.

The only problem I see is that (a) has to be implemented somehow. Upstream MySQL builds all the embedded libs as static. :-( Do you want us to come up with a patch for that?

For (b), do you mean there will also be a separate mysql-embedded-devel? (Just asking - we can just BR the package however it is called.)
Comment 17 Tom Lane 2008-10-01 16:56:15 EDT
I'm fooling with the .so issue right now.  I found a thread about how to do it here:
so assuming that that recipe works, we can go with it for now, and hope that upstream provides a
cleaner solution later.

I had just come to the conclusion that a mysql-embedded-devel package would be a good idea.
It's a place to put the .so symlink, plus the other test files that only a developer would have use for,
and it also makes the package dependencies more manageable.  AFAICS mysql-embedded shouldn't depend on any of the other mysql packages; but mysql-embedded-devel can have a versioned dependency on mysql-devel, which will prevent people from building with the wrong header files.
Comment 18 Kevin Kofler 2008-10-01 17:26:01 EDT
That sounds good.
Comment 19 Tom Lane 2008-10-02 00:32:38 EDT
Well ... that recipe didn't actually work ...

mysql-5.0.67-2.fc10, in rawhide, contains a libmysqld.so that might or might not work;
I don't have any easy means to test it myself.  Anyone want to try it?
Comment 20 Rex Dieter 2008-10-02 10:48:56 EDT
amarok built/runs fine.  So far so good.  Looks like we have a winner.
Comment 21 Tom Lane 2008-10-02 11:24:02 EDT
Okay, I'm going to mark this CLOSED.  Feel free to reopen or file a new bug if something turns out to be wrong with the .so library.

Note You need to log in before you can comment on or make changes to this bug.