用于 Gumstix Overo 和 GumROS 的交叉编译 Boost

发布于 2024-08-26 03:41:22 字数 2905 浏览 5 评论 0原文

我正在尝试交叉编译 boost 以与 Gumstix Overo 上的 ROS 框架一起使用。我一直遵循此处发布的说明(在需要时修改脚本),但是我遇到了 bjam 无法正确编译 boost 的问题。

我按如下方式调用 bjam:

# boost
if [ ! -f /opt/gumros/lib/libboost_date_time-gcc41-mt-1_38.so ] ; then
  if [ ! -f boost_1_38_0.tar.gz ] ; then
    wget --tries=10 http://heanet.dl.sourceforge.net/sourceforge/boost/boost_1_38_0.tar.gz

  fi
#  tar xzf boost_1_38_0.tar.gz
  cd boost_1_38_0
  GPP_PATH=${OVEROTOP}/tmp/cross/armv7a/arm-angstrom-linux-gnueabi/bin/g++
  GPP_VER=`${GPP_PATH} -v 2>&1 | tail -1 | awk '{print $3}'`
  echo "using gcc : ${GPP_VER} : ${GPP_PATH}  ; " > tools/build/v2/user-config.jam
  sudo apt-get install bjam
  set +o errexit
  sudo bjam --toolset=gcc-${GPP_VER} --prefix=/opt/gumros --with-date_time install                  
  set -o errexit
  cd ..
else
  echo "boost appears to be already installed; skipping."
fi
if [ ! -f /opt/gumros/lib/libboost_date_time-gcc41-mt-1_38.so ] ; then
  echo "Failed to compile libboost_date_time";
  exit;
fi

我检查了用户配置以确保一切都正确,并确保 GPP_PATH 正确。但是,当我运行脚本时,我遇到编译错误,例如:

正在阅读软件包列表...完成构建 依赖树读取状态 信息... bjam 已经完成 最新版本。 0 升级, 0 新安装,0 删除,5 不删除 升级了。 ...耐心... ...发现 14370 个目标... ...更新 14 目标... gcc.compile.c++ bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_month.o g++:尝试执行“cc1plus”时出错: execvp:没有这样的文件或目录

“/home/andrew/overo-oe/tmp/cross/armv7a/arm-angstrom-linux-gnueabi/bin/g++”

-ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"。" -c -o“bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_month.o” “libs/date_time/src/gregorian/greg_month.cpp”

...gcc.compile.c++ 失败 bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_month.o... gcc.编译.c++ bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_weekday.o g++:尝试执行“cc1plus”时出错: execvp:没有这样的文件或目录

“/home/andrew/overo-oe/tmp/cross/armv7a/arm-angstrom-linux-gnueabi/bin/g++”

-ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"。" -c -o“bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_weekday.o” “libs/date_time/src/gregorian/greg_weekday.cpp”

...gcc.compile.c++ 失败 bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_weekday.o... gcc.编译.c++ bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/date_generators.o g++:尝试执行“cc1plus”时出错: execvp:没有这样的文件或目录

等...

作为参考,我正在使用本教程来帮助我。 http://www.ros.org/wiki/gumros

I'm trying to cross-compile boost for use with the ROS framework on a Gumstix Overo. I've been following the posted instructions here (modifying the script when need be), however I've come across an issue where bjam will not compile boost properly.

I call bjam as follows:

# boost
if [ ! -f /opt/gumros/lib/libboost_date_time-gcc41-mt-1_38.so ] ; then
  if [ ! -f boost_1_38_0.tar.gz ] ; then
    wget --tries=10 http://heanet.dl.sourceforge.net/sourceforge/boost/boost_1_38_0.tar.gz

  fi
#  tar xzf boost_1_38_0.tar.gz
  cd boost_1_38_0
  GPP_PATH=${OVEROTOP}/tmp/cross/armv7a/arm-angstrom-linux-gnueabi/bin/g++
  GPP_VER=`${GPP_PATH} -v 2>&1 | tail -1 | awk '{print $3}'`
  echo "using gcc : ${GPP_VER} : ${GPP_PATH}  ; " > tools/build/v2/user-config.jam
  sudo apt-get install bjam
  set +o errexit
  sudo bjam --toolset=gcc-${GPP_VER} --prefix=/opt/gumros --with-date_time install                  
  set -o errexit
  cd ..
else
  echo "boost appears to be already installed; skipping."
fi
if [ ! -f /opt/gumros/lib/libboost_date_time-gcc41-mt-1_38.so ] ; then
  echo "Failed to compile libboost_date_time";
  exit;
fi

I've checked the user-config to make sure everything was kosher as well as making sure the GPP_PATH is correct. However, when I run the script I come across compilation errors such as:

Reading package lists... Done Building
dependency tree Reading state
information... Done bjam is already
the newest version. 0 upgraded, 0
newly installed, 0 to remove and 5 not
upgraded. ...patience... ...found
14370 targets... ...updating 14
targets... gcc.compile.c++
bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_month.o
g++: error trying to exec 'cc1plus':
execvp: No such file or directory

"/home/andrew/overo-oe/tmp/cross/armv7a/arm-angstrom-linux-gnueabi/bin/g++"

-ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_month.o"
"libs/date_time/src/gregorian/greg_month.cpp"

...failed gcc.compile.c++
bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_month.o...
gcc.compile.c++
bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_weekday.o
g++: error trying to exec 'cc1plus':
execvp: No such file or directory

"/home/andrew/overo-oe/tmp/cross/armv7a/arm-angstrom-linux-gnueabi/bin/g++"

-ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_weekday.o"
"libs/date_time/src/gregorian/greg_weekday.cpp"

...failed gcc.compile.c++
bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_weekday.o...
gcc.compile.c++
bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/date_generators.o
g++: error trying to exec 'cc1plus':
execvp: No such file or directory

Etc...

For reference, I'm using this tutorial to help me out. http://www.ros.org/wiki/gumros

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

虚拟世界 2024-09-02 03:41:22

手动运行

"/home/andrew/overo-oe/tmp/cross/armv7a/arm-angstrom-linux-gnueabi/bin/g++"
-ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_weekday.o"
"libs/date_time/src/gregorian/greg_weekday.cpp"

会出现同样的错误吗?如果是这样,您的编译器可能安装不正确。

Does running

"/home/andrew/overo-oe/tmp/cross/armv7a/arm-angstrom-linux-gnueabi/bin/g++"
-ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "bin.v2/libs/date_time/build/gcc-4.3.3/release/threading-multi/gregorian/greg_weekday.o"
"libs/date_time/src/gregorian/greg_weekday.cpp"

by hand give the same error? If so, it seems like your compiler might be incorrectly installed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文