freeswitch icon indicating copy to clipboard operation
freeswitch copied to clipboard

needed for build on Fedora 36

Open redder86 opened this issue 3 years ago • 2 comments

I am testing FreeSWITCH on Fedora 36. For me to build successfully I had to change libs/apr/include/apr_general.h as follows:

diff --git a/libs/apr/include/apr_general.h b/libs/apr/include/apr_general.h index 3a956288e3..5fff6c1af5 100644 --- a/libs/apr/include/apr_general.h +++ b/libs/apr/include/apr_general.h @@ -29,9 +29,11 @@ #include "apr_pools.h" #include "apr_errno.h"

+/* #if !defined(_ANSI_SOURCE) && defined(_DARWIN_C_SOURCE) #define NSIG __DARWIN_NSIG #endif +*/

#if APR_HAVE_SIGNAL_H #include <signal.h>

... and then I also had to:

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export CPPFLAGS="-Wno-error=deprecated-declarations -Wno-error=address"

... before running ./configure

There seems to be use of deprecated OpenSSL functions and multiple places where a pointer which could never be NULL was used as a boolean. Hence the need for the CPPFLAGS export. The PKG_CONFIG_PATH export was expected per FreeSWITCH documentation since this is normal for Fedora/CentOS/RedHat systems where source-installed spandsp is found in /usr/local.

redder86 avatar May 17 '22 18:05 redder86

And, actually... if I don't disable as many items in modules.conf I need to:

export CPPFLAGS="-Wno-error=deprecated-declarations -Wno-error=address -Wno-error=pedantic -Wno-error=stringop-truncation -Wno-error=array-bounds -Wno-error=maybe-uninitialized"

redder86 avatar May 29 '22 20:05 redder86

I tried with latest git master (7f0edeafccb6f58b999211f47805cb8547768102) on Ubuntu Jammy 22.04 but the problem is same that on Fedora 36. Maybe GCC version is too new.

$ gcc --version
gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

arvatoth-vcc avatar Jun 03 '22 13:06 arvatoth-vcc