baidu_28599319 2017-10-13 03:32 采纳率: 0%
浏览 2447

Mysql5.7.19交叉编译用于移植ARM时编译出现问题,求助

ometry/util/math.hpp:28,
from /root/work/mysql-arm/sql/gis_bg_traits.h:38,
from /root/work/mysql-arm/sql/item_geofunc_internal.h:35,
from /root/work/mysql-arm/sql/geometry_rtree.cc:16:
/usr/bin/locale:16:279: error: expected declaration before ‘}’ token
make[2]: *** [sql/CMakeFiles/sql.dir/geometry_rtree.cc.o] Error 1
make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2
make: *** [all] Error 2

源码是mysql-boost-5.7.19.tar.gz
位将源码解压复制成两份,mysql-64/ 、 mysql-arm。一份用于CentOs64位上gcc编译,一份用于交叉编译。编译到45%左右死活过不去。求解

贴上错误log
[ 45%] Building CXX object sql/CMakeFiles/sql.dir/geometry_rtree.cc.o
In file included from /usr/bin/boost/lexical_cast/detail/converter_lexical_streams.hpp:43:0,
from /usr/bin/boost/lexical_cast/detail/converter_lexical.hpp:54,
from /usr/bin/boost/lexical_cast/try_lexical_convert.hpp:35,
from /usr/bin/boost/lexical_cast.hpp:32,
from /usr/bin/boost/math/constants/constants.hpp:18,
from /root/work/mysql-arm/include/boost_1_59_0/patches/boost/geometry/util/math.hpp:28,
from /root/work/mysql-arm/sql/gis_bg_traits.h:38,
from /root/work/mysql-arm/sql/item_geofunc_internal.h:35,
from /root/work/mysql-arm/sql/geometry_rtree.cc:16:
/usr/bin/locale:1:1: error: stray â\177â in program
^?ELF^B^A^Aso.2^BX W H|$^HèúÿÿLÿè[^F^C¾ÿÿÿÿé^FÿÿÿHëéîþÿÿff.^O^_tDÀt@Áà^L%^Oÿ^OÐÆ^AHÁ^A^U _ ëÀHÛ^OÎýÿÿIÅé^Cþÿÿ1Òé.ÿÿÿ^U^ HPßÿÿLßÿÿLêL)úLù¿@[@I6Hßÿÿ¿
^
/usr/bin/locale:1:1: error: stray â\2â in program

./usr/bin/locale:1:1: error: stray â\2â in program
/usr/bin/locale:1:1: error: stray â\1â in program
/usr/bin/locale:1:1: error: stray â\1â in program
/usr/bin/locale:1:8: warning: null character(s) ignored [enabled by default]
/usr/bin/locale:1:1: error: stray â\2â in program
/usr/bin/locale:1:18: warning: null character(s) ignored [enabled by default]
/usr/bin/locale:1:20: warning: null character(s) ignored [enabled by default]
/usr/bin/locale:1:1: error: stray â\1â in program
/usr/bin/locale:1:22: warning: null character(s) ignored [enabled by default]
/usr/bin/locale:1:27: error: stray â@â in program
/usr/bin/locale:1:28: warning: null character(s) ignored [enabled by default]
/usr/bin/locale:1:33: error: stray â@â in program
/usr/bin/locale:1:34: warning: null character(s) ignored [enabled by default]
/usr/bin/locale:1:1: error: stray â\330â in program
/usr/bin/locale:1:1: error: stray â\217â in program
/usr/bin/locale:1:43: warning: null character(s) ignored [enabled by default]
/usr/bin/locale:1:53: error: stray â@â in program
/usr/bin/locale:1:54: warning: null character(s) ignored [enabled by default]
/usr/bin/locale:1:56: warning: null character(s) ignored [enabled by default]
/usr/bin/locale:1:59: error: stray â@â in program
/usr/bin/locale:1:60: warning: null character(s) ignored [enabled by default]
/usr/bin/locale:1:1: error: stray â\35â in program
.
.
.
.
.
.

.
from /usr/bin/boost/lexical_cast/try_lexical_convert.hpp:35,
from /usr/bin/boost/lexical_cast.hpp:32,
from /usr/bin/boost/math/constants/constants.hpp:18,
from /root/work/mysql-arm/include/boost_1_59_0/patches/boost/geometry/util/math.hpp:28,
from /root/work/mysql-arm/sql/gis_bg_traits.h:38,
from /root/work/mysql-arm/sql/item_geofunc_internal.h:35,
from /root/work/mysql-arm/sql/geometry_rtree.cc:16:
/usr/bin/locale:5:721: error: ‘libc’ does not name a type
In file included from /usr/bin/boost/lexical_cast/detail/converter_lexical_streams.hpp:43:0,
from /usr/bin/boost/lexical_cast/detail/converter_lexical.hpp:54,
from /usr/bin/boost/lexical_cast/try_lexical_convert.hpp:35,
from /usr/bin/boost/lexical_cast.hpp:32,
from /usr/bin/boost/math/constants/constants.hpp:18,
from /root/work/mysql-arm/include/boost_1_59_0/patches/boost/geometry/util/math.hpp:28,
from /root/work/mysql-arm/sql/gis_bg_traits.h:38,
from /root/work/mysql-arm/sql/item_geofunc_internal.h:35,
from /root/work/mysql-arm/sql/geometry_rtree.cc:16:
/usr/bin/locale:12:234: error: expected unqualified-id before numeric constant
In file included from /usr/bin/boost/lexical_cast/detail/converter_lexical_streams.hpp:43:0,
from /usr/bin/boost/lexical_cast/detail/converter_lexical.hpp:54,
from /usr/bin/boost/lexical_cast/try_lexical_convert.hpp:35,
from /usr/bin/boost/lexical_cast.hpp:32,
from /usr/bin/boost/math/constants/constants.hpp:18,
from /root/work/mysql-arm/include/boost_1_59_0/patches/boost/geometry/util/math.hpp:28,
from /root/work/mysql-arm/sql/gis_bg_traits.h:38,
from /root/work/mysql-arm/sql/item_geofunc_internal.h:35,
from /root/work/mysql-arm/sql/geometry_rtree.cc:16:
/usr/bin/locale:16:279: error: expected declaration before ‘}’ token
make[2]: *** [sql/CMakeFiles/sql.dir/geometry_rtree.cc.o] Error 1
make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2
make: *** [all] Error 2

  • 写回答

1条回答

  • baidu_28599319 2017-10-23 08:58
    关注

    已解决,编译时调用到的locale路径错误,被调用到的locale是二进制文件,系统语音与地区的执行程序。实际上应该是/usr/include/c++/4.8.5/locale 这个头文件。我直接把这个文件拷贝过来,编译就过了。

    评论

报告相同问题?

悬赏问题

  • ¥35 平滑拟合曲线该如何生成
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站