Bug 219450 - [PATCH] net/freeswitch: build broken with option ALL_MODULES enabled
Summary: [PATCH] net/freeswitch: build broken with option ALL_MODULES enabled
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Richard Gallamore
URL:
Keywords:
Depends on: 220149
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-22 09:41 UTC by Šimun Mikecin
Modified: 2017-08-07 09:44 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (corsmith)


Attachments
svn diff (1.38 KB, patch)
2017-05-22 09:41 UTC, Šimun Mikecin
no flags Details | Diff
svn diff patch to fix building with ALL_MODULES=yes (1.06 KB, patch)
2017-05-29 08:24 UTC, Šimun Mikecin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Šimun Mikecin 2017-05-22 09:41:25 UTC
Created attachment 182795 [details]
svn diff

If you enable option ALL_MODULES using "make config" build is broken. It ends with:

making all mod_http_cache
gmake[6]: Entering directory '/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src/mod/applications/mod_http_cache'
/bin/sh /usr/ports/net/freeswitch/work/freeswitch-1.6.13/libtool  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I../../../../src/include -I../../../../libs/esl/src/include -I../../../../libs/xmlrpc-c  -I/usr/local/include  -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src/include -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src/include -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/libs/libteletone/src -fPIC -DLIBICONV_PLUG -isystem /usr/local/include -I/usr/local/include -I/usr/local/include/uuid -I/usr/local/include  -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src/include -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src/include -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/libs/libteletone/src -fPIC -Werror -DENABLE_ZRTP -DHAVE_OPENSSL -Wall -std=c99 -pedantic -Wdeclaration-after-statement -O2 -pipe  -Wno-c11-extensions -Wno-deprecated-declarations -Wno-zero-length-array -Wno-incompatible-pointer-types -DLIBICONV_PLUG -fstack-protector -DLDAP_DEPRECATED -isystem /usr/local/include -fno-strict-aliasing -Wno-extended-offsetof -MT mod_http_cache_la-mod_http_cache.lo -MD -MP -MF .deps/mod_http_cache_la-mod_http_cache.Tpo -c -o mod_http_cache_la-mod_http_cache.lo `test -f 'mod_http_cache.c' || echo './'`mod_http_cache.c
libtool: compile:  cc -DHAVE_CONFIG_H -I. -I../../../../src/include -I../../../../libs/esl/src/include -I../../../../libs/xmlrpc-c -I/usr/local/include -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src/include -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src/include -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/libs/libteletone/src -fPIC -DLIBICONV_PLUG -isystem /usr/local/include -I/usr/local/include -I/usr/local/include/uuid -I/usr/local/include -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src/include -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src/include -I/usr/ports/net/freeswitch/work/freeswitch-1.6.13/libs/libteletone/src -fPIC -Werror -DENABLE_ZRTP -DHAVE_OPENSSL -Wall -std=c99 -pedantic -Wdeclaration-after-statement -O2 -pipe -Wno-c11-extensions -Wno-deprecated-declarations -Wno-zero-length-array -Wno-incompatible-pointer-types -DLIBICONV_PLUG -fstack-protector -DLDAP_DEPRECATED -isystem /usr/local/include -fno-strict-aliasing -Wno-extended-offsetof -MT mod_http_cache_la-mod_http_cache.lo -MD -MP -MF .deps/mod_http_cache_la-mod_http_cache.Tpo -c mod_http_cache.c  -fPIC -DPIC -o .libs/mod_http_cache_la-mod_http_cache.o
mod_http_cache.c:956:31: error: implicit declaration of function 'strndup' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                char *found_extension_dup = strndup(found_extension, found_extension_len);
                                            ^
mod_http_cache.c:956:31: note: did you mean 'strdup'?
/usr/include/string.h:85:7: note: 'strdup' declared here
char    *strdup(const char *) __malloc_like;
         ^
mod_http_cache.c:956:9: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Werror,-Wint-conversion]
                char *found_extension_dup = strndup(found_extension, found_extension_len);
                      ^                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
gmake[6]: *** [Makefile:576: mod_http_cache_la-mod_http_cache.lo] Error 1
gmake[6]: Leaving directory '/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src/mod/applications/mod_http_cache'
gmake[5]: *** [Makefile:588: mod_http_cache-all] Error 1
gmake[5]: Leaving directory '/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src/mod'
gmake[4]: *** [Makefile:484: all-recursive] Error 1
gmake[4]: Leaving directory '/usr/ports/net/freeswitch/work/freeswitch-1.6.13/src'
gmake[3]: *** [Makefile:3004: all-recursive] Error 1
gmake[3]: Leaving directory '/usr/ports/net/freeswitch/work/freeswitch-1.6.13'
gmake[2]: *** [Makefile:1123: all] Error 2
gmake[2]: Leaving directory '/usr/ports/net/freeswitch/work/freeswitch-1.6.13'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/net/freeswitch
*** Error code 1

Stop.
make: stopped in /usr/ports/net/freeswitch
Comment 1 Šimun Mikecin 2017-05-29 08:24:06 UTC
Created attachment 183028 [details]
svn diff patch to fix building with ALL_MODULES=yes

Adjusted to the latest commit.
Didn't bump PORTREVISION because it doesn't even build without this patch when ALL_MODULES=yes.
Comment 2 Richard Gallamore freebsd_committer freebsd_triage 2017-08-05 21:28:14 UTC
I just built the port with ALL_MODULES enabled with success. Can you please verify this patch is no longer required? This is the option config file I used.

# This file is auto-generated by 'make config'.
# Options for freeswitch-1.6.19
_OPTIONS_READ=freeswitch-1.6.19
_FILE_COMPLETE_OPTIONS_LIST=ALL_MODULES X11 8K 16K 32K 48K ENGLISH FRENCH RUSSIAN
OPTIONS_FILE_SET+=ALL_MODULES
OPTIONS_FILE_UNSET+=X11
OPTIONS_FILE_SET+=8K
OPTIONS_FILE_SET+=16K
OPTIONS_FILE_UNSET+=32K
OPTIONS_FILE_UNSET+=48K
OPTIONS_FILE_SET+=ENGLISH
OPTIONS_FILE_UNSET+=FRENCH
OPTIONS_FILE_UNSET+=RUSSIAN
Comment 3 Šimun Mikecin 2017-08-07 09:40:53 UTC
This patch is not required in version 1.6.19.