Skip site navigation (1)Skip section navigation (2)
Date:      26 Sep 2013 13:47:40 -0000
From:      Michael Gmelin <freebsd@grem.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/182408: [PATCH] databases/mariadb55-server: Allow building mariadb with libc++ and clang
Message-ID:  <20130926134740.75049.qmail@mail.grem.de>
Resent-Message-ID: <201309261350.r8QDo25I057806@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         182408
>Category:       ports
>Synopsis:       [PATCH] databases/mariadb55-server: Allow building mariadb with libc++ and clang
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 26 13:50:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Michael Gmelin
>Release:        FreeBSD 9.1-RELEASE-p2 amd64
>Organization:
Grem Equity GmbH
>Environment:
System: FreeBSD bsd64.grem.de 9.1-RELEASE-p2 FreeBSD 9.1-RELEASE-p2 #5 r249052M: Fri May 31 17:50:16 UTC
>Description:
Those trivial patches allow building mariadb55-server using system
clang and libc++.

CXX=clang++
CXXFLAGS+= -std=c++11 -stdlib=libc++

They're similar to the patches to mysql55-server from last year [1],
plus a few extra spaces around string literals, which are required by
C++11.  Nothing dramatic and no need to bump the revision.

I'm aware of the ongoing work to update the port to 5.5.33a [2], most
likely these patches will still apply and I would appreciate if they
could get committed soon.

[1] http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/171546
[2] http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/182287


Port maintainer (never@nevermind.kiev.ua) is cc'd.

Generated with FreeBSD Port Tools 0.99_7 (mode: change, diff: suffix)
>How-To-Repeat:
>Fix:

--- mariadb-server-5.5.31.patch begins here ---
diff -ruN ../mariadb55-server.orig/files/patch-sql_item_subselect.cc ./files/patch-sql_item_subselect.cc
--- ../mariadb55-server.orig/files/patch-sql_item_subselect.cc	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-sql_item_subselect.cc	2013-09-26 15:24:02.000000000 +0200
@@ -0,0 +1,11 @@
+--- sql/item_subselect.cc.orig	2013-05-21 22:09:51.000000000 +0000
++++ sql/item_subselect.cc	2013-09-26 13:13:01.105197491 +0000
+@@ -1317,7 +1317,7 @@
+   Item_subselect()
+ {
+   DBUG_ENTER("Item_exists_subselect::Item_exists_subselect");
+-  bool val_bool();
++//  bool val_bool();
+   init(select_lex, new select_exists_subselect(this));
+   max_columns= UINT_MAX;
+   null_value= FALSE; //can't be NULL
diff -ruN ../mariadb55-server.orig/files/patch-sql_sql_trigger.cc ./files/patch-sql_sql_trigger.cc
--- ../mariadb55-server.orig/files/patch-sql_sql_trigger.cc	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-sql_sql_trigger.cc	2013-09-26 15:24:02.000000000 +0200
@@ -0,0 +1,50 @@
+--- sql/sql_trigger.cc.orig	2013-05-21 22:09:51.000000000 +0000
++++ sql/sql_trigger.cc	2013-09-26 13:15:55.450195525 +0000
+@@ -192,32 +192,32 @@
+ {
+   {
+     { C_STRING_WITH_LEN("triggers") },
+-    my_offsetof(class Table_triggers_list, definitions_list),
++    static_cast<int>(my_offsetof(class Table_triggers_list, definitions_list)),
+     FILE_OPTIONS_STRLIST
+   },
+   {
+     { C_STRING_WITH_LEN("sql_modes") },
+-    my_offsetof(class Table_triggers_list, definition_modes_list),
++    static_cast<int>(my_offsetof(class Table_triggers_list, definition_modes_list)),
+     FILE_OPTIONS_ULLLIST
+   },
+   {
+     { C_STRING_WITH_LEN("definers") },
+-    my_offsetof(class Table_triggers_list, definers_list),
++    static_cast<int>(my_offsetof(class Table_triggers_list, definers_list)),
+     FILE_OPTIONS_STRLIST
+   },
+   {
+     { C_STRING_WITH_LEN("client_cs_names") },
+-    my_offsetof(class Table_triggers_list, client_cs_names),
++    static_cast<int>(my_offsetof(class Table_triggers_list, client_cs_names)),
+     FILE_OPTIONS_STRLIST
+   },
+   {
+     { C_STRING_WITH_LEN("connection_cl_names") },
+-    my_offsetof(class Table_triggers_list, connection_cl_names),
++    static_cast<int>(my_offsetof(class Table_triggers_list, connection_cl_names)),
+     FILE_OPTIONS_STRLIST
+   },
+   {
+     { C_STRING_WITH_LEN("db_cl_names") },
+-    my_offsetof(class Table_triggers_list, db_cl_names),
++    static_cast<int>(my_offsetof(class Table_triggers_list, db_cl_names)),
+     FILE_OPTIONS_STRLIST
+   },
+   { { 0, 0 }, 0, FILE_OPTIONS_STRING }
+@@ -226,7 +226,7 @@
+ File_option sql_modes_parameters=
+ {
+   { C_STRING_WITH_LEN("sql_modes") },
+-  my_offsetof(class Table_triggers_list, definition_modes_list),
++  static_cast<int>(my_offsetof(class Table_triggers_list, definition_modes_list)),
+   FILE_OPTIONS_ULLLIST
+ };
+ 
diff -ruN ../mariadb55-server.orig/files/patch-sql_sql_view.cc ./files/patch-sql_sql_view.cc
--- ../mariadb55-server.orig/files/patch-sql_sql_view.cc	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-sql_sql_view.cc	2013-09-26 15:24:02.000000000 +0200
@@ -0,0 +1,63 @@
+--- sql/sql_view.cc.orig	2013-05-21 22:09:51.000000000 +0000
++++ sql/sql_view.cc	2013-09-26 13:16:16.065195172 +0000
+@@ -742,46 +742,46 @@
+ */
+ static File_option view_parameters[]=
+ {{{ C_STRING_WITH_LEN("query")},
+-  my_offsetof(TABLE_LIST, select_stmt),
++  static_cast<int>(my_offsetof(TABLE_LIST, select_stmt)),
+   FILE_OPTIONS_ESTRING},
+  {{ C_STRING_WITH_LEN("md5")},
+-  my_offsetof(TABLE_LIST, md5),
++  static_cast<int>(my_offsetof(TABLE_LIST, md5)),
+   FILE_OPTIONS_STRING},
+  {{ C_STRING_WITH_LEN("updatable")},
+-  my_offsetof(TABLE_LIST, updatable_view),
++  static_cast<int>(my_offsetof(TABLE_LIST, updatable_view)),
+   FILE_OPTIONS_ULONGLONG},
+  {{ C_STRING_WITH_LEN("algorithm")},
+-  my_offsetof(TABLE_LIST, algorithm),
++  static_cast<int>(my_offsetof(TABLE_LIST, algorithm)),
+   FILE_OPTIONS_VIEW_ALGO},
+  {{ C_STRING_WITH_LEN("definer_user")},
+-  my_offsetof(TABLE_LIST, definer.user),
++  static_cast<int>(my_offsetof(TABLE_LIST, definer.user)),
+   FILE_OPTIONS_STRING},
+  {{ C_STRING_WITH_LEN("definer_host")},
+-  my_offsetof(TABLE_LIST, definer.host),
++  static_cast<int>(my_offsetof(TABLE_LIST, definer.host)),
+   FILE_OPTIONS_STRING},
+  {{ C_STRING_WITH_LEN("suid")},
+-  my_offsetof(TABLE_LIST, view_suid),
++  static_cast<int>(my_offsetof(TABLE_LIST, view_suid)),
+   FILE_OPTIONS_ULONGLONG},
+  {{ C_STRING_WITH_LEN("with_check_option")},
+-  my_offsetof(TABLE_LIST, with_check),
++  static_cast<int>(my_offsetof(TABLE_LIST, with_check)),
+   FILE_OPTIONS_ULONGLONG},
+  {{ C_STRING_WITH_LEN("timestamp")},
+-  my_offsetof(TABLE_LIST, timestamp),
++  static_cast<int>(my_offsetof(TABLE_LIST, timestamp)),
+   FILE_OPTIONS_TIMESTAMP},
+  {{ C_STRING_WITH_LEN("create-version")},
+-  my_offsetof(TABLE_LIST, file_version),
++  static_cast<int>(my_offsetof(TABLE_LIST, file_version)),
+   FILE_OPTIONS_ULONGLONG},
+  {{ C_STRING_WITH_LEN("source")},
+-  my_offsetof(TABLE_LIST, source),
++  static_cast<int>(my_offsetof(TABLE_LIST, source)),
+   FILE_OPTIONS_ESTRING},
+  {{(char*) STRING_WITH_LEN("client_cs_name")},
+-  my_offsetof(TABLE_LIST, view_client_cs_name),
++  static_cast<int>(my_offsetof(TABLE_LIST, view_client_cs_name)),
+   FILE_OPTIONS_STRING},
+  {{(char*) STRING_WITH_LEN("connection_cl_name")},
+-  my_offsetof(TABLE_LIST, view_connection_cl_name),
++  static_cast<int>(my_offsetof(TABLE_LIST, view_connection_cl_name)),
+   FILE_OPTIONS_STRING},
+  {{(char*) STRING_WITH_LEN("view_body_utf8")},
+-  my_offsetof(TABLE_LIST, view_body_utf8),
++  static_cast<int>(my_offsetof(TABLE_LIST, view_body_utf8)),
+   FILE_OPTIONS_ESTRING},
+  {{NullS, 0},			0,
+   FILE_OPTIONS_STRING}
diff -ruN ../mariadb55-server.orig/files/patch-storage_federated_ha_federated.cc ./files/patch-storage_federated_ha_federated.cc
--- ../mariadb55-server.orig/files/patch-storage_federated_ha_federated.cc	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-storage_federated_ha_federated.cc	2013-09-26 15:24:02.000000000 +0200
@@ -0,0 +1,11 @@
+--- storage/federated/ha_federated.cc.orig	2013-05-21 22:09:48.000000000 +0000
++++ storage/federated/ha_federated.cc	2013-09-26 13:18:11.788196007 +0000
+@@ -828,7 +828,7 @@
+         user:@hostname:port/db/table
+         Then password is a null string, so set to NULL
+       */
+-      if ((share->password[0] == '\0'))
++      if (share->password[0] == '\0')
+         share->password= NULL;
+     }
+     else
diff -ruN ../mariadb55-server.orig/files/patch-storage_pbxt_src_index_xt.cc ./files/patch-storage_pbxt_src_index_xt.cc
--- ../mariadb55-server.orig/files/patch-storage_pbxt_src_index_xt.cc	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-storage_pbxt_src_index_xt.cc	2013-09-26 15:24:02.000000000 +0200
@@ -0,0 +1,11 @@
+--- storage/pbxt/src/index_xt.cc.orig	2013-05-21 22:09:51.000000000 +0000
++++ storage/pbxt/src/index_xt.cc	2013-09-26 13:09:54.533196113 +0000
+@@ -3719,7 +3719,7 @@
+ 	}
+ 	printf("\n-----------------------------\n");
+ 	printf("used blocks %d + free blocks %d = %d\n", block_count, free_count, block_count + free_count);
+-	printf("EOF = %"PRIu64", total blocks = %d\n", (xtWord8) xt_ind_node_to_offset(tab, tab->tab_ind_eof), (int) (XT_NODE_ID(tab->tab_ind_eof) - 1));
++	printf("EOF = %" PRIu64 ", total blocks = %d\n", (xtWord8) xt_ind_node_to_offset(tab, tab->tab_ind_eof), (int) (XT_NODE_ID(tab->tab_ind_eof) - 1));
+ 	printf("-----------------------------\n");
+ 	xt_unlock_mutex_ns(&tab->tab_ind_lock);
+ #ifdef TRACK_ACTIVITY
diff -ruN ../mariadb55-server.orig/files/patch-storage_pbxt_src_strutil_xt.cc ./files/patch-storage_pbxt_src_strutil_xt.cc
--- ../mariadb55-server.orig/files/patch-storage_pbxt_src_strutil_xt.cc	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-storage_pbxt_src_strutil_xt.cc	2013-09-26 15:24:02.000000000 +0200
@@ -0,0 +1,29 @@
+--- storage/pbxt/src/strutil_xt.cc.orig	2013-09-26 13:10:48.000000000 +0000
++++ storage/pbxt/src/strutil_xt.cc	2013-09-26 13:11:00.930195669 +0000
+@@ -282,7 +282,7 @@
+ 	if (!*ptr)
+ 		value = (xtInt8) 0;
+ 	else {
+-		sscanf(ptr, "%"PRId64, &value);
++		sscanf(ptr, "%" PRId64, &value);
+ 		if (!value && overflow)
+ 			*overflow = TRUE;
+ 	}
+@@ -291,7 +291,7 @@
+ 
+ xtPublic void xt_int8_to_str(xtInt8 value, char *string)
+ {
+-	sprintf(string, "%"PRId64, value);
++	sprintf(string, "%" PRId64, value);
+ }
+ 
+ xtPublic void xt_double_to_str(double value, int scale, char *string)
+@@ -374,7 +374,7 @@
+ 	}
+ 	
+ 	xt_double_to_str(v, 2, val_str);
+-	sprintf(string, "%s %s (%"PRId64" bytes)", val_str, unit, value);
++	sprintf(string, "%s %s (%" PRId64 " bytes)", val_str, unit, value);
+ }
+ 
+ /* Version number must also be set in configure.in! */
diff -ruN ../mariadb55-server.orig/files/patch-storage_pbxt_src_util_xt.cc ./files/patch-storage_pbxt_src_util_xt.cc
--- ../mariadb55-server.orig/files/patch-storage_pbxt_src_util_xt.cc	1970-01-01 01:00:00.000000000 +0100
+++ ./files/patch-storage_pbxt_src_util_xt.cc	2013-09-26 15:24:02.000000000 +0200
@@ -0,0 +1,11 @@
+--- storage/pbxt/src/util_xt.cc.orig	2013-05-21 22:09:48.000000000 +0000
++++ storage/pbxt/src/util_xt.cc	2013-09-26 13:11:28.416414639 +0000
+@@ -395,7 +395,7 @@
+ {
+ 	char buffer[200];
+ 
+-	sprintf(buffer, "%"PRId64, val);
++	sprintf(buffer, "%" PRId64, val);
+ 	return xt_sb_concat(self, dbuf, buffer);
+ }
+ 
--- mariadb-server-5.5.31.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130926134740.75049.qmail>