搜索

作者简历和生物 夫妇对我的爱好有关的文章 - 机器人
我关于移民澳洲的印象。在俄罗斯只。 为解决日常问题的食谱
Linux相关的职位 Windows相关的职位
软件相关的职位 很多有关硬件的信息
不同的工具,你可能会发现非常有用 关于各种Web技术的文章
一切不符合其余菜单 此博客的RSS饲料

标签云

档案

链接

安德烈Mikhalchuk的博客

English flagItalian flagKorean flagChinese (Simplified) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flagRussian flagDanish flagFinnish flagHebrew flag

Technoblog关于生活

2009年06月3,解决libopenocd.so:未定义引用在openocd的编译`FT_GetLatencyTimer“问题

如果你敢openocd的建立SVN主干和幸运,有一个USB JTAG适配器有一个很好的机会,你会看到类似

/bin/sh ../libtool --tag=CC --mode=link gcc -std=gnu99 -g -O2 -I/root/Distr/ftd2/libftd2xx0.4.16 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -o openocd main.o libopenocd.la -ldl /root/Distr/ftd2/libftd2xx0.4.16/static_lib/libftd2xx.a.0.4.16 -lpthread
libtool: link: gcc -std=gnu99 -g -O2 -I/root/Distr/ftd2/libftd2xx0.4.16 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -o .libs/openocd main.o /root/Distr/ftd2/libftd2xx0.4.16/static_lib/libftd2xx.a.0.4.16 ./.libs/libopenocd.so -ldl -lpthread
./.libs/libopenocd.so: undefined reference to `FT_GetLatencyTimer'
./.libs/libopenocd.so: undefined reference to `FT_Close'
./.libs/libopenocd.so: undefined reference to `FT_SetBitMode'
./.libs/libopenocd.so: undefined reference to `FT_GetDeviceInfo'
./.libs/libopenocd.so: undefined reference to `FT_OpenEx'
./.libs/libopenocd.so: undefined reference to `FT_Read'
./.libs/libopenocd.so: undefined reference to `FT_SetTimeouts'
./.libs/libopenocd.so: undefined reference to `FT_SetVIDPID'
./.libs/libopenocd.so: undefined reference to `FT_Write'
./.libs/libopenocd.so: undefined reference to `FT_SetLatencyTimer'
./.libs/libopenocd.so: undefined reference to `FT_ListDevices'
./.libs/libopenocd.so: undefined reference to `FT_Purge'

这里是如何解决这个问题:


如果你仔细看看日志的前几行,你会看到问题的原因是libtool的输出。 如果您手动交换的命令。/ .libs / libopenocd.so和libftd2xx.a.0.4.16,它会工作得很好。 我花了一些时间,试图修复出现故障的libtool脚本与openocd的,但finelly意识到我懒得了解shell脚本代码9000 almore破碎的逻辑和实施可能我曾经做过的最愚蠢的补丁。 所以要解决问题的libtool脚本在openocd的源代码树(不是在/ usr / lib中),去某处neare线8044。 你会发现像这样的一行:

*) new_libs="$new_libs $deplib" ;;
esac
done
compile_deplibs="$new_libs"
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"

对这些行后添加以下代码:

if test x"$compile_command" = x"gcc -std=gnu99 -g -O2 -I/root/Distr/ftd2/libftd2xx0.4.16 -Wall -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -o @OUTPUT@ main.o /root/Distr/ftd2/libftd2xx0.4.16/static_lib/libftd2xx.a.0.4.16 ./.libs/libopenocd.so -ldl -lpthread"; then
compile_command='gcc -std=gnu99 -g -O2 -I/root/Distr/ftd2/libftd2xx0.4.16 -Wall-Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -o @OUTPUT@ main.o ./.libs/libopenocd.so /root/Distr/ftd2/libftd2xx0.4.16/static_lib/libftd2xx.a.0.4.16 -ldl -lpthread'
fi

... ...或类似的东西线以上,充分代表你的源代码布局和版本。 运行后,这个mod,一切都应该编译就好了。 这是愚蠢的。 但它的工作!!

哦,是的,还有一件事。 如果你会看到此错误:

openocd.texi:12: @include `version.texi': No such file or directory.

然后创建与此内容的文件,DOC / version.texi:

@set UPDATED 20 January 2009
@set UPDATED-MONTH January 2009
@set EDITION 0.1.0
@set VERSION 0.1.0

Ufff ... ...我希望的,除非他们将在这个出色的软件实现更多的错误。

这是一篇发表在硬件Linux的

没有评论

到目前为止没有评论

留下!

网站地图 (C)2005-2008安德烈Mikhalchuk