【发布时间】:2019-06-28 22:52:29
【问题描述】:
我正在做我自己的 alsa 项目。
从
更改了操作系统(全新安装/未升级)PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
NAME="Raspbian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=raspbian
ID_LIKE=debian
4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
到
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
4.14.93-v7+ #1191 SMP Wed Jan 16 11:53:33 GMT 2019 armv7l GNU/Linux
我已经另外下载/安装了
alsa-lib-1.1.8.tar.bz2
没有任何错误!
中间没有涉及项目 - 所有 alsa 源在 wheezy 之前都编译得很好!!!
在使用 alsa 库/源(包含在 /usr/include/alsa 中)再次编译项目时,我现在在拉伸下使用相同的“Makefile”会遇到以下“invalid storage class”错误:
In file included from /usr/include/alsa/asoundlib.h:54:0,
from IPI2Cserver.c:3764:
/usr/include/alsa/pcm.h:507:23: error: invalid storage class for function ‘snd_pcm_abort’
static __inline__ int snd_pcm_abort(snd_pcm_t *pcm) { return snd_pcm_nonblock(pcm, 2); }
^~~~~~~~~~~~~
In file included from /usr/include/alsa/asoundlib.h:54:0,
from IPI2Cserver.c:3764:
/usr/include/alsa/pcm.h:1030:20: error: invalid storage class for function ‘snd_pcm_pack_audio_tstamp_config’
static inline void snd_pcm_pack_audio_tstamp_config(unsigned int *data,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/alsa/pcm.h:1038:20: error: invalid storage class for function ‘snd_pcm_unpack_audio_tstamp_report’
static inline void snd_pcm_unpack_audio_tstamp_report(unsigned int data, unsigned int accuracy,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/alsa/asoundlib.h:58:0,
from IPI2Cserver.c:3764:
/usr/include/alsa/control.h:237:23: error: invalid storage class for function ‘snd_ctl_abort’
static __inline__ int snd_ctl_abort(snd_ctl_t *ctl) { return snd_ctl_nonblock(ctl, 2); }
^~~~~~~~~~~~~
In file included from /usr/include/alsa/asoundlib.h:58:0,
from IPI2Cserver.c:3764:
/usr/include/alsa/control.h:558:23: error: invalid storage class for function ‘snd_hctl_abort’
static __inline__ int snd_hctl_abort(snd_hctl_t *hctl) { return snd_hctl_nonblock(hctl, 2); }
^~~~~~~~~~~~~~
现在的问题 - 在没有任何进一步的项目更改的情况下迁移到拉伸后发生了什么变化?
alsa 的变化? 拉伸变化?
提前致谢 - 非常感谢任何帮助!
我不是专业/专家,所以我没有能力更改 alsa 源代码头以适应新情况!
【问题讨论】:
-
尝试将#include 移到.c 文件的顶部。
-
非常感谢!你的提示做到了!!!
-
背后的秘密是什么?是否违反了任何编程约定?拉伸发生了什么变化?
-
显然,#include 之前有一些东西干扰了标头的内容。
标签: gcc raspbian alsa debian-stretch libalsa