<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Jira is already filed: <a href="https://freeswitch.org/jira/browse/FS-8883" class="">https://freeswitch.org/jira/browse/FS-8883</a> ... waiting on response to my comment still <div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 2, 2016, at 1:25 PM, Anthony Minessale <<a href="mailto:anthony.minessale@gmail.com" class="">anthony.minessale@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Open a JIRA in the platform category <a href="https://freeswitch.org/jira" class="">https://freeswitch.org/jira</a><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Feb 23, 2016 at 10:28 PM, <span dir="ltr" class=""><<a href="mailto:freeswitch-dev.opencode@spamgourmet.com" target="_blank" class="">freeswitch-dev.opencode@spamgourmet.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm getting a compilation error compiling the latest production release (1.6.6) when using --disable-debug with certain (as yet undermined) environment settings. The approximate steps I'm following are:<br class="">
curl -O <a href="https://files.freeswitch.org/releases/freeswitch/freeswitch-1.6.6.tar.xz" rel="noreferrer" target="_blank" class="">https://files.freeswitch.org/releases/freeswitch/freeswitch-1.6.6.tar.xz</a><br class="">
tar -xvf freeswitch-1.6.6.tar.xz<br class="">
cd freeswitch-1.6.6<br class="">
./configure --disable-debug<br class="">
make<br class="">
<br class="">
Except I'm using makepkg, the build tool for Arch Linux. (It's ultimately for Arch Linux ARM on a Raspberry Pi Zero, but the same thing happens with normal x86_64 Arch Linux). When I use the exact steps above in a shell, make succeeds, but when I run the equivalent within ArchLinux's makepkg tool, I'm getting the following error (lightly sanitized):<br class="">
CC freeswitch-switch.o<br class="">
src/switch.c: In function ‘main’:<br class="">
src/switch.c:1194:5: error: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Werror=unused-result]<br class="">
(void)read(fds[1], &v, sizeof(v));<br class="">
^<br class="">
src/switch.c: In function ‘check_fd’:<br class="">
src/switch.c:236:5: error: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Werror=unused-result]<br class="">
(void)write(fd, &r, sizeof(r));<br class="">
^<br class="">
cc1: all warnings being treated as errors<br class="">
Makefile:1988: recipe for target 'freeswitch-switch.o' failed<br class="">
make[2]: *** [freeswitch-switch.o] Error 1<br class="">
make[2]: Leaving directory '~/builds/freeswitch/src/freeswitch-1.6.6'<br class="">
Makefile:2420: recipe for target 'all-recursive' failed<br class="">
make[1]: *** [all-recursive] Error 1<br class="">
make[1]: Leaving directory '~/builds/freeswitch/src/freeswitch-1.6.6'<br class="">
Makefile:970: recipe for target 'all' failed<br class="">
make: *** [all] Error 2<br class="">
<br class="">
In parallel, I'm checking with the Arch Linux folks for help understanding the makepkg environment (perhaps some compilation *FLAGS environment variables?) that are likely needed to reproduce the error on other distributions. I'll reply further if I get better data from them.<br class="">
<br class="">
However, from a look at <a href="http://configure.ac/" rel="noreferrer" target="_blank" class="">configure.ac</a>, it does appear that unused result warnings/errors are being suppressed via SWITCH_AM_CFLAGS perhaps only in when debug is enabled:<br class="">
if test "${enable_debug}" = "yes"; then<br class="">
AC_DEFINE([DEBUG],[],[Enable extra debugging.])<br class="">
saved_CFLAGS="$CFLAGS"<br class="">
CFLAGS=<br class="">
AX_CFLAGS_WARN_ALL_ANSI<br class="">
SWITCH_ANSI_CFLAGS=$CFLAGS<br class="">
CFLAGS="$saved_CFLAGS"<br class="">
<br class="">
if test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then<br class="">
if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then<br class="">
APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-unused-result)<br class="">
fi<br class="">
APR_ADDTO(SWITCH_AM_CFLAGS, -g -ggdb)<br class="">
export DEBUG_CFLAGS="-g -ggdb"<br class="">
fi<br class="">
<br class="">
fi<br class="">
<br class="">
Though I'm a newbie so I may be missing something obvious. (For one, I don't yet understand the difference between SWITCH_AM_CFLAGS and other related variable(s).)<br class="">
<br class="">
I'm currently working around the error using the following patch:<br class="">
--- configure.ac.old 2016-02-23 16:50:04.190884018 -0800<br class="">
+++ <a href="http://configure.ac/" rel="noreferrer" target="_blank" class="">configure.ac</a> 2016-02-23 16:50:29.103970709 -0800<br class="">
@@ -410,6 +410,7 @@<br class="">
APR_ADDTO(SWITCH_AM_CXXFLAGS, -fPIC)<br class="">
if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then<br class="">
APR_ADDTO(SWITCH_AM_CFLAGS, -Werror)<br class="">
+ APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-unused-result)<br class="">
fi<br class="">
if test "${enable_64}" = "yes"; then<br class="">
case "$host" in<br class="">
@@ -533,9 +534,6 @@<br class="">
CFLAGS="$saved_CFLAGS"<br class="">
<br class="">
if test "x${ax_cv_c_compiler_vendor}" = "xgnu" ; then<br class="">
- if test "$ac_cv_gcc_supports_w_no_unused_result" = yes; then<br class="">
- APR_ADDTO(SWITCH_AM_CFLAGS, -Wno-unused-result)<br class="">
- fi<br class="">
APR_ADDTO(SWITCH_AM_CFLAGS, -g -ggdb)<br class="">
export DEBUG_CFLAGS="-g -ggdb"<br class="">
fi<br class="">
<br class="">
<br class="">
Can you tell whether I'm on the right track here (is this a bug in freeswitch's configure script)? If this is the right fix (or close to it), would you be interested in taking it?<br class="">
<br class="">
(And apologies if this isn't the best way to format code snippets for this mailing list; please let me know if there's a better way.)<br class="">
<br class="">
Thanks,<br class="">
<br class="">
David<br class="">
<br class="">
<br class="">
_________________________________________________________________________<br class="">
Professional FreeSWITCH Consulting Services:<br class="">
<a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class="">
<a href="http://www.freeswitchsolutions.com/" rel="noreferrer" target="_blank" class="">http://www.freeswitchsolutions.com</a><br class="">
<br class="">
Official FreeSWITCH Sites<br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class="">
<a href="http://wiki.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://wiki.freeswitch.org</a><br class="">
<a href="http://www.cluecon.com/" rel="noreferrer" target="_blank" class="">http://www.cluecon.com</a><br class="">
<br class="">
FreeSWITCH-dev mailing list<br class="">
<a href="mailto:FreeSWITCH-dev@lists.freeswitch.org" class="">FreeSWITCH-dev@lists.freeswitch.org</a><br class="">
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br class="">
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-dev" rel="noreferrer" target="_blank" class="">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br class="">
<a href="http://www.freeswitch.org/" rel="noreferrer" target="_blank" class="">http://www.freeswitch.org</a><br class="">
</blockquote></div><br class=""><br clear="all" class=""><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class="">Anthony Minessale II ♬ @anthmfs ♬ @FreeSWITCH ♬<div class=""><br class=""><div class="">☞ <a href="http://freeswitch.org/" target="_blank" class="">http://freeswitch.org/</a> ☞ <a href="http://cluecon.com/" target="_blank" class="">http://cluecon.com/</a> ☞ <a href="http://twitter.com/FreeSWITCH" target="_blank" class="">http://twitter.com/FreeSWITCH</a></div><div class=""><div class="">☞ <a href="http://irc.freenode.net/" target="_blank" class="">irc.freenode.net</a> #freeswitch ☞ <u class=""><a href="http://freeswitch.org/g+" target="_blank" class="">http://freeswitch.org/g+</a></u><br class=""><br class=""></div><div class="">ClueCon Weekly Development Call <br class=""></div><div class="">☎ <a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank" class="">sip:888@conference.freeswitch.org</a> ☎ +19193869900 </div><div class=""><br class=""></div></div></div><div class=""><a href="https://www.youtube.com/watch?v=9XXgW34t40s" style="color:rgb(17,85,204);font-size:12.8000001907349px" target="_blank" class="">https://www.youtube.com/watch?v=9XXgW34t40s</a></div><div class=""><a href="https://www.youtube.com/watch?v=NLaDpGQuZDA" target="_blank" class="">https://www.youtube.com/watch?v=NLaDpGQuZDA</a><br class=""></div></div></div></div></div></div></div>
</div>
_________________________________________________________________________<br class="">Professional FreeSWITCH Consulting Services:<br class=""><a href="mailto:consulting@freeswitch.org" class="">consulting@freeswitch.org</a><br class="">http://www.freeswitchsolutions.com<br class=""><br class="">Official FreeSWITCH Sites<br class="">http://www.freeswitch.org<br class="">http://wiki.freeswitch.org<br class="">http://www.cluecon.com<br class=""><br class="">FreeSWITCH-dev mailing list<br class="">FreeSWITCH-dev@lists.freeswitch.org<br class="">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev<br class="">UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev<br class="">http://www.freeswitch.org<br class=""></div></blockquote></div><br class=""></div></body></html>