Bug #46980 | Option "--without-server" still not working in 5.1 | ||
---|---|---|---|
Submitted: | 28 Aug 2009 16:02 | Modified: | 18 Dec 2009 11:44 |
Reporter: | Joerg Bruehe | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S2 (Serious) |
Version: | 5.1.38, 5.4 | OS: | Any |
Assigned to: | Joerg Bruehe | CPU Architecture: | Any |
[28 Aug 2009 16:02]
Joerg Bruehe
[3 Sep 2009 18:11]
Joerg Bruehe
Started some reference runs, and hope to be faster than promised.
[15 Sep 2009 13:06]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/83277 3108 Joerg Bruehe 2009-09-15 Fix bug#46980 Option "--without-server" still not working in 5.1 The general approach is to make sure that source files which require thread support are only compiled if the build really needs thread support, which means when the server is built or a thread-safe client library. This required several changes: - Make sure the subdirectories "storage/" and "plugin/" are only processed if the server is built, not ifclient-only. - Make the compilation of some modules which inherently require threading depend on thread supportin the build. - Separate the handling of threading in "configure.in" from that of server issues, threading is also needed in a non-server build of a thread-safe client library. Also, "libdbug" must get built even in a client-only build, so "dbug/" must be in the list of client directories. In addition, calls to thread functions in source files which can be built without thread support must use the wrapper functions which handle the non-threaded build. So the modules "client/mysqlimport.c" and "client/mysqlslap.c" must call "my_thread_end()" only via "mysql_thread_end()". @ Makefile.am The directories "storage/" and "plugin/" contain files which are needed for the server only, so their contents is to be built only if a server is built. They must not be named unconditionally, because building their contents will fail unless threads are enabled. These directories are now listed in the "configure" variable "sql_server_dirs" which becomes part of "sql_union_dirs" if the server is to be built. @ client/mysqlimport.c Use the wrapper function "mysql_thread_end()" which correctly handles the case of a non-threaded build. @ client/mysqlslap.c Use the wrapper function "mysql_thread_end()" which correctly handles the case of a non-threaded build. @ configure.in Various changes to support builds "--without-server": 1) For the unit tests, we need "libdbug". 2) Separate the treatment of the server from that of the thread-safe client library. 3) Introduce an "automake conditional" "NEED_THREAD" which can be checked in some "Makefile.am". 4) Include "storage/" and "plugin/" in the list of "sql_server_dirs" so that they are handled in the top "Makefile.am" only if the server is to be built (see the change in that file). @ mysys/Makefile.am The code of "mf_keycache.c" in 5.1 is no longer safe to be built without thread support. (In 5.0, this was possible.) Rather than fix these issues, which is tedious and risky, avoid the need to ever build it without thread support: It is needed in the server only, which needs thread support. The only case where we build a "libmysys" without thread support is for a non-threaded client, where "mf_keycache" is not neded. So its inclusion in the list of source files can depend on the new conditional "NEED_THREAD". @ unittest/mysys/Makefile.am Test program "my_atomic-t" is to verify the correct handling of threads only, it cannot be built without thread support and is not needed in such cases either. Let its build depend on the new conditional "NEED_THREAD".
[16 Sep 2009 5:33]
Sveta Smirnova
Bug #47352 was marked as duplicate of this one.
[16 Sep 2009 11:46]
Joerg Bruehe
With a clean tree including the above patch, I re-verified that all combinations of (not) including the configure options "--without-server" and "--disable-thread-safe-client" produced the expected binaries, and the server (if built) passed the test suite.
[17 Sep 2009 16:35]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/83633 3108 Joerg Bruehe 2009-09-17 Fix bug#46980 Option "--without-server" still not working in 5.1 The general approach is to make sure that source files which require thread support are only compiled if the build really needs thread support, which means when the server is built or a thread-safe client library. This required several changes: - Make sure the subdirectories "storage/" and "plugin/" are only processed if the server is built, not ifclient-only. - Make the compilation of some modules which inherently require threading depend on thread supportin the build. - Separate the handling of threading in "configure.in" from that of server issues, threading is also needed in a non-server build of a thread-safe client library. Also, "libdbug" must get built even in a client-only build, so "dbug/" must be in the list of client directories. In addition, calls to thread functions in source files which can be built without thread support must use the wrapper functions which handle the non-threaded build. So the modules "client/mysqlimport.c" and "client/mysqlslap.c" must call "my_thread_end()" only via "mysql_thread_end()". @ Makefile.am The directories "storage/" and "plugin/" contain files which are needed for the server only, so their contents is to be built only if a server is built. They must not be named unconditionally, because building their contents will fail unless threads are enabled. These directories are now listed in the "configure" variable "sql_server_dirs" which becomes part of "sql_union_dirs" if the server is to be built. @ client/mysqlimport.c Use the wrapper function "mysql_thread_end()" which correctly handles the case of a non-threaded build. @ client/mysqlslap.c Use the wrapper function "mysql_thread_end()" which correctly handles the case of a non-threaded build. @ configure.in Various changes to support builds "--without-server": 1) For the unit tests, we need "libdbug". 2) Separate the treatment of the server from that of the thread-safe client library. 3) Introduce an "automake conditional" "NEED_THREAD" which can be checked in some "Makefile.am". 4) Include "storage/" and "plugin/" in the list of "sql_server_dirs" so that they are handled in the top "Makefile.am" only if the server is to be built (see the change in that file). @ mysys/Makefile.am The code of "mf_keycache.c" in 5.1 is no longer safe to be built without thread support. (In 5.0, this was possible.) Rather than fix these issues, which is tedious and risky, avoid the need to ever build it without thread support: It is needed in the server only, which needs thread support. The only case where we build a "libmysys" without thread support is for a non-threaded client, where "mf_keycache" is not neded. So its inclusion in the list of source files can depend on the new conditional "NEED_THREAD". @ unittest/mysys/Makefile.am Test program "my_atomic-t" is to verify the correct handling of threads only, it cannot be built without thread support and is not needed in such cases either. Let its build depend on the new conditional "NEED_THREAD".
[17 Sep 2009 16:47]
Joerg Bruehe
Pushed into the build team tree, expected to become part of 5.1.40.
[28 Sep 2009 10:50]
Joerg Bruehe
Upmerged into the build team tree, currently labeled 5.4.5-beta.
[1 Oct 2009 21:02]
Bugs System
Pushed into 5.1.40 (revid:joerg@mysql.com-20090928090731-63bocnp8vhwg809y) (version source revid:joerg@mysql.com-20090917163424-nfesqs1inisny2jt) (merge vers: 5.1.40) (pib:11)
[9 Oct 2009 8:47]
Bugs System
Pushed into 6.0.14-alpha (revid:alik@ibmvm-20091009083208-0o0f0i9w1sq3c1kn) (version source revid:joerg@mysql.com-20091002141817-x2fhjck1tv5ej52o) (merge vers: 6.0.14-alpha) (pib:12)
[12 Oct 2009 15:25]
Paul DuBois
Noted in 5.1.40, 5.5.0, 6.0.14 changelogs. The configure option --without-server did not work.
[22 Oct 2009 7:06]
Bugs System
Pushed into 5.5.0-beta (revid:alik@sun.com-20091022060553-znkmxm0g0gm6ckvw) (version source revid:alik@sun.com-20091013094238-g67x6tgdm9a7uik0) (merge vers: 5.5.0-beta) (pib:13)
[22 Oct 2009 19:37]
Paul DuBois
Already noted for 5.5.0.
[18 Dec 2009 10:30]
Bugs System
Pushed into 5.1.41-ndb-7.1.0 (revid:jonas@mysql.com-20091218102229-64tk47xonu3dv6r6) (version source revid:jonas@mysql.com-20091218095730-26gwjidfsdw45dto) (merge vers: 5.1.41-ndb-7.1.0) (pib:15)
[18 Dec 2009 10:46]
Bugs System
Pushed into 5.1.41-ndb-6.2.19 (revid:jonas@mysql.com-20091218100224-vtzr0fahhsuhjsmt) (version source revid:jonas@mysql.com-20091217101452-qwzyaig50w74xmye) (merge vers: 5.1.41-ndb-6.2.19) (pib:15)
[18 Dec 2009 10:49]
MC Brown
Added entry to 5.1.41-ndb-7.1.0
[18 Dec 2009 11:01]
Bugs System
Pushed into 5.1.41-ndb-6.3.31 (revid:jonas@mysql.com-20091218100616-75d9tek96o6ob6k0) (version source revid:jonas@mysql.com-20091217154335-290no45qdins5bwo) (merge vers: 5.1.41-ndb-6.3.31) (pib:15)
[18 Dec 2009 11:15]
Bugs System
Pushed into 5.1.41-ndb-7.0.11 (revid:jonas@mysql.com-20091218101303-ga32mrnr15jsa606) (version source revid:jonas@mysql.com-20091218064304-ezreonykd9f4kelk) (merge vers: 5.1.41-ndb-7.0.11) (pib:15)
[18 Dec 2009 11:44]
MC Brown
Already documented in 5.1.41