Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while building: storage size of ‘txtime_cfg’ isn’t known #9

Closed
assistof opened this issue Apr 3, 2020 · 2 comments
Closed

Comments

@assistof
Copy link

assistof commented Apr 3, 2020

Hello Guys,
I have the same problem as the friend (#4). Can anybody help me?

I tried to build the code with make , but an error occured:

System:
Ubuntu 18.04.3 64-bit
Kernel: Linux hostname-To-be-filled-by-O-E-M 5.3.0-45-generic #37~18.04.1-Ubuntu SMP Fri Mar 27 15:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz

Note:different from what happened with the previous topic, in my case, the installation of the headers did not solve. I already installed the Linux headers with the command sudo apt-get install linux-headers-$(uname -r)

#Commands
git clone https://github.com/alsa-project/alsa-plugins.git
cd alsa-plugins/
git checkout v1.1.9
autoreconf -i
./configure --prefix=/usr/local
make

Making all in aaf
make[2]: Entering directory '/home/user/repository/alsa-plugins/aaf'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -I/usr/local/include -g -O2 -MT pcm_aaf.lo -MD -MP -MF .deps/pcm_aaf.Tpo -c -o pcm_aaf.lo pcm_aaf.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I/usr/local/include -g -O2 -MT pcm_aaf.lo -MD -MP -MF .deps/pcm_aaf.Tpo -c pcm_aaf.c  -fPIC -DPIC -o .libs/pcm_aaf.o
pcm_aaf.c: In function ‘aaf_init_socket’:
pcm_aaf.c:290:22: error: storage size of ‘txtime_cfg’ isn’t known
   struct sock_txtime txtime_cfg;
                      ^~~~~~~~~~
pcm_aaf.c:302:36: error: ‘SO_TXTIME’ undeclared (first use in this function); did you mean ‘SO_RCVTIMEO’?
   res = setsockopt(fd, SOL_SOCKET, SO_TXTIME, &txtime_cfg,
                                    ^~~~~~~~~
                                    SO_RCVTIMEO
pcm_aaf.c:302:36: note: each undeclared identifier is reported only once for each function it appears in
pcm_aaf.c: In function ‘aaf_init_msghdr’:
pcm_aaf.c:509:20: error: ‘SCM_TXTIME’ undeclared (first use in this function); did you mean ‘_SC_CPUTIME’?
  cmsg->cmsg_type = SCM_TXTIME;
                    ^~~~~~~~~~
                    _SC_CPUTIME
Makefile:448: recipe for target 'pcm_aaf.lo' failed

any suggestion?
Thx!!!

@aguedes
Copy link
Contributor

aguedes commented Apr 9, 2020

It seems like sudo apt-get install linux-headers-$(uname -r) doesn't install the header files in the default include-path dir. You have to manually include the dir where Ubuntu installs the kernel headers. Try:

./configure --prefix=/usr/local CFLAGS=-I/path/to/kernel/headers

@perexg
Copy link
Member

perexg commented Nov 2, 2021

It seems resolved.

@perexg perexg closed this as completed Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants