一,编译ncurses

  编译mysql需要依赖ncurses,先编译ncurses

1.下载ncurses

  下载路径是ftp://ftp.gnu.org/gnu/ncurses,选择下载的是ncurses-5.9.tar.gz。

2.解压,配置,编译,安装

  配置参数如下:

./configure --prefix=/home/shawn/AM335x/ncurses \
CC=arm-arago-linux-gnueabi-gcc \
--host=arm-arago-linux-gnueabi \
--enable-static \
--enable-shared

  编译安装,编译完成后,供编译mysql使用。

make
make install

二,编译Mysql

1.下载路径 http://www.mirrorservice.org/sites/ftp.mysql.com/Downloads/MySQL-5.1/

2.选择下载 mysql-5.1.72.tar.gz

3.解压,复制一个mysql-5.1.72-PC,编译一个pc版本的以备后用

4.configure and make

./configure --prefix=/home/shawn/PC/mysql

  执行configure会报错

checking for wctype_t in wctype.h... yes
checking for wint_t in wctype.h... yes
checking for tgetent in -lncursesw... no
checking for tgetent in -lncurses... no
checking for tgetent in -lcurses... no
checking for tgetent in -ltermcap... no
checking for tgetent in -ltinfo... no
checking for termcap functions library... configure: error: No curses/termcap library found
shawn@ubuntu:~/work/mysql-5.1.72-PC$

  原因是缺少ncurses库,安装一下,再次configure

sudo apt-get install libncurses5-dev

  继续报错

config.status: executing libtool commands
/bin/rm: cannot remove 'libtoolT': No such file or directory
config.status: executing default commands Thank you for choosing MySQL! Remember to check the platform specific part of the reference manual
for hints about installing MySQL on your platform.
Also have a look at the files in the Docs directory. shawn@ubuntu:~/work/mysql-5.1.72-PC$

  安装libtool autoconf automake

sudo apt-get install libtool autoconf automake

  执行如下三条命令

autoreconf --force --install
libtoolize --automake --force
automake --force --add-missing

  好吧,我承认,还是没有解决这个问题。。。。。。。先忽略掉。。。。。make,报错

mysql.cc:2687:37: error: invalid conversion from ‘char’ to ‘char*’ [-fpermissive]

  打开client/mysql.cc,2687行 修改代码

field_names[i][num_fields*2]= '\0';
改成
field_names[i][num_fields*2]= "";

  

4.修改congifure,共有四处要修改,使用notepad++修改,在notepad++中,使用Ctrl+G跳到指定行数

//26302行开始的地方
if test "$cross_compiling" = yes; then
echo "skip......"
# { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
#{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
#See \`config.log' for more details." >&5
#$as_echo "$as_me: error: cannot run test program while cross compiling
#See \`config.log' for more details." >&2;}
# { (exit 1); exit 1; }; }; }
else
cat >conftest.$ac_ext <<_ACEOF
//48121开始的地方
if test "$cross_compiling" = yes; then
echo "skip......"
# { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
#{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
#See \`config.log' for more details." >&5
#$as_echo "$as_me: error: cannot run test program while cross compiling
#See \`config.log' for more details." >&2;}
# { (exit 1); exit 1; }; }; }
else
cat >conftest.$ac_ext <<_ACEOF
//48228开始的地方
if test "$cross_compiling" = yes; then
echo "skip......"
# { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
#{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
#See \`config.log' for more details." >&5
#$as_echo "$as_me: error: cannot run test program while cross compiling
#See \`config.log' for more details." >&2;}
# { (exit 1); exit 1; }; }; }
else
cat >conftest.$ac_ext <<_ACEOF
//48442开始的地方
if test "$cross_compiling" = yes; then
echo "skip......"
# { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
#$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
#{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
#See \`config.log' for more details." >&5
#$as_echo "$as_me: error: cannot run test program while cross compiling
#See \`config.log' for more details." >&2;}
# { (exit 1); exit 1; }; }; }
else
cat >conftest.$ac_ext <<_ACEOF

5.配置configure,with-named-curses-libs就是上面ncurses编译出来的路径

./configure --host=arm-arago-linux-gnueabi \
--prefix=/home/shawn/AM335x/mysql \
CC=arm-arago-linux-gnueabi-gcc \
--enable-static \
--with-named-curses-libs=/home/shawn/AM335x/ncurses/lib \
--prefix=/usr/local/mysql \
--without-debug \
--without-docs \
--without-man \
--without-bench \
--with-charset=gb2312 \
--with-extra-charsets=ascii,latin1,utf8

  执行configure的时候,报了如下错误

checking for atomic_cas_32... no
checking for atomic_cas_64... no
checking for atomic_cas_ulong... no
checking for atomic_swap_uchar... no
checking whether pthread_t can be used by Solaris libc atomic functions... configure: error: in `/home/shawn/work/mysql-5.1.72':
configure: error: cannot run test program while cross compiling
See `config.log' for more details.
shawn@ubuntu:~/work/mysql-5.1.72$

  打开同路径下的config.log查看错误,直接搜索error,第一个错误是,a.out不能运行的,忽略掉。

conftest.c:10:28: fatal error: ac_nonexistent.h: No such file or directory

  

移植mysql到ARM(AM335x)的更多相关文章

  1. 移植mysql到嵌入式ARM平台

    移植MySQL到嵌入式ARM平台  MySQL没有专门针对ARM的版本,移植到ARM没有官方文档可参考,因此,暂时参考这样一篇文档: http://blog.chinaunix.net/space.p ...

  2. 成功移植SQLite3到ARM Linux开发板

    SQLite,是一款轻型的数据库,是遵守ACID的关联式数据库管理系统,它的设计目标是嵌入式的,而且目前已经在很多嵌入式产品中使用了它,它占用资源非常的低,在嵌入式设备中,可能只需要几百K的内存就够了 ...

  3. 移植madplay到ARM板

    一.环境和软件介绍 1.主机环境:Ubuntu16.04 2.交叉编译器: gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) 3.ARM板:kernel: ...

  4. 移植vsftpd到arm linux

    vsftpd即very secure FTP daemon(非常安全的FTP进程),是一个基于GPL发布的类UNIX类操作系统上运行的服务器的名字(是一种守护进程),可以运行在诸如Linux.BSD. ...

  5. 如何让移植的嵌入式ARM显示中文汉字

    如果你急于在ARM开发板上看到Qt显示中文,而不介意稍次的效果,可以在运行Qt程序时,增加设置字体的参数,比如运行名为hello的Qt程序:./hello -fn unifont 1.首先,需要文泉驿 ...

  6. 移植openssh到arm linux

    一.在移植之前需要准备做一些前期准备: 1.移植zlib库 1.1获取zlib源码 1.2解压 tar xvf zlib-1.2.11.tar.xz 1.3交叉编译 1.3.1 指定交叉编译器 exp ...

  7. 【转】移植vsftpd到arm linux

    vsftpd即very secure FTP daemon(非常安全的FTP进程),是一个基于GPL发布的类UNIX类操作系统上运行的服务器的名字(是一种守护进程),可以运行在诸如Linux.BSD. ...

  8. 嵌入式linux------ffmpeg移植 编码H264(am335x编码H264)

    [cpp] view plaincopy <pre name="code" class="cpp"><pre name="code& ...

  9. 嵌入式linux------ffmpeg移植 解码H264(am335x解码H264到yuv420并通过SDL显示)

    /* 编译命令:arm-linux-gcc -o show2642 264showyuv2.c -I/usr/local/ffmpeg_arm/include/ -L/usr/local/ffmpeg ...

随机推荐

  1. asp.net,根据gridview 中checkbox复选框选中的行对数据库进行操作

    在asp.net中,使用checkbox,对gridview添加复选框. 多选数据行后,根据已选数据,对原数据进行多条语句查询. string sql = "Select * from 表 ...

  2. Python面面面

    1:Python有哪些特点和优点? 作为一门编程入门语言,Python主要有以下特点和优点: 可解释 具有动态特性 面向对象 简明简单 开源 具有强大的社区支持 当然,实际上Python的优点远不止如 ...

  3. SQL注入之Sqli-labs系列第四十一关(基于堆叠注入的盲注)和四十二关四十三关四十四关四十五关

    0x1普通测试方式 (1)输入and1=1和and1=2测试,返回错误,证明存在注入 (2)union select联合查询 (3)查询表名 (4)其他 payload: ,( ,( 0x2 堆叠注入 ...

  4. PHP博大精深,入门容易,精通难,怎么才能真正学好PHP

    基础最重要  (1)熟悉HTML/CSS/JS等网页基本元素,完成阶段可自行制作完整的网页,对元素属性达到熟悉程度  (2)理解动态语言的概念,运做机制,熟悉PHP语法  (3)学习如何将PHP与HT ...

  5. jQuery-4.动画篇---自定义动画

    jQuery中动画animate(上) 有些复杂的动画通过之前学到的几个动画函数是不能够实现,这时候就需要强大的animate方法了 操作一个元素执行3秒的淡入动画,对比一下2组动画设置的区别 $(e ...

  6. Mathematica求微分换元

    [转载请注明出处]http://www.cnblogs.com/mashiqi 2017/12/16 有时我们需要对PDEs中的各项进行变量替换,比如把$\frac{\text{d}}{\text{d ...

  7. SDKManager无法更新问题解决办法

    用大连东软的镜像代理 配置步骤 启动 Android SDK Manager ,打开主界面,依次选择「Tools」.「Options...」,弹出『Android SDK Manager - Sett ...

  8. 腾讯广告联盟 Android SDK(广点通)demo的使用方式

    1. 下载示例文件. 2. 解压之后的目录: 3. 使用android studio,选择import project,导入如图所示文件夹: 4. 重点来了,由于官方demo的上传时间很久远(大概是上 ...

  9. cocos creator 刚体卡顿问题(边界会卡住)

    **问题描述:**在项目开发中,使用到了刚体, 在搭建地图过程中,发现两个相邻的砖块,即使贴合的再紧密,但星星人在上面走动的时候还是会有很大概率发生卡顿(被两个刚体的边界处卡住).为了解决这个问题,我 ...

  10. 利用Python中的for循环和while循环,打印各种方向的九九乘法表。

    哈喽大家好,今天,可乐来给大家分享一下Python中用for循环和while循环打印九九乘法表的操作.由于本人也是刚刚接触Python不长时间,代码也是自己编写的,所以有什么不足之处还请大家多多指教. ...