0

注意:我也在这里为 xgo 创建了这个问题,但我认为它可能更适合作为 SO 问题。

我正在尝试交叉编译我的 go 应用程序,其中一个依赖项是 alsa.lib。我无法使用 xgo 成功编译它。

最初我尝试使用此命令:

xgo --targets=linux/*,windows/*,darwin/* -deps=ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.8.tar.bz2 github.com/Lynges/susimup

这产生了这个错误:

/deps-build/alsa-lib-1.1.8/src/pcm/pcm_softvol.c:856: undefined reference to 'pow' 
collect2: error: ld returned 1 exit status 
2019/04/11 22:51:27 Failed to cross compile package: exit status 2

因此,我添加了depsargsto get--with-softfloat并将其移至一个新错误:

/deps-build/alsa-lib-1.1.8/src/pcm/pcm_meter.c:674: undefined reference to `dlsym'
collect2: error: ld returned 1 exit status

这就是我现在卡住的地方。我尝试添加更多参数,如对此答案的评论中提到的,但这只是给了我一个警告:

configure: WARNING: unrecognized options: --disable-alsamixer, --disable-xmto, --disable-nls, --disable-bat

所以现在我真的不知道该怎么办。我只想交叉编译我非常简单的 arm 应用程序,以便可以在 Raspberry pi 上使用它。

4

0 回答 0