Hi there,
I am trying to build the bare-bones userspace daemon on RHEL 9 on the latest tagged release, but running into SpanDSP build issues.
My process:
$ git checkout mr13.5.1.1
$ cd daemon
$ make with_transcoding=no with_iptables_option=no all
I am running into this:
-------
cc -c -g -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wstrict-prototypes -Werror=return-type -Wshadow -pthread -std=c11 -I. -I../kernel-module/ -I../lib/ -I../include/ -Iprivate -D_GNU_SOURCE -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -DPCRE2_CODE_UNIT_WIDTH=8 -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/libmount -I/usr/include/blkid -pthread -DWITHOUT_CODECLIB -DRTPENGINE_VERSION="\"git-HEAD-5cc129ff\"" -O3 -flto=auto -ffat-lto-objects -fPIE cli.strhash.c -o cli.strhash.o
../utils/build_test_wrapper "../lib/spandsp_logging.h" 2> /dev/null
Looking for usable alternative for ../lib/spandsp_logging.h
Trying build with ../lib/spandsp_logging-01.h
make[2]: Entering directory '/usr/src/rtpengine/daemon'
cc -g -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wstrict-prototypes -Werror=return-type -Wshadow -pthread -std=c11 -I. -I../kernel-module/ -I../lib/ -I../include/ -Iprivate -D_GNU_SOURCE -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -DPCRE2_CODE_UNIT_WIDTH=8 -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/libmount -I/usr/include/blkid -pthread -DWITHOUT_CODECLIB -DRTPENGINE_VERSION="\"git-HEAD-5cc129ff\"" -O3 -flto=auto -ffat-lto-objects -fPIE -rdynamic -flto=auto -pie ../lib/spandsp_logging-test.c -lm -ldl -lglib-2.0 -lgthread-2.0 -pthread -lglib-2.0 -lz -lpcre2-8 -lcurl -lcrypto -lssl -lcrypto -levent_pthreads -levent -lpcap -lhiredis -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lwebsockets -lmnl -latomic -o ../lib/spandsp_logging-test
make[2]: Leaving directory '/usr/src/rtpengine/daemon'
Failed build with ../lib/spandsp_logging-01.h
Trying build with ../lib/spandsp_logging-02.h
make[2]: Entering directory '/usr/src/rtpengine/daemon'
cc -g -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wstrict-prototypes -Werror=return-type -Wshadow -pthread -std=c11 -I. -I../kernel-module/ -I../lib/ -I../include/ -Iprivate -D_GNU_SOURCE -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -DPCRE2_CODE_UNIT_WIDTH=8 -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/libmount -I/usr/include/blkid -pthread -DWITHOUT_CODECLIB -DRTPENGINE_VERSION="\"git-HEAD-5cc129ff\"" -O3 -flto=auto -ffat-lto-objects -fPIE -rdynamic -flto=auto -pie ../lib/spandsp_logging-test.c -lm -ldl -lglib-2.0 -lgthread-2.0 -pthread -lglib-2.0 -lz -lpcre2-8 -lcurl -lcrypto -lssl -lcrypto -levent_pthreads -levent -lpcap -lhiredis -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lwebsockets -lmnl -latomic -o ../lib/spandsp_logging-test
make[2]: Leaving directory '/usr/src/rtpengine/daemon'
Failed build with ../lib/spandsp_logging-02.h
make[1]: *** [../lib/common.Makefile:74: ../lib/spandsp_logging.h] Error 1
make[1]: Leaving directory '/usr/src/rtpengine/daemon'
make: *** [Makefile:15: all] Error 2
-------
For whatever it's worth, here's the direct output of the "build_test_wrapper" step:
-------
[root@ip-172-31-18-34 daemon]# ../utils/build_test_wrapper "../lib/spandsp_logging.h"
Looking for usable alternative for ../lib/spandsp_logging.h
Trying build with ../lib/spandsp_logging-01.h
cc -g -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wstrict-prototypes -Werror=return-type -Wshadow -pthread -std=c11 -I. -I../kernel-module/ -I../lib/ -I../include/ -Iprivate -D_GNU_SOURCE -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -DPCRE2_CODE_UNIT_WIDTH=8 -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/libmount -I/usr/include/blkid -pthread -DWITH_IPTABLES_OPTION -DWITH_TRANSCODING -DRTPENGINE_VERSION="\"git-HEAD-5cc129ff\"" -O3 -flto=auto -ffat-lto-objects -fPIE -rdynamic -flto=auto -pie ../lib/spandsp_logging-test.c -lm -ldl -lglib-2.0 -lgthread-2.0 -pthread -lglib-2.0 -lz -lpcre2-8 -lcurl -lcrypto -lssl -lcrypto -levent_pthreads -levent -lpcap -lhiredis -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lwebsockets -lmnl -lspandsp -latomic -o ../lib/spandsp_logging-test
In file included from ../lib/spandsp_logging-test.c:9:
../lib/spandsp_logging.h: In function ‘my_span_set_log’:
../lib/spandsp_logging.h:5:9: error: too few arguments to function ‘span_log_set_message_handler’
5 | span_log_set_message_handler(ls, h);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../lib/spandsp_logging-test.c:7:
/usr/include/spandsp/logging.h:123:20: note: declared here
123 | SPAN_DECLARE(void) span_log_set_message_handler(logging_state_t *s, message_handler_func_t func, void *user_data);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../lib/spandsp_logging-test.c:9:
../lib/spandsp_logging.h: In function ‘my_span_mh’:
../lib/spandsp_logging.h:8:9: error: too few arguments to function ‘span_set_message_handler’
8 | span_set_message_handler(h);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../lib/spandsp_logging-test.c:7:
/usr/include/spandsp/logging.h:125:20: note: declared here
125 | SPAN_DECLARE(void) span_set_message_handler(message_handler_func_t func, void *user_data);
| ^~~~~~~~~~~~~~~~~~~~~~~~
../lib/spandsp_logging-test.c: In function ‘main’:
../lib/spandsp_logging-test.c:18:29: warning: passing argument 2 of ‘my_span_set_log’ from incompatible pointer type [-Wincompatible-pointer-types]
18 | my_span_set_log(ls, logfunc);
| ^~~~~~~
| |
| void (*)(int, const char *)
In file included from ../lib/spandsp_logging-test.c:9:
../lib/spandsp_logging.h:4:73: note: expected ‘message_handler_func_t’ {aka ‘void (*)(void *, int, const char *)’} but argument is of type ‘void (*)(int, const char *)’
4 | INLINE void my_span_set_log(logging_state_t *ls, message_handler_func_t h) {
| ~~~~~~~~~~~~~~~~~~~~~~~^
make: *** [<builtin>: ../lib/spandsp_logging-test] Error 1
Failed build with ../lib/spandsp_logging-01.h
Trying build with ../lib/spandsp_logging-02.h
cc -g -Wall -Wextra -Wno-sign-compare -Wno-unused-parameter -Wstrict-prototypes -Werror=return-type -Wshadow -pthread -std=c11 -I. -I../kernel-module/ -I../lib/ -I../include/ -Iprivate -D_GNU_SOURCE -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -pthread -DPCRE2_CODE_UNIT_WIDTH=8 -I/usr/include/json-glib-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/include/libmount -I/usr/include/blkid -pthread -DWITH_IPTABLES_OPTION -DWITH_TRANSCODING -DRTPENGINE_VERSION="\"git-HEAD-5cc129ff\"" -O3 -flto=auto -ffat-lto-objects -fPIE -rdynamic -flto=auto -pie ../lib/spandsp_logging-test.c -lm -ldl -lglib-2.0 -lgthread-2.0 -pthread -lglib-2.0 -lz -lpcre2-8 -lcurl -lcrypto -lssl -lcrypto -levent_pthreads -levent -lpcap -lhiredis -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lwebsockets -lmnl -lspandsp -latomic -o ../lib/spandsp_logging-test
/usr/bin/ld: cannot find /usr/lib64/libatomic.so.1.2.0
collect2: error: ld returned 1 exit status
make: *** [<builtin>: ../lib/spandsp_logging-test] Error 1
Failed build with ../lib/spandsp_logging-02.h
-------
Notes:
- I have tried with the libspandsp 0.0.6 libs that come packaged stock, and also tried with libspandsp 3 packages from other distros, on the strength of this commit:
-------
commit f07dd416e05c2cb6494b859c323b7649322d1711
Author: Andrew Solovjov <
solo...@mcn.ru>
Date: Thu Nov 28 15:29:41 2024 +0300
MT#55283 Fix EL build errors
* Added libatomic to the el/ build dependencies. This was required since
commit 741f6ac when -latomic was added to lib/common.Makefile
* Changed link to the copr repo with spandsp3. There is seperate repo
for EL9 now.
Closes #1880
Change-Id: I9ba2246bd0f2fa6f2d6196d6c66a527f5f1dd3f0
-------
However, that didn't seem to change anything.
- I don't understand why any SpanDSP-related stuff is being built at all, given that I requested to build without transcoding. At least, that's what I would have expected:
-------
commit ab8b25cca8e4b3c80ece98670c768bb77a31f6cc
Author: Richard Fuchs <
rfu...@sipwise.com>
Date: Wed May 19 08:24:42 2021 -0400
TT#14008 conditionally disable spandsp build test
When building using with_transcoding=no we should not expect spandsp to
be available as it's not even being used.
closes #1267
Change-Id: I2c8e0407b4dd46cfdd5322cd377b664955ad7c74
-------
- I have tried a few tagged releases back as well, with same result.
Any guidance appreciated!
-- Alex
--
Alex Balashov
Principal Consultant
Evariste Systems LLC
Web:
https://evaristesys.com,
https://www.csrpswitch.com
Tel:
+1-706-510-6800