Bug #37491 ndbapi-examples build broken by the new library linking changes
Submitted: 18 Jun 2008 18:59 Modified: 22 Oct 2008 13:11
Reporter: Monty Taylor Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:6.2.15 OS:Any
Assigned to: Frazer Clement CPU Architecture:Any

[18 Jun 2008 18:59] Monty Taylor
Description:
The recent changes I made to libtool builds of mysys and mystrings and libndbclient aren't reflected in the ndbapi-examples. They, in fact, no longer build. 

How to repeat:
Try to build an example program. 

Suggested fix:
Make the ndbapi-examples be driven by automake, as the current hard-coded make files are very fragile. 

Make them link the right libraries. 

Additionally - make them be built by default, since they are quick to build, and they will provide an easy smoke test for having broken something. Also, shipping example programs that don't compile is rather embarrassing.
[18 Jun 2008 19:43] 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/48122

2631 Monty Taylor	2008-06-18
      Bug#37491 ndbapi-examples build broken by the new library changes
      
      Put all of ndbapi-examples under automake control. Made the linking
      work appropriately. For now these will all build as part of the normal 
      build but will not install anywhere.
[7 Oct 2008 21:46] Frazer Clement
Grabbing bug to add simpler proposed patch.

Remove include + link of unused libraries.
[7 Oct 2008 21:47] Frazer Clement
Remove unused headers and libraries from Makefiles

Attachment: example_makefiles.patch (text/x-patch), 14.07 KiB.

[8 Oct 2008 9:32] Magnus BlÄudd
Frazer, good cleanup. But unfortunately I think pointing out the .libs dir will only work in a source dist. It's libtool magic in that it puts the libtool wrapper as libxyz.la and then the real libs in .libs

When the "thing" is installed, every library will be in the correct place.

Maybe we can point out both .libs and the "correct" place? Or is this only supposed to build in a source dist?
[16 Oct 2008 11:30] Frazer Clement
I'm not sure what other enviroments these Makefiles should work in.  How would I test this?  make dist + make install?  I must admit to being a bit ignorant about the various ways to obtain and install MySQL.

Looking at it from another angle, I looked at the Makefiles in mysql-5.0 and mysql-5.1 and they also seem to include the libtool 'magic' .libs directories only.  So unless this has not worked since mysql-5.0, I suspect it has never worked other than in a source distribution.  Also, I think that this bug refers to the fact that the examples won't compile in a src distribution, maybe we could raise a separate bug for compiling the examples in other 'configurations'.
[22 Oct 2008 10:32] Frazer Clement
Created new bug # 40238 to cover fixing Makefiles for non source distributions.
[22 Oct 2008 10:39] 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/56792
[22 Oct 2008 10:44] 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/56793
[22 Oct 2008 10:47] 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/56795
[22 Oct 2008 10:53] Frazer Clement
Fix pushed to 6.2.17, 6.3.19, 6.4.0
[22 Oct 2008 13:11] Jon Stephens
Documented bugfix in the ndb-6.2.17 and ndb-6.3.19 changelogs as follows:

        The NDB API examples programs included in MySQL Cluster source
        distributions failed to compile. 

        See also Bug #40238.
[24 Oct 2008 0:49] Bugs System
Pushed into 5.1.28-ndb-6.2.17  (revid:frazer@mysql.com-20081022103854-zvyyj2xoq6blwhaq) (version source revid:frazer@mysql.com-20081022103854-zvyyj2xoq6blwhaq) (pib:5)
[24 Oct 2008 0:49] Bugs System
Pushed into 5.1.28-ndb-6.4.0  (revid:frazer@mysql.com-20081022103854-zvyyj2xoq6blwhaq) (version source revid:frazer@mysql.com-20081022104707-qrvt8s40ww5x1j8b) (pib:5)
[24 Oct 2008 0:50] Bugs System
Pushed into 5.1.28-ndb-6.3.19  (revid:frazer@mysql.com-20081022103854-zvyyj2xoq6blwhaq) (version source revid:frazer@mysql.com-20081022104402-lrktfwngx9jqbegb) (pib:5)
[24 Oct 2008 1:18] Bugs System
Pushed into 5.1.28-ndb-6.3.19  (revid:frazer@mysql.com-20081022103854-zvyyj2xoq6blwhaq) (version source revid:frazer@mysql.com-20081022104402-lrktfwngx9jqbegb) (pib:5)
[12 Dec 2008 23:28] Bugs System
Pushed into 6.0.9-alpha  (revid:frazer@mysql.com-20081022103854-zvyyj2xoq6blwhaq) (version source revid:tomas.ulin@sun.com-20081209185954-9svcixh2p5hsfi6w) (pib:5)