Open CpuID opened 5 years ago
Also, when I tried doing the build using the normal make
module helpers, it claimed Unknown target mod_wsbridge
which is weird... which is why I tried make
from within the module directory itself above.
root@dev1:/tmp/work_dir/freeswitch# make mod_wsbridge-install
make[1]: Entering directory '/tmp/work_dir/freeswitch'
/bin/mkdir -p '/usr/local/freeswitch/lib'
/bin/bash /tmp/work_dir/freeswitch/libtool --mode=install /usr/bin/install -c libfreeswitch.la '/usr/local/freeswitch/lib'
libtool: install: /usr/bin/install -c .libs/libfreeswitch.so.1.0.0 /usr/local/freeswitch/lib/libfreeswitch.so.1.0.0
libtool: install: (cd /usr/local/freeswitch/lib && { ln -s -f libfreeswitch.so.1.0.0 libfreeswitch.so.1 || { rm -f libfreeswitch.so.1 && ln -s libfreeswitch.so.1.0.0 libfreeswitch.so.1; }; })
libtool: install: (cd /usr/local/freeswitch/lib && { ln -s -f libfreeswitch.so.1.0.0 libfreeswitch.so || { rm -f libfreeswitch.so && ln -s libfreeswitch.so.1.0.0 libfreeswitch.so; }; })
libtool: install: /usr/bin/install -c .libs/libfreeswitch.lai /usr/local/freeswitch/lib/libfreeswitch.la
libtool: install: /usr/bin/install -c .libs/libfreeswitch.a /usr/local/freeswitch/lib/libfreeswitch.a
libtool: install: chmod 644 /usr/local/freeswitch/lib/libfreeswitch.a
libtool: install: ranlib /usr/local/freeswitch/lib/libfreeswitch.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/local/freeswitch/lib
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/freeswitch/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
make[1]: Leaving directory '/tmp/work_dir/freeswitch'
make[1]: Entering directory '/tmp/work_dir/freeswitch/src/mod'
make[2]: Entering directory '/tmp/work_dir/freeswitch/src/mod'
Unknown target mod_wsbridge-install
make[2]: *** [Makefile:744: mod_wsbridge-install-all] Error 1
make[2]: Leaving directory '/tmp/work_dir/freeswitch/src/mod'
make[1]: *** [Makefile:744: mod_wsbridge-install] Error 2
make[1]: Leaving directory '/tmp/work_dir/freeswitch/src/mod'
make: *** [Makefile:4355: mod_wsbridge-install] Error 2
root@dev1:/tmp/work_dir/freeswitch# make mod_wsbridge
make[1]: Entering directory '/tmp/work_dir/freeswitch'
make libfreeswitch.la
make[2]: Entering directory '/tmp/work_dir/freeswitch'
make[2]: Leaving directory '/tmp/work_dir/freeswitch'
make[1]: Leaving directory '/tmp/work_dir/freeswitch'
make[1]: Entering directory '/tmp/work_dir/freeswitch/src/mod'
make[2]: Entering directory '/tmp/work_dir/freeswitch/src/mod'
Unknown target mod_wsbridge
make[2]: *** [Makefile:744: mod_wsbridge-all] Error 1
make[2]: Leaving directory '/tmp/work_dir/freeswitch/src/mod'
make[1]: *** [Makefile:744: mod_wsbridge] Error 2
make[1]: Leaving directory '/tmp/work_dir/freeswitch/src/mod'
make: *** [Makefile:4355: mod_wsbridge] Error 2
The C compiler on Debian Buster does not like strncpy. You need to replace the statement with snprintf. It builds just fine on older Debian 9.
Thx will give it a try. If it works I'll drop a patch somewhere for others.
I have tried replacing strncpy with snprintf but get a very similar error. What seemed to work for me is disable the stringop-truncation
check. So I ran
CFLAGS="-g -O2 -Wno-stringop-truncation" MOD_CFLAGS="-g -O2 -Wno-stringop-truncation" ./configure
instead of just ./configure
@svh-pad
I have tried replacing strncpy with snprintf but get a very similar error. What seemed to work for me is disable the
stringop-truncation
check. So I ranCFLAGS="-g -O2 -Wno-stringop-truncation" MOD_CFLAGS="-g -O2 -Wno-stringop-truncation" ./configure
instead of just
./configure
where did you make the replacement?
@we-do-ai-admin
where did you make the replacement?
It's been a while so I don't remember the details, sorry. To be honest as I'm looking at it now I wonder if it was the wsbridge module or if I ran into the error somewhere else (I remember having had difficulty compiling FreeTDM). What I did was look up the line numbers for which I saw the error and for each of those lines replace strncpy
by the (what seemed to me) appropriate snprintf
statement. As I mentioned I solved my issue by just turning off the warnings, I didn't feel confident I'd be able to fix the implementation.
Hi there,
Has anyone come across this so far...?
Some system details below:
Possibly some minor C tweaks required...? Or adjust some CFLAGS...?