Bug #49898 Fix for bug#37408 introduces a linker error
Submitted: 23 Dec 2009 19:19 Modified: 12 Mar 2010 15:41
Reporter: Joerg Bruehe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S2 (Serious)
Version:5.5.1-m2 OS:MacOS (10.5 + 10.6)
Assigned to: Satya B CPU Architecture:Any

[23 Dec 2009 19:19] Joerg Bruehe
Description:
See entry in bug#37408:
That fix introduced a linker problem, the message is:

ld: duplicate symbol _THR_LOCK_myisam_mmap in ../../mysys/libmysys.a(my_thr_init.o) and libmyisam.a(mi_static.o)

This is to be expected, because part of this fix is the following change:
=== modified file 'myisam/mi_static.c'
--- myisam/mi_static.c  2009-10-27 13:11:06 +0000
+++ myisam/mi_static.c  2009-12-17 11:25:50 +0000
@@ -40,7 +40,8 @@ ulong myisam_concurrent_insert= 0;
 my_off_t myisam_max_temp_length= MAX_FILE_SIZE;
 ulong    myisam_bulk_insert_tree_size=8192*1024;
 ulong    myisam_data_pointer_size=4;
-
+ulonglong    myisam_mmap_size= SIZE_T_MAX, myisam_mmap_used= 0;
+pthread_mutex_t  THR_LOCK_myisam_mmap;

 static int always_valid(const char *filename __attribute__((unused)))
 {

This new declaration of the variable conflicts with the existing declarations in include/myisam.h and mysys/my_thr_init.c

How to repeat:
Try to build on OS X 10.5 or 10.6, x86 or x86_64.

Suggested fix:
Don't introduce a duplicated variable.
[23 Dec 2009 19:21] Joerg Bruehe
Until this bug is fixed, we cannot build binaries for OS X 10.5 and 10.6.
[24 Dec 2009 6:23] Satya B
Joerg,

you are absolutely right. Fixing this asap.
[24 Dec 2009 6:33] 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/95616

2830 Satya B	2009-12-24
      Bug#49898 - Fix for bug#37408 introduces a linker error
      
      the declaration of THR_LOCK_myisam_mmap in mi_static 
      is redundant as it accessible via the extern declaration 
      in include/myisam.h
     @ myisam/mi_static.c
        Bug#49898 - Fix for bug#37408 introduces a linker error
        
        Remove THR_LOCK_myisam_mmap declaration as it is redundant
[24 Dec 2009 7:10] 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/95622

2932 Alexander Nozdrin	2009-12-24
      Postfix for Bug#37408 (fix for Bug#49898).
[24 Dec 2009 7:50] Alexander Nozdrin
Queued into 5.0-bugteam, merged into 5.1-bugteam, mysql-pe.

Pushed into mysql-trunk.
[8 Jan 2010 21:05] Paul DuBois
No changelog entry needed. (I don't think this appears in any released version.)
[14 Jan 2010 8:26] Bugs System
Pushed into 5.0.90 (revid:joro@sun.com-20100114082402-05fod2h6z9x9wok8) (version source revid:satya.bn@sun.com-20091224063229-csej9q00g6y7504i) (merge vers: 5.0.89) (pib:16)
[15 Jan 2010 0:25] Bugs System
Pushed into 5.5.2-m2 (revid:build@mysql.com-20100115001040-7nxzvnnng1c1qhep) (version source revid:build@mysql.com-20100115001040-7nxzvnnng1c1qhep) (merge vers: 5.5.2-m2) (pib:16)
[15 Jan 2010 8:58] Bugs System
Pushed into 5.1.43 (revid:joro@sun.com-20100115085139-qkh0i0fpohd9u9p5) (version source revid:satya.bn@sun.com-20091224063431-q7xgol24ufqysp8t) (merge vers: 5.1.42) (pib:16)
[15 Jan 2010 13:56] MC Brown
No changelog entry needed. (
[5 Feb 2010 11:45] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100204063540-9czpdmpixi3iw2yb) (version source revid:alik@sun.com-20100119163614-172adculixyu26j5) (pib:16)
[5 Feb 2010 11:52] Bugs System
Pushed into 6.0.14-alpha (revid:alik@sun.com-20100205113942-oqovjy0eoqbarn7i) (version source revid:alfranio.correia@sun.com-20100121210527-rbuheu5rnsmcakh1) (merge vers: 5.5.99-m3) (pib:16)
[5 Feb 2010 11:58] Bugs System
Pushed into 5.5.2-m2 (revid:alik@sun.com-20100203172258-1n5dsotny40yufxw) (version source revid:alexey.kopytov@sun.com-20091225105650-qletdbs0wz9sx5nc) (merge vers: 5.5.1-m2) (pib:16)
[12 Mar 2010 14:16] Bugs System
Pushed into 5.1.44-ndb-7.0.14 (revid:jonas@mysql.com-20100312135944-t0z8s1da2orvl66x) (version source revid:jonas@mysql.com-20100312115609-woou0te4a6s4ae9y) (merge vers: 5.1.44-ndb-7.0.14) (pib:16)
[12 Mar 2010 14:32] Bugs System
Pushed into 5.1.44-ndb-6.2.19 (revid:jonas@mysql.com-20100312134846-tuqhd9w3tv4xgl3d) (version source revid:jonas@mysql.com-20100312060623-mx6407w2vx76h3by) (merge vers: 5.1.44-ndb-6.2.19) (pib:16)
[12 Mar 2010 14:37] MC Brown
No changelog entry needed.
[12 Mar 2010 14:48] Bugs System
Pushed into 5.1.44-ndb-6.3.33 (revid:jonas@mysql.com-20100312135724-xcw8vw2lu3mijrhn) (version source revid:jonas@mysql.com-20100312103652-snkltsd197l7q2yg) (merge vers: 5.1.44-ndb-6.3.33) (pib:16)
[12 Mar 2010 15:41] MC Brown
No changelog entry needed.