linphone移植时使用交叉编译器arm-2009q1-203-arm-none-linux-gnueabi无法编译通过
编译命令:
/Linphone/build/linphone-3.4.2# ./configure --prefix=/home/innolux/Linphone/arm_none_target/ --enable-video=no --host=arm-none-linux-gnueabi PKG_CONFIG_PATH=/home/innolux/Linphone/arm_none_target/lib/pkgconfig/
出现的错误如下:
pulseaudio.c:23:30: error: pulse/pulseaudio.h: No such file or directory
pulseaudio.c:62: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pulseaudio.c:63: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
pulseaudio.c: In function 'uninit_pulse_context':
pulseaudio.c:67: warning: implicit declaration of function 'pa_context_disconnect'
pulseaudio.c:67: error: 'context' undeclared (first use in this function)
pulseaudio.c:67: error: (Each undeclared identifier is reported only once
pulseaudio.c:67: error: for each function it appears in.)
pulseaudio.c:68: warning: implicit declaration of function 'pa_context_unref'
pulseaudio.c:69: warning: implicit declaration of function 'pa_threaded_mainloop_stop'
pulseaudio.c:69: error: 'pa_loop' undeclared (first use in this function)
pulseaudio.c: At top level:
pulseaudio.c:72: error: expected ')' before '*' token
pulseaudio.c: In function 'init_pulse_context':
pulseaudio.c:103: error: 'context' undeclared (first use in this function)
pulseaudio.c:104: error: 'pa_loop' undeclared (first use in this function)
pulseaudio.c:104: warning: implicit declaration of function 'pa_threaded_mainloop_new'
pulseaudio.c:105: warning: implicit declaration of function 'pa_context_new'
pulseaudio.c:105: warning: implicit declaration of function 'pa_threaded_mainloop_get_api'
pulseaudio.c:106: warning: implicit declaration of function 'pa_context_set_state_callback'
pulseaudio.c:106: error: 'state_notify' undeclared (first use in this function)
pulseaudio.c:107: warning: implicit declaration of function 'pa_context_connect'
pulseaudio.c:108: warning: implicit declaration of function 'pa_threaded_mainloop_start'
pulseaudio.c: At top level:
pulseaudio.c:123: error: expected specifier-qualifier-list before 'pa_stream'
pulseaudio.c: In function 'pulse_read_preprocess':
pulseaudio.c:139: error: 'pa_sample_spec' undeclared (first use in this function)
pulseaudio.c:139: error: expected ';' before 'pss'
pulseaudio.c:140: error: 'pa_buffer_attr' undeclared (first use in this function)
pulseaudio.c:140: error: expected ';' before 'attr'
pulseaudio.c:142: error: 'context' undeclared (first use in this function)
pulseaudio.c:144: error: 'pss' undeclared (first use in this function)
pulseaudio.c:144: error: 'PA_SAMPLE_S16LE' undeclared (first use in this function)
pulseaudio.c:148: error: 'attr' undeclared (first use in this function)
pulseaudio.c:152: error: 'PulseReadState' has no member named 'fragsize'
pulseaudio.c:154: error: 'PulseReadState' has no member named 'stream'
pulseaudio.c:154: warning: implicit declaration of function 'pa_stream_new'
pulseaudio.c:155: error: 'PulseReadState' has no member named 'stream'
pulseaudio.c:156: warning: implicit declaration of function 'pa_strerror'
pulseaudio.c:156: warning: implicit declaration of function 'pa_context_errno'
pulseaudio.c:159: warning: implicit declaration of function 'pa_threaded_mainloop_lock'
pulseaudio.c:159: error: 'pa_loop' undeclared (first use in this function)
pulseaudio.c:160: warning: implicit declaration of function 'pa_stream_connect_record'
pulseaudio.c:160: error: 'PulseReadState' has no member named 'stream'
pulseaudio.c:160: error: 'PA_STREAM_ADJUST_LATENCY' undeclared (first use in this function)
pulseaudio.c:161: warning: implicit declaration of function 'pa_threaded_mainloop_unlock'
pulseaudio.c: In function 'pulse_read_process':
pulseaudio.c:173: error: 'PulseReadState' has no member named 'stream'
pulseaudio.c:174: error: 'pa_loop' undeclared (first use in this function)
pulseaudio.c:175: warning: implicit declaration of function 'pa_stream_peek'
pulseaudio.c:175: error: 'PulseReadState' has no member named 'stream'
pulseaudio.c:182: warning: implicit declaration of function 'pa_stream_drop'
pulseaudio.c:182: error: 'PulseReadState' has no member named 'stream'
pulseaudio.c: In function 'pulse_read_postprocess':
pulseaudio.c:192: error: 'PulseReadState' has no member named 'stream'
pulseaudio.c:193: error: 'pa_loop' undeclared (first use in this function)
pulseaudio.c:194: warning: implicit declaration of function 'pa_stream_disconnect'
pulseaudio.c:194: error: 'PulseReadState' has no member named 'stream'
pulseaudio.c:195: warning: implicit declaration of function 'pa_stream_unref'
pulseaudio.c:195: error: 'PulseReadState' has no member named 'stream'
pulseaudio.c: In function 'pulse_write_preprocess':
pulseaudio.c:253: error: 'pa_sample_spec' undeclared (first use in this function)
pulseaudio.c:253: error: expected ';' before 'pss'
pulseaudio.c:254: error: 'pa_buffer_attr' undeclared (first use in this function)
pulseaudio.c:254: error: expected ';' before 'attr'
pulseaudio.c:256: error: 'context' undeclared (first use in this function)
pulseaudio.c:258: error: 'pss' undeclared (first use in this function)
pulseaudio.c:258: error: 'PA_SAMPLE_S16LE' undeclared (first use in this function)
pulseaudio.c:262: error: 'PulseWriteState' has no member named 'fragsize'
pulseaudio.c:264: error: 'attr' undeclared (first use in this function)
pulseaudio.c:265: error: 'PulseWriteState' has no member named 'fragsize'
pulseaudio.c:270: error: 'PulseWriteState' has no member named 'stream'
pulseaudio.c:271: error: 'PulseWriteState' has no member named 'stream'
pulseaudio.c:275: error: 'pa_loop' undeclared (first use in this function)
pulseaudio.c:276: warning: implicit declaration of function 'pa_stream_connect_playback'
pulseaudio.c:276: error: 'PulseWriteState' has no member named 'stream'
pulseaudio.c:276: error: 'PA_STREAM_ADJUST_LATENCY' undeclared (first use in this function)
pulseaudio.c: In function 'pulse_write_process':
pulseaudio.c:288: error: 'PulseWriteState' has no member named 'stream'
pulseaudio.c:289: error: 'pa_loop' undeclared (first use in this function)
pulseaudio.c:290: warning: implicit declaration of function 'pa_stream_writable_size'
pulseaudio.c:290: error: 'PulseWriteState' has no member named 'stream'
pulseaudio.c:292: warning: implicit declaration of function 'pa_stream_write'
pulseaudio.c:292: error: 'PulseWriteState' has no member named 'stream'
pulseaudio.c:292: error: 'PA_SEEK_RELATIVE' undeclared (first use in this function)
pulseaudio.c: In function 'pulse_write_postprocess':
pulseaudio.c:302: error: 'PulseWriteState' has no member named 'stream'
pulseaudio.c:303: error: 'pa_loop' undeclared (first use in this function)
pulseaudio.c:304: error: 'PulseWriteState' has no member named 'stream'
pulseaudio.c:305: error: 'PulseWriteState' has no member named 'stream'
make[5]: *** [pulseaudio.lo] Error 1
make[5]: Leaving directory `/home/innolux/Linphone/build/linphone-3.4.2/mediastreamer2/src'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/innolux/Linphone/build/linphone-3.4.2/mediastreamer2/src'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/innolux/Linphone/build/linphone-3.4.2/mediastreamer2'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/innolux/Linphone/build/linphone-3.4.2/mediastreamer2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/innolux/Linphone/build/linphone-3.4.2'
make: *** [all] Error 2
有哪位高手知道如何解决的请指教下,谢谢!
[解决办法]
1、看README或INSTALL之类的文件。
2、看
pulseaudio.c:23:30: error: pulse/pulseaudio.h: No such file or directory
似乎是头文件位置不对(这个文件存在吗?)。
看后面的错误,似乎就是没有这个文件造成的。
[解决办法]
检查环境变量是否设置正确。
[解决办法]
应该是交叉编译器版本问题,另外arm-linux-gcc其实和arm-none-linux-gnueabi-gcc没有多少区别,在创建交叉编译工具链的时候习惯把arm-none-linux-gnueabi-gcc命名为arm-linux-gcc。希望可以帮到你!
[解决办法]