signalwire / freeswitch

FreeSWITCH is a Software Defined Telecom Stack enabling the digital transformation from proprietary telecom switches to a versatile software implementation that runs on any commodity hardware. From a Raspberry PI to a multi-core server, FreeSWITCH can unlock the telecommunications potential of any device.
https://freeswitch.com/#getting-started
Other
3.56k stars 1.41k forks source link

switch_core.c:3569:67: error: a function declaration without a prototype is deprecated in all versions of C #2017

Closed MarioG-X closed 1 year ago

MarioG-X commented 1 year ago

Describe the bug The C language deprecated some syntax and elements over the years. Some FreeSwitch code contains deprecated items that until recently, was allowed to compile. Recent C/C++ compilers are now disallowing the oldest deprecated code, and from what I found on the web, this started in 2020 and is going to get worse with the next compiler releases.

This is on an Intel Mac so it is not related to Apple Silicon.

Starting with the current Xcode/Command Line Tools 14.3, this deprecated code is no longer allowed to compile as a warning, but is now an error. So make now fails with the messages below. I tried: ./configure cxxflags='-Wno-strict-prototypes' but it made no difference.

  CC       src/libfreeswitch_la-switch_core.lo
src/switch_core.c:3569:67: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
SWITCH_DECLARE(uint16_t) switch_core_get_rtp_port_range_start_port()
                                                                  ^
                                                                   void
src/switch_core.c:3580:65: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
SWITCH_DECLARE(uint16_t) switch_core_get_rtp_port_range_end_port()
                                                                ^
                                                                 void
2 errors generated.
make[1]: *** [src/libfreeswitch_la-switch_core.lo] Error 1

To Reproduce Download master, bootstrap, config, make

Expected behavior Make success.

Package version or git hash commit 04dd67da00d3e55dfb543dae098b8a14357ccb1e (HEAD -> master, origin/master, origin/HEAD)

jakubkarolczyk commented 1 year ago

we published latest version of sofia-sip today, please update, should be ver 1.13.16

MarioG-X commented 1 year ago

Wow finally got to build to the end. Thank you! What can be done about Flite? It's in the wiki as mod_flite, I have it on the macOS wiki and it's used in the FreeSwitch Cookbook examples.

Do think it should be dropped? Looks like no one worked on it since early 2022.

briankwest commented 1 year ago

If issue are still outstanding with the library you'll need to go upstream and engage to get those resolved.

MarioG-X commented 1 year ago

Thanks, I will just leave it out, not sure how many people use it. I originally had it in Wiki and FS installer because it was in the original FreeSwitch cookbook many years ago. I opened https://github.com/festvox/flite/issues/96 there anyway. I was going to close this but you beat me to it!