Skip to content

Commit d34a101

Browse files
committed
still debugging build failures. Static linking proving to be difficult.
1 parent 032ef98 commit d34a101

File tree

3 files changed

+81
-78
lines changed

3 files changed

+81
-78
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ jobs:
101101
libasound2-dev libxml2-dev libgcrypt20-dev zlib1g-dev \
102102
libevent-dev libplist-dev libsodium-dev libjson-c-dev \
103103
libcurl4-openssl-dev libprotobuf-c-dev pkg-config bison flex
104+
105+
- name: Check FFmpeg version
106+
run: |
107+
pkg-config --modversion libavcodec
108+
ffmpeg -version
109+
find /usr -name "libav*.a" -print
104110
105111
- name: Build for ARM64
106112
run: |

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@ NOTE: This is in early stage development and will be subject to change.
1414

1515
Install required tools and libraries - minimal list yet to be confirmed:
1616

17-
```
17+
```bash
1818
sudo apt-get install \
1919
build-essential git autotools-dev autoconf automake libtool gettext gawk \
2020
libconfuse-dev libunistring-dev \
21-
libavcodec-dev libavformat-dev libavfilter-dev libswscale-dev libavutil-dev \
21+
libavcodec-dev libavformat-dev libavfilter-dev libswscale-dev libavutil-dev liblzma-dev \
2222
libasound2-dev libxml2-dev libgcrypt20-dev zlib1g-dev \
2323
libevent-dev libplist-dev libsodium-dev libjson-c-dev \
2424
libcurl4-openssl-dev libprotobuf-c-dev
2525
```
2626

2727
Then run the following:
2828

29-
```
29+
```bash
3030
git clone https://github.com/music-assistant/cliairplay.git
3131
cd cliairplay
3232
git submodule update --init
33-
autoreconf -i
33+
autoreconf -fi
3434
./configure
3535
make
3636
```

configure.ac

Lines changed: 71 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ AM_INIT_AUTOMAKE([foreign subdir-objects 1.11])
1212
AM_SILENT_RULES([yes])
1313

1414
# Use static linking for select libraries
15-
: ${LIBAV_CFLAGS="-static"}
16-
: ${LIBAV_LDFLAGS="-llibavcodec.a -llibavformat.a -llibavfilter.a -llibavutil.a -llibwscale.a"}
15+
# Still debugging - the -L stuff below cannot remain as is.
16+
# : ${LIBAV_CFLAGS="-static"}
17+
# : ${LIBAV_LIBS="-lavcodec -lavformat -lavfilter -lavutil -lswscale -llzma"}
1718

1819
AC_USE_SYSTEM_EXTENSIONS
1920

@@ -48,6 +49,74 @@ dnl Enable all warnings by default.
4849
AM_CPPFLAGS="-Wall"
4950
AC_SUBST([AM_CPPFLAGS])
5051

52+
dnl Checks for header files.
53+
AC_CHECK_HEADERS_ONCE([regex.h pthread_np.h])
54+
AC_CHECK_HEADERS([sys/wait.h sys/param.h dirent.h getopt.h stdint.h], [],
55+
[AC_MSG_ERROR([[Missing header required to build OwnTone]])])
56+
AC_CHECK_HEADERS([time.h], [],
57+
[AC_MSG_ERROR([[Missing header required to build OwnTone]])])
58+
AC_CHECK_FUNCS_ONCE([posix_fadvise pipe2 gettid])
59+
AC_CHECK_FUNCS([strptime strtok_r], [],
60+
[AC_MSG_ERROR([[Missing function required to build OwnTone]])])
61+
62+
dnl check for clock_gettime or replace it
63+
AC_SEARCH_LIBS([clock_gettime], [rt],
64+
[AC_DEFINE([HAVE_CLOCK_GETTIME], 1,
65+
[Define to 1 if have clock_gettime function])],
66+
[AC_CHECK_HEADER([mach/mach_time.h],
67+
[AC_DEFINE([HAVE_MACH_CLOCK], 1,
68+
[Define to 1 if mach kernel clock replacement available])],
69+
[AC_MSG_ERROR([[Missing clock_gettime and any replacement]])])])
70+
71+
dnl check for timer_settime or replace it
72+
AC_SEARCH_LIBS([timer_settime], [rt],
73+
[AC_DEFINE([HAVE_TIMER_SETTIME], 1,
74+
[Define to 1 if have timer_settime function])],
75+
[AC_CHECK_HEADER([mach/mach_time.h],
76+
[AC_DEFINE([HAVE_MACH_TIMER], 1,
77+
[Define to 1 if mach kernel clock replacement available])],
78+
[AC_MSG_ERROR([[Missing timer_settime and any replacement]])])])
79+
80+
AC_SEARCH_LIBS([pthread_exit], [pthread], [],
81+
[AC_MSG_ERROR([[pthreads library is required]])])
82+
AC_SEARCH_LIBS([pthread_setname_np], [pthread],
83+
[dnl Validate pthread_setname_np with 2 args (some have 1)
84+
AC_MSG_CHECKING([[for two-parameter pthread_setname_np]])
85+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <pthread.h>]],
86+
[[pthread_setname_np(pthread_self(), "name");]])],
87+
[AC_MSG_RESULT([yes])
88+
AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], 1,
89+
[Define to 1 if you have pthread_setname_np])],
90+
[AC_MSG_RESULT([[no]])])],
91+
[AC_SEARCH_LIBS([pthread_set_name_np], [pthread],
92+
[AC_CHECK_FUNCS([pthread_set_name_np])])])
93+
AC_SEARCH_LIBS([pthread_getname_np], [pthread],
94+
[AC_DEFINE([HAVE_PTHREAD_GETNAME_NP], 1,
95+
[Define to 1 if you have pthread_getname_np])]
96+
[AC_SEARCH_LIBS([pthread_get_name_np], [pthread],
97+
[AC_DEFINE([HAVE_PTHREAD_GETNAME_NP], 1,
98+
[Define to 1 if you have pthread_get_name_np])])])
99+
AC_SEARCH_LIBS([pthread_getthreadid_np], [pthread],
100+
[AC_DEFINE([HAVE_PTHREAD_GETTHREADID_NP], 1,
101+
[Define to 1 if you have pthread_getthreadid_np])])
102+
AC_SEARCH_LIBS([uuid_generate_random], [uuid],
103+
[AC_DEFINE([HAVE_UUID], 1,
104+
[Define to 1 if you have uuid_generate_random])])
105+
AC_SEARCH_LIBS([copy_file_range], [c],
106+
[AC_DEFINE([HAVE_COPY_FILE_RANGE], 1,
107+
[Define to 1 if you have copy_file_range])])
108+
AC_SEARCH_LIBS([fcopyfile], [c],
109+
[AC_DEFINE([HAVE_FCOPYFILE], 1,
110+
[Define to 1 if you have fcopyfile])])
111+
112+
AC_SEARCH_LIBS([log10], [m])
113+
AC_SEARCH_LIBS([lrint], [m])
114+
AC_SEARCH_LIBS([fabs], [m])
115+
116+
dnl Large File Support (LFS)
117+
AC_SYS_LARGEFILE
118+
AC_TYPE_OFF_T
119+
51120
# Checks for libraries.
52121
AC_SUBST([COMMON_LIBS])
53122
AC_SUBST([COMMON_CPPFLAGS])
@@ -182,78 +251,6 @@ OWNTONE_MODULES_CHECK([OWNTONE], [LIBAV],
182251

183252
AC_CHECK_SIZEOF([void *])
184253

185-
# Checks for header files.
186-
AC_CHECK_HEADERS_ONCE([regex.h pthread_np.h])
187-
AC_CHECK_HEADERS([sys/wait.h sys/param.h dirent.h getopt.h stdint.h], [],
188-
[AC_MSG_ERROR([[Missing header required to build OwnTone]])])
189-
AC_CHECK_HEADERS([time.h], [],
190-
[AC_MSG_ERROR([[Missing header required to build OwnTone]])])
191-
AC_CHECK_FUNCS_ONCE([posix_fadvise pipe2 gettid])
192-
AC_CHECK_FUNCS([strptime strtok_r], [],
193-
[AC_MSG_ERROR([[Missing function required to build OwnTone]])])
194-
195-
# check for clock_gettime or replace it
196-
AC_SEARCH_LIBS([clock_gettime], [rt],
197-
[AC_DEFINE([HAVE_CLOCK_GETTIME], 1,
198-
[Define to 1 if have clock_gettime function])],
199-
[AC_CHECK_HEADER([mach/mach_time.h],
200-
[AC_DEFINE([HAVE_MACH_CLOCK], 1,
201-
[Define to 1 if mach kernel clock replacement available])],
202-
[AC_MSG_ERROR([[Missing clock_gettime and any replacement]])])])
203-
204-
# check for timer_settime or replace it
205-
AC_SEARCH_LIBS([timer_settime], [rt],
206-
[AC_DEFINE([HAVE_TIMER_SETTIME], 1,
207-
[Define to 1 if have timer_settime function])],
208-
[AC_CHECK_HEADER([mach/mach_time.h],
209-
[AC_DEFINE([HAVE_MACH_TIMER], 1,
210-
[Define to 1 if mach kernel clock replacement available])],
211-
[AC_MSG_ERROR([[Missing timer_settime and any replacement]])])])
212-
213-
AC_SEARCH_LIBS([pthread_exit], [pthread], [],
214-
[AC_MSG_ERROR([[pthreads library is required]])])
215-
AC_SEARCH_LIBS([pthread_setname_np], [pthread],
216-
[# Validate pthread_setname_np with 2 args (some have 1)
217-
AC_MSG_CHECKING([[for two-parameter pthread_setname_np]])
218-
AC_LINK_IFELSE([AC_LANG_PROGRAM([[@%:@include <pthread.h>]],
219-
[[pthread_setname_np(pthread_self(), "name");]])],
220-
[AC_MSG_RESULT([yes])
221-
AC_DEFINE([HAVE_PTHREAD_SETNAME_NP], 1,
222-
[Define to 1 if you have pthread_setname_np])],
223-
[AC_MSG_RESULT([[no]])])],
224-
[AC_SEARCH_LIBS([pthread_set_name_np], [pthread],
225-
[AC_CHECK_FUNCS([pthread_set_name_np])])])
226-
AC_SEARCH_LIBS([pthread_getname_np], [pthread],
227-
[AC_DEFINE([HAVE_PTHREAD_GETNAME_NP], 1,
228-
[Define to 1 if you have pthread_getname_np])]
229-
[AC_SEARCH_LIBS([pthread_get_name_np], [pthread],
230-
[AC_DEFINE([HAVE_PTHREAD_GETNAME_NP], 1,
231-
[Define to 1 if you have pthread_get_name_np])])])
232-
AC_SEARCH_LIBS([pthread_getthreadid_np], [pthread],
233-
[AC_DEFINE([HAVE_PTHREAD_GETTHREADID_NP], 1,
234-
[Define to 1 if you have pthread_getthreadid_np])])
235-
AC_SEARCH_LIBS([uuid_generate_random], [uuid],
236-
[AC_DEFINE([HAVE_UUID], 1,
237-
[Define to 1 if you have uuid_generate_random])])
238-
AC_SEARCH_LIBS([copy_file_range], [c],
239-
[AC_DEFINE([HAVE_COPY_FILE_RANGE], 1,
240-
[Define to 1 if you have copy_file_range])])
241-
AC_SEARCH_LIBS([fcopyfile], [c],
242-
[AC_DEFINE([HAVE_FCOPYFILE], 1,
243-
[Define to 1 if you have fcopyfile])])
244-
245-
AC_SEARCH_LIBS([log10], [m])
246-
AC_SEARCH_LIBS([lrint], [m])
247-
AC_SEARCH_LIBS([fabs], [m])
248-
249-
# Large File Support (LFS)
250-
AC_SYS_LARGEFILE
251-
AC_TYPE_OFF_T
252-
253-
# Checks for typedefs, structures, and compiler characteristics.
254-
255-
# Checks for library functions.
256-
257254
dnl --- Begin configuring the options ---
258255
dnl Install config file
259256
OWNTONE_ARG_DISABLE([install configuration file], [install_conf_file], [INSTALL_CONF_FILE])

0 commit comments

Comments
 (0)