Shairport-sync: when include --with-mqtt-client, build failed on alpine

Created on 7 Jun 2019  Â·  3Comments  Â·  Source: mikebrady/shairport-sync

I am trying to build a Shairport-sync with mqtt on alpine.

however, an error occurs in dacp.c when include --with-mqtt-client option in configure. and if not include --with-mqtt-client option, then build work very well.

include configure options:
--with-alsa / --with-pipe / --with-avahi / --with-ssl=openssl / --with-soxr / --with-mqtt-client

Error code:

gcc -DHAVE_CONFIG_H -I.    -Wno-multichar -Wall -Wextra -Wno-clobbered -Wno-psabi -pthread -DSYSCONFDIR=\"/etc\"  -g -O2 -MT dacp.o -MD -MP -MF $depbase.Tpo -c -o dacp.o dacp.c &&\
mv -f $depbase.Tpo $depbase.Po
 **dacp.c: In function 'dacp_send_command':
dacp.c:213:24: error: storage size of 'tv' isn't known
         struct timeval tv;
                        ^~
dacp.c:213:24: warning: unused variable 'tv' [-Wunused-variable]
make[2]: *** [Makefile:803: dacp.o] Error 1
make[2]: Leaving directory '/root/shairport-sync'
make[1]: *** [Makefile:869: all-recursive] Error 1
make[1]: Leaving directory '/root/shairport-sync'
make: *** [Makefile:593: all] Error 2**

Most helpful comment

Fixed – if you switch to the development branch and pull changes, and then if you redo $ autoreconf -fi, you should be able to run the ./configure... step.

BTW, the fix was to add one line – the middle one below – to dacp.c:

#include <stdlib.h>
#include <sys/time.h>
#include <time.h>

Thanks for reporting.

All 3 comments

Thanks for the post. I’ll take a look.

Fixed – if you switch to the development branch and pull changes, and then if you redo $ autoreconf -fi, you should be able to run the ./configure... step.

BTW, the fix was to add one line – the middle one below – to dacp.c:

#include <stdlib.h>
#include <sys/time.h>
#include <time.h>

Thanks for reporting.

Fixed – if you switch to the development branch and pull changes, and then if you redo $ autoreconf -fi, you should be able to run the ./configure... step.

BTW, the fix was to add one line – the middle one below – to dacp.c:

#include <stdlib.h>
#include <sys/time.h>
#include <time.h>

Thanks for reporting.

build work very well.

thanks you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PeterPablo picture PeterPablo  Â·  8Comments

mc002b picture mc002b  Â·  7Comments

bangelischan picture bangelischan  Â·  9Comments

fundix picture fundix  Â·  3Comments

wysiecki picture wysiecki  Â·  4Comments