• «
  • 1
  • 2
  • 3
  • »
  • Pages: 1/3     Go
主题 : BlueZ-4.69移植问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 9455
精华: 0
发帖: 30
金钱: 150 两
威望: 30 点
贡献值: 0 点
综合积分: 60 分
注册时间: 2009-09-29
最后登录: 2011-10-02
楼主  发表于: 2010-08-23 23:41

 BlueZ-4.69移植问题

请教各位大侠,能否帮忙看看,能否看出什么原因,非常感谢

首先:alsa应该是安装了
[root@ivan ~]# yum install alsa-lib-devel.i386 alsa-lib.i386
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Package alsa-lib-devel-1.0.16-3.fc9.i386 already installed and latest version
Package alsa-lib-1.0.16-3.fc9.i386 already installed and latest version
Nothing to do
[root@ivan ~]# yum install bluez-utils-alsa.i386
Loaded plugins: refresh-packagekit
Setting up Install Process
Parsing package install arguments
Package bluez-utils-alsa-3.30-2.fc9.i386 already installed and latest version
Nothing to do
[root@ivan ~]#

然后:是问题
[root@ivan bluez-4.69]# ./configure --prefix=/opt/Bluez --target=arm-linux CC="arm-linux-gcc" --host=arm-linux
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-linux-strip... arm-linux-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for arm-linux-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for arm-linux-gcc... arm-linux-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether arm-linux-gcc accepts -g... yes
checking for arm-linux-gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of arm-linux-gcc... gcc3
checking whether arm-linux-gcc and cc understand -c and -o together... yes
checking whether arm-linux-gcc accepts -fPIE... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking build system type... i686-pc-linux-gnu
checking host system type... arm-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by arm-linux-gcc... /opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/bin/ld
checking if the linker (/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-nm -B
checking the name lister (/opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/bin/ld option to reload object files... -r
checking for arm-linux-objdump... arm-linux-objdump
checking how to recognize dependent libraries... pass_all
checking for arm-linux-ar... arm-linux-ar
checking for arm-linux-strip... (cached) arm-linux-strip
checking for arm-linux-ranlib... arm-linux-ranlib
checking command to parse /opt/FriendlyARM/toolschain/4.4.3/bin/arm-linux-nm -B output from arm-linux-gcc object... ok
checking how to run the C preprocessor... arm-linux-gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if arm-linux-gcc supports -fno-rtti -fno-exceptions... no
checking for arm-linux-gcc option to produce PIC... -fPIC -DPIC
checking if arm-linux-gcc PIC flag -fPIC -DPIC works... yes
checking if arm-linux-gcc static flag -static works... yes
checking if arm-linux-gcc supports -c -o file.o... yes
checking if arm-linux-gcc supports -c -o file.o... (cached) yes
checking whether the arm-linux-gcc linker (/opt/FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for ppoll... yes
checking for dlopen in -ldl... yes
checking for DBUS... yes
checking for dbus_watch_get_unix_fd in -ldbus-1... no
checking for dbus_connection_can_send_type in -ldbus-1... no
checking for GLIB... yes
checking for ALSA... yes
checking for clock_gettime in -lrt... yes
checking for GSTREAMER... no
checking for USB... no
checking for usb_get_busses in -lusb... no
checking for usb_interrupt_read in -lusb... no
checking for SNDFILE... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating scripts/bluetooth.rules
config.status: creating doc/version.xml
config.status: creating src/bluetoothd.8
config.status: creating bluez.pc
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
[root@ivan bluez-4.69]# make
make --no-print-directory all-am
  CC     audio/audio_libasound_module_pcm_bluetooth_la-pcm_bluetooth.lo
audio/pcm_bluetooth.c:40:28: error: alsa/asoundlib.h: No such file or directory
audio/pcm_bluetooth.c:41:31: error: alsa/pcm_external.h: No such file or directory
audio/pcm_bluetooth.c:130: error: expected specifier-qualifier-list before 'snd_pcm_ioplug_t'
audio/pcm_bluetooth.c:151: error: expected ')' before '*' token
audio/pcm_bluetooth.c:158: error: expected ')' before '*' token
audio/pcm_bluetooth.c: In function 'playback_hw_thread':
audio/pcm_bluetooth.c:171: error: array type has incomplete element type
audio/pcm_bluetooth.c:174: error: 'struct bluetooth_data' has no member named 'server'
audio/pcm_bluetooth.c:174: error: 'POLLIN' undeclared (first use in this function)
audio/pcm_bluetooth.c:174: error: (Each undeclared identifier is reported only once
audio/pcm_bluetooth.c:174: error: for each function it appears in.)
audio/pcm_bluetooth.c:177: error: 'struct bluetooth_data' has no member named 'server'
audio/pcm_bluetooth.c:178: error: 'struct bluetooth_data' has no member named 'stream'
audio/pcm_bluetooth.c:181: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:181: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:194: error: 'struct bluetooth_data' has no member named 'stopped'
audio/pcm_bluetooth.c:197: error: 'struct bluetooth_data' has no member named 'reset'
audio/pcm_bluetooth.c:199: error: 'struct bluetooth_data' has no member named 'reset'
audio/pcm_bluetooth.c:215: error: 'struct bluetooth_data' has no member named 'hw_ptr'
audio/pcm_bluetooth.c:215: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:216: error: 'struct bluetooth_data' has no member named 'hw_ptr'
audio/pcm_bluetooth.c:216: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:221: error: 'struct bluetooth_data' has no member named 'pipefd'
audio/pcm_bluetooth.c:237: warning: implicit declaration of function 'poll'
audio/pcm_bluetooth.c:240: warning: implicit declaration of function 'SNDERR'
audio/pcm_bluetooth.c:246: error: 'POLLERR' undeclared (first use in this function)
audio/pcm_bluetooth.c:246: error: 'POLLHUP' undeclared (first use in this function)
audio/pcm_bluetooth.c:246: error: 'POLLNVAL' undeclared (first use in this function)
audio/pcm_bluetooth.c:254: error: 'struct bluetooth_data' has no member named 'hw_thread'
audio/pcm_bluetooth.c:171: warning: unused variable 'fds'
audio/pcm_bluetooth.c: At top level:
audio/pcm_bluetooth.c:258: error: expected ')' before '*' token
audio/pcm_bluetooth.c:275: error: expected ')' before '*' token
audio/pcm_bluetooth.c:286: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bluetooth_pointer'
audio/pcm_bluetooth.c: In function 'bluetooth_exit':
audio/pcm_bluetooth.c:295: error: 'struct bluetooth_data' has no member named 'a2dp'
audio/pcm_bluetooth.c:297: error: 'struct bluetooth_data' has no member named 'server'
audio/pcm_bluetooth.c:298: error: 'struct bluetooth_data' has no member named 'server'
audio/pcm_bluetooth.c:300: error: 'struct bluetooth_data' has no member named 'stream'
audio/pcm_bluetooth.c:301: error: 'struct bluetooth_data' has no member named 'stream'
audio/pcm_bluetooth.c:303: error: 'struct bluetooth_data' has no member named 'hw_thread'
audio/pcm_bluetooth.c:304: error: 'struct bluetooth_data' has no member named 'hw_thread'
audio/pcm_bluetooth.c:305: error: 'struct bluetooth_data' has no member named 'hw_thread'
audio/pcm_bluetooth.c:311: error: 'struct bluetooth_data' has no member named 'pipefd'
audio/pcm_bluetooth.c:312: error: 'struct bluetooth_data' has no member named 'pipefd'
audio/pcm_bluetooth.c:314: error: 'struct bluetooth_data' has no member named 'pipefd'
audio/pcm_bluetooth.c:315: error: 'struct bluetooth_data' has no member named 'pipefd'
audio/pcm_bluetooth.c:317: warning: implicit declaration of function 'free'
audio/pcm_bluetooth.c:317: warning: incompatible implicit declaration of built-in function 'free'
audio/pcm_bluetooth.c: At top level:
audio/pcm_bluetooth.c:320: error: expected ')' before '*' token
audio/pcm_bluetooth.c:331: error: expected ')' before '*' token
audio/pcm_bluetooth.c:428: error: expected ')' before '*' token
audio/pcm_bluetooth.c:525: error: expected declaration specifiers or '...' before 'snd_pcm_hw_params_t'
audio/pcm_bluetooth.c: In function 'bluetooth_a2dp_init':
audio/pcm_bluetooth.c:527: error: 'struct bluetooth_data' has no member named 'alsa_config'
audio/pcm_bluetooth.c:528: error: 'struct bluetooth_data' has no member named 'a2dp'
audio/pcm_bluetooth.c:532: warning: implicit declaration of function 'snd_pcm_hw_params_get_rate'
audio/pcm_bluetooth.c:532: error: 'params' undeclared (first use in this function)
audio/pcm_bluetooth.c:533: warning: implicit declaration of function 'snd_pcm_hw_params_get_channels'
audio/pcm_bluetooth.c: At top level:
audio/pcm_bluetooth.c:687: error: expected ')' before '*' token
audio/pcm_bluetooth.c:761: error: expected ')' before '*' token
audio/pcm_bluetooth.c:778: error: expected ')' before '*' token
audio/pcm_bluetooth.c:789: error: expected ')' before '*' token
audio/pcm_bluetooth.c:794: error: expected ')' before '*' token
audio/pcm_bluetooth.c:816: error: expected ')' before '*' token
audio/pcm_bluetooth.c:843: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bluetooth_hsp_read'
audio/pcm_bluetooth.c:901: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bluetooth_hsp_write'
audio/pcm_bluetooth.c:959: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bluetooth_a2dp_read'
audio/pcm_bluetooth.c: In function 'avdtp_write':
audio/pcm_bluetooth.c:972: error: 'struct bluetooth_data' has no member named 'a2dp'
audio/pcm_bluetooth.c:986: error: 'struct bluetooth_data' has no member named 'stream'
audio/pcm_bluetooth.c: At top level:
audio/pcm_bluetooth.c:1001: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bluetooth_a2dp_write'
audio/pcm_bluetooth.c:1138: error: expected ')' before '*' token
audio/pcm_bluetooth.c:1158: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bluetooth_hsp_playback'
audio/pcm_bluetooth.c:1172: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bluetooth_hsp_capture'
audio/pcm_bluetooth.c:1184: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bluetooth_a2dp_playback'
audio/pcm_bluetooth.c:1198: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'bluetooth_a2dp_capture'
audio/pcm_bluetooth.c:1212: error: expected ')' before '*' token
audio/pcm_bluetooth.c:1265: error: expected ')' before '*' token
audio/pcm_bluetooth.c:1375: error: expected ')' before '*' token
audio/pcm_bluetooth.c: In function 'bluetooth_parse_capabilities':
audio/pcm_bluetooth.c:1620: error: 'struct bluetooth_data' has no member named 'transport'
audio/pcm_bluetooth.c:1635: error: 'struct bluetooth_data' has no member named 'a2dp'
audio/pcm_bluetooth.c:1638: error: 'struct bluetooth_data' has no member named 'a2dp'
audio/pcm_bluetooth.c: At top level:
audio/pcm_bluetooth.c:1644: error: expected declaration specifiers or '...' before 'snd_pcm_stream_t'
audio/pcm_bluetooth.c:1644: error: expected declaration specifiers or '...' before 'snd_config_t'
audio/pcm_bluetooth.c: In function 'bluetooth_init':
audio/pcm_bluetooth.c:1647: error: 'struct bluetooth_data' has no member named 'alsa_config'
audio/pcm_bluetooth.c:1654: warning: implicit declaration of function 'bluetooth_parse_config'
audio/pcm_bluetooth.c:1654: error: 'conf' undeclared (first use in this function)
audio/pcm_bluetooth.c:1658: error: 'struct bluetooth_data' has no member named 'server'
audio/pcm_bluetooth.c:1659: error: 'struct bluetooth_data' has no member named 'stream'
audio/pcm_bluetooth.c:1667: error: 'struct bluetooth_data' has no member named 'server'
audio/pcm_bluetooth.c:1668: error: 'struct bluetooth_data' has no member named 'server'
audio/pcm_bluetooth.c:1668: error: 'POLLIN' undeclared (first use in this function)
audio/pcm_bluetooth.c:1670: error: 'struct bluetooth_data' has no member named 'pipefd'
audio/pcm_bluetooth.c:1671: error: 'struct bluetooth_data' has no member named 'pipefd'
audio/pcm_bluetooth.c:1673: error: 'struct bluetooth_data' has no member named 'pipefd'
audio/pcm_bluetooth.c:1677: warning: implicit declaration of function 'fcntl'
audio/pcm_bluetooth.c:1677: error: 'struct bluetooth_data' has no member named 'pipefd'
audio/pcm_bluetooth.c:1677: error: 'F_SETFL' undeclared (first use in this function)
audio/pcm_bluetooth.c:1677: error: 'O_NONBLOCK' undeclared (first use in this function)
audio/pcm_bluetooth.c:1681: error: 'struct bluetooth_data' has no member named 'pipefd'
audio/pcm_bluetooth.c:1699: error: 'struct bluetooth_data' has no member named 'server'
audio/pcm_bluetooth.c:1704: error: 'struct bluetooth_data' has no member named 'server'
audio/pcm_bluetooth.c: At top level:
audio/pcm_bluetooth.c:1719: warning: data definition has no type or storage class
audio/pcm_bluetooth.c:1719: warning: type defaults to 'int' in declaration of 'SND_PCM_PLUGIN_DEFINE_FUNC'
audio/pcm_bluetooth.c:1719: warning: parameter names (without types) in function declaration
audio/pcm_bluetooth.c:1722: warning: return type defaults to 'int'
audio/pcm_bluetooth.c: In function 'SND_PCM_PLUGIN_DEFINE_FUNC':
audio/pcm_bluetooth.c:1735: error: 'stream' undeclared (first use in this function)
audio/pcm_bluetooth.c:1735: error: 'conf' undeclared (first use in this function)
audio/pcm_bluetooth.c:1735: error: too many arguments to function 'bluetooth_init'
audio/pcm_bluetooth.c:1739: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:1739: error: 'SND_PCM_IOPLUG_VERSION' undeclared (first use in this function)
audio/pcm_bluetooth.c:1740: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:1741: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:1742: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:1744: error: 'struct bluetooth_data' has no member named 'transport'
audio/pcm_bluetooth.c:1745: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:1745: error: 'SND_PCM_STREAM_PLAYBACK' undeclared (first use in this function)
audio/pcm_bluetooth.c:1746: error: 'bluetooth_a2dp_playback' undeclared (first use in this function)
audio/pcm_bluetooth.c:1747: error: 'bluetooth_a2dp_capture' undeclared (first use in this function)
audio/pcm_bluetooth.c:1749: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:1750: error: 'bluetooth_hsp_playback' undeclared (first use in this function)
audio/pcm_bluetooth.c:1751: error: 'bluetooth_hsp_capture' undeclared (first use in this function)
audio/pcm_bluetooth.c:1753: warning: implicit declaration of function 'snd_pcm_ioplug_create'
audio/pcm_bluetooth.c:1753: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:1753: error: 'name' undeclared (first use in this function)
audio/pcm_bluetooth.c:1753: error: 'mode' undeclared (first use in this function)
audio/pcm_bluetooth.c:1757: error: 'struct bluetooth_data' has no member named 'transport'
audio/pcm_bluetooth.c:1758: warning: implicit declaration of function 'bluetooth_a2dp_hw_constraint'
audio/pcm_bluetooth.c:1758: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:1760: warning: implicit declaration of function 'bluetooth_hsp_hw_constraint'
audio/pcm_bluetooth.c:1760: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:1763: warning: implicit declaration of function 'snd_pcm_ioplug_delete'
audio/pcm_bluetooth.c:1763: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c:1767: error: 'pcmp' undeclared (first use in this function)
audio/pcm_bluetooth.c:1767: error: 'struct bluetooth_data' has no member named 'io'
audio/pcm_bluetooth.c: At top level:
audio/pcm_bluetooth.c:1778: warning: data definition has no type or storage class
audio/pcm_bluetooth.c:1778: warning: type defaults to 'int' in declaration of 'SND_PCM_PLUGIN_SYMBOL'
audio/pcm_bluetooth.c:1778: warning: parameter names (without types) in function declaration
make[1]: *** [audio/audio_libasound_module_pcm_bluetooth_la-pcm_bluetooth.lo] Error 1
make: *** [all] Error 2
[root@ivan bluez-4.69]#

看似好像问题出在alsa/asoundlib.h

求助如何解决!!!

谢谢
[ 此帖被kasim在2010-08-30 07:51重新编辑 ]
级别: 新手上路
UID: 9455
精华: 0
发帖: 30
金钱: 150 两
威望: 30 点
贡献值: 0 点
综合积分: 60 分
注册时间: 2009-09-29
最后登录: 2011-10-02
1楼  发表于: 2010-08-24 20:55
自己顶一下!

有没有朋友想一起研究一下移植BlueZ-4.69?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
2楼  发表于: 2010-08-24 21:26
你通过yum安装的alsa-lib不适用于交叉编译,那是给PC用的。你得自己交叉编译出ARM版的alsa-lib,并安装它的头文件到交叉编译器找得到的地方。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 9455
精华: 0
发帖: 30
金钱: 150 两
威望: 30 点
贡献值: 0 点
综合积分: 60 分
注册时间: 2009-09-29
最后登录: 2011-10-02
3楼  发表于: 2010-08-25 22:36

 回 2楼(kasim) 的帖子

谢谢Kasim的回复!

你的意思是,我需要下载alsa的lib的源代码,然后交叉编译出lib文件copy到FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/lib,把.h文件copy到FriendlyARM/toolschain/4.4.3/include吗?

谢谢执教!
级别: 新手上路
UID: 9455
精华: 0
发帖: 30
金钱: 150 两
威望: 30 点
贡献值: 0 点
综合积分: 60 分
注册时间: 2009-09-29
最后登录: 2011-10-02
4楼  发表于: 2010-08-25 23:03
引用第2楼kasim于2010-08-24 21:26发表的  :
你通过yum安装的alsa-lib不适用于交叉编译,那是给PC用的。你得自己交叉编译出ARM版的alsa-lib,并安装它的头文件到交叉编译器找得到的地方。


我交叉编译alsa-lib在/usr/share/arm-alsa下面生成四个目录:bin,include,lib,share。

能否指导一下如果安装这些生成的文件?多谢!

我的交叉编译环境装在了/opt/FriendlyARM/toolschain/4.4.3/
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2010-08-25 23:03

 Re:回 2楼(kasim) 的帖子

引用第3楼kunasen于2010-08-25 22:36发表的 回 2楼(kasim) 的帖子 :
谢谢Kasim的回复!

你的意思是,我需要下载alsa的lib的源代码,然后交叉编译出lib文件copy到FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/lib,把.h文件copy到FriendlyARM/toolschain/4.4.3/include吗?

谢谢执教!

是的,你可以这样做。但要记得把编译出来的库文件一起放到开发板文件系统的/lib目录下,否则bluez在开发板上运行时会因为找不到所依赖的共享库而出错。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 9455
精华: 0
发帖: 30
金钱: 150 两
威望: 30 点
贡献值: 0 点
综合积分: 60 分
注册时间: 2009-09-29
最后登录: 2011-10-02
6楼  发表于: 2010-08-25 23:15

 回 5楼(kasim) 的帖子

我把交叉编译alsa-lib在/usr/share/arm-alsa下面生成四个目录:bin,include,lib,share的lib下所有东西copy到FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/lib,把include下的所有的东西copy到FriendlyARM/toolschain/4.4.3/include,再编译还是alsa/asoundlib.h: No such file or directory的错误!!!
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
7楼  发表于: 2010-08-25 23:22
把include下的所有的东西copy到FriendlyARM/toolschain/4.4.3/include

我想你应该把东西复制到FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/sysroot/usr/include下, 这是交叉编译器默认的头文件include路径
[ 此帖被kasim在2010-08-25 23:36重新编辑 ]
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
贡献值: 71 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2010-08-25 23:33
其实通常的做法是把alsa-lib的头文件安装到一个指定的目录,比如/usr/local/arm-rootfs-staging/include, 然后用下面的命令配置bluez的源代码:
$CFLAGS="-I /usr/local/arm-rootfs-staging/include" ./configure --prefix=/path/to/targe/filesystem --host=arm-linux

即通过给arm-linux-gcc传递-I参数来指定特定的头文件所在的目录
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 9455
精华: 0
发帖: 30
金钱: 150 两
威望: 30 点
贡献值: 0 点
综合积分: 60 分
注册时间: 2009-09-29
最后登录: 2011-10-02
9楼  发表于: 2010-08-25 23:43
./configure --prefix=/opt/Bluez --target=arm-linux CC="arm-linux-gcc -L/usr/share/arm-alsa/lib/ -I/usr/share/arm-alsa/include/" --host=arm-none-linux-gnueabi

alsa/asoundlib.h: No such file or directory的错误没有了,谢谢Kasim的热心帮忙,我再试试copy到FriendlyARM/toolschain/4.4.3/arm-none-linux-gnueabi/sysroot/usr/include下面可不可以。

可是又遇到新的问题:cannot find -lglib-2.0

郁闷啊~~~

请问Kasim知道哪里可以下到glib-2.0的lib的源代码吗?网上搜了半天好像没有
  • «
  • 1
  • 2
  • 3
  • »
  • Pages: 1/3     Go