doubian19900911 2019-04-12 16:40
浏览 101

xgo交叉编译不适用于alsa-lib

Note: I have also created this as an issue for xgo here, but I thought it might be better suited as an SO question.

I am trying to cross compile my go application and one of the dependencies is the alsa.lib. I cannot get this to sucessfully compile using xgo.

Initially I tried with this command:

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

And that produced this error:

/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

So then I added the depsargs to get --with-softfloat and that moved it along to a new error:

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

And that is where I am stuck now. I have tried adding some more arguments like mentioned in the comment to this answer, but that just gave me a warning:

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

So now I really have no idea what to do. I just want to cross compile my very simple app for arm so that it may be used on a Raspberry pi.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 keil的map文件中Image component sizes各项意思
    • ¥30 BC260Y用MQTT向阿里云发布主题消息一直错误
    • ¥20 求个正点原子stm32f407开发版的贪吃蛇游戏
    • ¥15 划分vlan后,链路不通了?
    • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
    • ¥15 Vue3 大型图片数据拖动排序
    • ¥15 Centos / PETGEM
    • ¥15 划分vlan后不通了
    • ¥20 用雷电模拟器安装百达屋apk一直闪退
    • ¥15 算能科技20240506咨询(拒绝大模型回答)