灌溉梦想,记录脚步
« »
2013年10月23日技术合集

MySQL在ARM平台上的编译错误一例

由于ARM平台开发板CPU本身处理能力有限,这样在MySQL编译的时候过程非常漫长,更可恶的还出现了错误,如下:

1
2
3
4
5
6
7
8
9
10
[ 68%] Building C object libmysql/CMakeFiles/clientlib.dir/__/sql-common/client_plugin.c.o
/root/lnmp1.0-full/mysql-5.5.28/sql-common/client_plugin.c: In function ‘mysql_client_plugin_init’:
/root/lnmp1.0-full/mysql-5.5.28/sql-common/client_plugin.c:252:5: error: incompatible type for argument 5 of ‘add_plugin’
/root/lnmp1.0-full/mysql-5.5.28/sql-common/client_plugin.c:120:1: note: expected ‘va_list’ but argument is of type ‘int’
/root/lnmp1.0-full/mysql-5.5.28/sql-common/client_plugin.c: In function ‘mysql_client_register_plugin’:
/root/lnmp1.0-full/mysql-5.5.28/sql-common/client_plugin.c:310:5: error: incompatible type for argument 5 of ‘add_plugin’
/root/lnmp1.0-full/mysql-5.5.28/sql-common/client_plugin.c:120:1: note: expected ‘va_list’ but argument is of type ‘int’
make[2]: *** [libmysql/CMakeFiles/clientlib.dir/__/sql-common/client_plugin.c.o] Error 1
make[1]: *** [libmysql/CMakeFiles/clientlib.dir/all] Error 2
make: *** [all] Error 2

处理方法如下应用下面Patch,文件名arm_fix_client_plugin.patch,内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--- mysql-5.5.28.orig/sql-common/client_plugin.c
+++ mysql-5.5.28/sql-common/client_plugin.c
@@ -233,6 +233,7 @@ int mysql_client_plugin_init()
 {
   MYSQL mysql;
   struct st_mysql_client_plugin **builtin;
+  va_list dummy;
 
   if (initialized)
     return 0;
@@ -249,7 +250,7 @@ int mysql_client_plugin_init()
   pthread_mutex_lock(&LOCK_load_client_plugin);
 
   for (builtin= mysql_client_builtins; *builtin; builtin++)
-    add_plugin(&mysql, *builtin, 0, 0, 0);
+    add_plugin(&mysql, *builtin, 0, 0, dummy);
 
   pthread_mutex_unlock(&LOCK_load_client_plugin);
 
@@ -293,6 +294,7 @@ struct st_mysql_client_plugin *
 mysql_client_register_plugin(MYSQL *mysql,
                              struct st_mysql_client_plugin *plugin)
 {
+  va_list dummy;
   if (is_not_initialized(mysql, plugin->name))
     return NULL;
 
@@ -307,7 +309,7 @@ mysql_client_register_plugin(MYSQL *mysq
     plugin= NULL;
   }
   else
-    plugin= add_plugin(mysql, plugin, 0, 0, 0);
+    plugin= add_plugin(mysql, plugin, 0, 0, dummy);
 
   pthread_mutex_unlock(&LOCK_load_client_plugin);
   return plugin;

应用补丁方法:

1
patch -p0 < arm_fix_client_plugin.patch mysql-5.5.28/sql-common/client_plugin.c

日志信息 »

该日志于2013-10-23 21:28由 kevin 发表在技术合集分类下, 你可以发表评论。除了可以将这个日志以保留源地址及作者的情况下引用到你的网站或博客,还可以通过RSS 2.0订阅这个日志的所有评论。

13 条评论

  1. how to order androxal spain over the counter

    how can i order androxal without a perscrption

  2. cheapest buy enclomiphene uk sales

    how to order enclomiphene purchase no prescription

  3. discount rifaximin canadian sales

    purchase rifaximin canada purchase

  4. cheapest buy xifaxan australia purchase

    ordering xifaxan buy in london

  5. canadian pharmacy staxyn scam

    staxyn cod shipping

  6. cheapest buy avodart purchase tablets

    online order avodart canada generic

  7. discount flexeril cyclobenzaprine australia to buy

    discount flexeril cyclobenzaprine canada low cost

  8. how to get it up without dutasteride

    buying dutasteride france where to buy

  9. buy cheap gabapentin cheap sale

    buying gabapentin price by pharmacy

  10. order fildena cheap fast shipping

    online order fildena toronto canada

  11. online order itraconazole cost new zealand

    get itraconazole uk over the counter

  12. kamagra recepty说道:

    koupit kamagra není nutný předpis

    levné kamagra přenocování přes noc

  13. prix le moins cher pour kamagra

    prix bas kamagra

发表回复