您尚未登录。

楼主 #1 2021-02-11 09:41:02

zhuacai
会员
注册时间: 2017-12-16
已发帖子: 234
积分: 233.5

v3s 编译tinyalsa 成arm-linux 静态链接版本,出错请大神帮忙看看!!

easyboard@V3S:~/corelinux/tools$ git clone https://github.com/tinyalsa/tinyalsa.git
正克隆到 'tinyalsa'...
remote: Enumerating objects: 186, done.
remote: Counting objects: 100% (186/186), done.
remote: Compressing objects: 100% (106/106), done.
remote: Total 2722 (delta 106), reused 133 (delta 72), pack-reused 2536
接收对象中: 100% (2722/2722), 742.66 KiB | 1.02 MiB/s, 完成.
处理 delta 中: 100% (1419/1419), 完成.
easyboard@V3S:~/corelinux/tools$
easyboard@V3S:~/corelinux/tools$
easyboard@V3S:~/corelinux/tools$ ls
qt-opensource-linux-x64-5.13.1.run  tinyalsa  笔记.txt
easyboard@V3S:~/corelinux/tools$ cd tinyalsa/
easyboard@V3S:~/corelinux/tools/tinyalsa$ ls
Android.bp      examples     meson_options.txt   README.md  WORKSPACE
BUILD           include      METADATA            scripts
CMakeLists.txt  LICENSE      MODULE_LICENSE_BSD  src
debian          Makefile     NOTICE              tests
doxygen         meson.build  OWNERS              utils
easyboard@V3S:~/corelinux/tools/tinyalsa$ vi Makefile
easyboard@V3S:~/corelinux/tools/tinyalsa$
easyboard@V3S:~/corelinux/tools/tinyalsa$
easyboard@V3S:~/corelinux/tools/tinyalsa$ CROSS_COMPILE=arm-linux- make
make -C src
make[1]: 进入目录“/home/easyboard/corelinux/tools/tinyalsa/src”
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC    -c -o limits.o limits.c
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC    -c -o mixer.o mixer.c
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC    -c -o pcm.o pcm.c
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC    -c -o pcm_plugin.o pcm_plugin.c
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC    -c -o pcm_hw.o pcm_hw.c
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC    -c -o snd_card_plugin.o snd_card_plugin.c
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC    -c -o mixer_plugin.o mixer_plugin.c
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC    -c -o mixer_hw.o mixer_hw.c
arm-linux-ar rv libtinyalsa.a limits.o mixer.o pcm.o pcm_plugin.o pcm_hw.o snd_card_plugin.o mixer_plugin.o mixer_hw.o
arm-linux-ar: 正在创建 libtinyalsa.a
a - limits.o
a - mixer.o
a - pcm.o
a - pcm_plugin.o
a - pcm_hw.o
a - snd_card_plugin.o
a - mixer_plugin.o
a - mixer_hw.o
arm-linux-gcc  -shared -Wl,-soname,libtinyalsa.so.2 limits.o mixer.o pcm.o pcm_plugin.o pcm_hw.o snd_card_plugin.o mixer_plugin.o mixer_hw.o -o libtinyalsa.so.2.0.0
ln -sf libtinyalsa.so.2.0.0 libtinyalsa.so.2
ln -sf libtinyalsa.so.2 libtinyalsa.so
make[1]: 离开目录“/home/easyboard/corelinux/tools/tinyalsa/src”
make -C utils
make[1]: 进入目录“/home/easyboard/corelinux/tools/tinyalsa/utils”
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC -O2   -c -o tinyplay.o tinyplay.c
arm-linux-gcc -L ../src -pie  tinyplay.o ../src/libtinyalsa.a  -ldl -o tinyplay
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC -O2   -c -o tinycap.o tinycap.c
arm-linux-gcc -L ../src -pie  tinycap.o ../src/libtinyalsa.a  -ldl -o tinycap
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC -O2   -c -o tinymix.o tinymix.c
arm-linux-gcc -L ../src -pie  tinymix.o ../src/libtinyalsa.a  -ldl -o tinymix
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include -fPIC -O2   -c -o tinypcminfo.o tinypcminfo.c
arm-linux-gcc -L ../src -pie  tinypcminfo.o ../src/libtinyalsa.a  -ldl -o tinypcminfo
make[1]: 离开目录“/home/easyboard/corelinux/tools/tinyalsa/utils”
make -C doxygen
make[1]: 进入目录“/home/easyboard/corelinux/tools/tinyalsa/doxygen”
Makefile:11: "doxygen is not available please install it"
make[1]: 对“all”无需做任何事。
make[1]: 离开目录“/home/easyboard/corelinux/tools/tinyalsa/doxygen”
make -C examples
make[1]: 进入目录“/home/easyboard/corelinux/tools/tinyalsa/examples”
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include    pcm-readi.c ../src/libtinyalsa.so  -ldl -o pcm-readi
arm-linux-gcc -Wall -Wextra -Werror -Wfatal-errors -I ../include    pcm-writei.c ../src/libtinyalsa.so  -ldl -o pcm-writei
make[1]: 离开目录“/home/easyboard/corelinux/tools/tinyalsa/examples”
easyboard@V3S:~/corelinux/tools/tinyalsa$ ls
Android.bp      examples     meson_options.txt   README.md  WORKSPACE
BUILD           include      METADATA            scripts
CMakeLists.txt  LICENSE      MODULE_LICENSE_BSD  src
debian          Makefile     NOTICE              tests
doxygen         meson.build  OWNERS              utils
easyboard@V3S:~/corelinux/tools/tinyalsa$ cd utils/
easyboard@V3S:~/corelinux/tools/tinyalsa/utils$ arm-linux-gcc -o tinypcminfo tinypcminfo.c -ltinyalsa -L../src -I../include -static
../src/libtinyalsa.a(snd_card_plugin.o):在函数‘snd_utils_close_dev_node’中:
snd_card_plugin.c:(.text+0x15c):对‘dlclose’未定义的引用
../src/libtinyalsa.a(snd_card_plugin.o):在函数‘snd_utils_resolve_symbols’中:
snd_card_plugin.c:(.text+0x230):对‘dlsym’未定义的引用
../src/libtinyalsa.a(snd_card_plugin.o):在函数‘snd_utils_open_dev_node’中:
snd_card_plugin.c:(.text+0x2c4):对‘dlopen’未定义的引用
snd_card_plugin.c:(.text+0x3e4):对‘dlclose’未定义的引用
collect2: 错误:ld 返回 1
easyboard@V3S:~/corelinux/tools/tinyalsa/utils$









git clone https://github.com/tinyalsa/tinyalsa.git
1. git clone https://github.com/tinyalsa/tinyalsa.git
2. 把所有Makefile的 CC行都改成这样:  CC = $(CROSS_COMPILE)gcc
3. 执行 CROSS_COMPILE=arm-linux- make

cd tinyalsa/utils
arm-linux-gcc -o tinypcminfo tinypcminfo.c -ltinyalsa -L../src -I../include -static
arm-linux-gcc -o tinymix tinymix.c -ltinyalsa -L../src -I../include -static
arm-linux-gcc -o tinyplay tinyplay.c -ltinyalsa -L../src -I../include -static



按照小菜鸟又有新问题了, tinyalsa如何编译成arm-linux 静态链接版本
http://whycan.com/t_490.html

运行这一步时arm-linux-gcc -o tinypcminfo tinypcminfo.c -ltinyalsa -L../src -I../include -static出错,各位大神这是什么题问!!!!

easyboard@V3S:~/corelinux/tools/tinyalsa/utils$ arm-linux-gcc -o tinypcminfo tinypcminfo.c -ltinyalsa -L../src -I../include -static
../src/libtinyalsa.a(snd_card_plugin.o):在函数‘snd_utils_close_dev_node’中:
snd_card_plugin.c:(.text+0x15c):对‘dlclose’未定义的引用
../src/libtinyalsa.a(snd_card_plugin.o):在函数‘snd_utils_resolve_symbols’中:
snd_card_plugin.c:(.text+0x230):对‘dlsym’未定义的引用
../src/libtinyalsa.a(snd_card_plugin.o):在函数‘snd_utils_open_dev_node’中:
snd_card_plugin.c:(.text+0x2c4):对‘dlopen’未定义的引用
snd_card_plugin.c:(.text+0x3e4):对‘dlclose’未定义的引用
collect2: 错误:ld 返回 1

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn