Hello, Freeswitch does not build when using the 17.0 profile. /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: -r and -pie may not be used together collect2: error: ld returned 1 exit status libtool: compile: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I./crypto/include -fPIC -Wall -O4 -fexpensive-optimizations -funroll-loops -I./src -Icrypto/include -I./include -I./crypto/include -fPIC -Wall -O4 -fexpensive-optimizations -funroll-loops -I./src -Icrypto/include -I./include -I./crypto/include -O2 -march=native -pipe -O2 -march=native -pipe -c crypto/math/math.c -fPIC -DPIC -o math.o make[2]: *** [Makefile:75: lbn00.o] Error 1 make[2]: Leaving directory '/var/tmp/portage/net-voip/freeswitch-1.6.19/work/freeswitch-1.6.19/libs/libzrtp/third_party/bnlib' make[1]: *** [Makefile:1167: all-recursive] Error 1 make[1]: Leaving directory '/var/tmp/portage/net-voip/freeswitch-1.6.19/work/freeswitch-1.6.19/libs/libzrtp' make: *** [Makefile:3903: libs/libzrtp/libzrtp.a] Error 2 . . . . [CREATE] vpx.pc [AR] libvpx_g.a [STRIP] libvpx.a < libvpx_g.a make[1]: Leaving directory '/var/tmp/portage/net-voip/freeswitch-1.6.19/work/freeswitch-1.6.19/libs/libvpx' * ERROR: net-voip/freeswitch-1.6.19::freeswitch failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=net-voip/freeswitch-1.6.19::freeswitch'`, * the complete build log and the output of `emerge -pqv '=net-voip/freeswitch-1.6.19::freeswitch'`. * The complete build log is located at '/var/log/portage/net-voip:freeswitch-1.6.19:20171204-105041.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/net-voip/freeswitch-1.6.19/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-voip/freeswitch-1.6.19/temp/environment'. * Working directory: '/var/tmp/portage/net-voip/freeswitch-1.6.19/work/freeswitch-1.6.19' * S: '/var/tmp/portage/net-voip/freeswitch-1.6.19/work/freeswitch-1.6.19' !!! When you file a bug report, please include the following information: GENTOO_VM= CLASSPATH="" JAVA_HOME="" JAVACFLAGS="" COMPILER="" and of course, the output of emerge --info =freeswitch-1.6.19 * !!! User patches were applied to this build! >>> Failed to emerge net-voip/freeswitch-1.6.19, Log file: >>> '/var/log/portage/net-voip:freeswitch-1.6.19:20171204-105041.log' * Messages for package net-voip/freeswitch-1.6.19: * Log file: /var/log/portage/net-voip:freeswitch-1.6.19:20171204-105041.log * ERROR: net-voip/freeswitch-1.6.19::freeswitch failed (compile phase): * emake failed * * If you need support, post the output of `emerge --info '=net-voip/freeswitch-1.6.19::freeswitch'`, * the complete build log and the output of `emerge -pqv '=net-voip/freeswitch-1.6.19::freeswitch'`. * The complete build log is located at '/var/log/portage/net-voip:freeswitch-1.6.19:20171204-105041.log'. * For convenience, a symlink to the build log is located at '/var/tmp/portage/net-voip/freeswitch-1.6.19/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/net-voip/freeswitch-1.6.19/temp/environment'. * Working directory: '/var/tmp/portage/net-voip/freeswitch-1.6.19/work/freeswitch-1.6.19' * S: '/var/tmp/portage/net-voip/freeswitch-1.6.19/work/freeswitch-1.6.19' Thanks
-fPIC -Wall -O4 -fexpensive-optimizations -funroll-loops Please post your `emerge --info` output in a comment.
I have been to compiling freeswitch manually as well with 17.0 profile. I get similar error, make[2]: Leaving directory '/home/xx/tmp/fs1.6/freeswitch.git/libs/apr-util' make[1]: Leaving directory '/home/xx/tmp/fs1.6/freeswitch.git/libs/apr-util' CXXLD libfreeswitch_libyuv.la *** Warning: Linking the shared library libfreeswitch_libyuv.la against the *** static library libs/libzrtp/third_party/bnlib/libbn.a is not portable! cd libs/libzrtp && make make[1]: Entering directory '/home/xx/tmp/fs1.6/freeswitch.git/libs/libzrtp' Making all in third_party/bnlib make[2]: Entering directory '/home/xx/tmp/fs1.6/freeswitch.git/libs/libzrtp/third_party/bnlib' gcc -std=c99 -O2 -g3 -Wall -Wextra -Wno-unused-parameter -fno-strict-aliasing -fPIC -DZRTP_AUTOMAKE=1 -DHAVE_CONFIG_H -I../../include -I../../include/enterprise -I../../projects/gnu/config -I../../third_party/bgaes -I. -I. -o lbn00.o -Wl,-r -nostdlib lbn00.c -lgcc /usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/../../../../x86_64-pc-linux-gnu/bin/ld: -r and -pie may not be used together collect2: error: ld returned 1 exit status make[2]: *** [Makefile:75: lbn00.o] Error 1 make[2]: Leaving directory '/home/xx/tmp/fs1.6/freeswitch.git/libs/libzrtp/third_party/bnlib' make[1]: *** [Makefile:1167: all-recursive] Error 1 make[1]: Leaving directory '/home/xx/tmp/fs1.6/freeswitch.git/libs/libzrtp' make: *** [Makefile:3903: libs/libzrtp/libzrtp.a] Error 2
ugrading to the gcc-6.4.0 helped fix this issue.
ugrading to gcc-6.4.0 fixed the issue.
Created attachment 517716 [details] Freeswitch build failure log Hello, This error has cropped up again and is failing the builds. Thanks
Hello, This error has cropped up again. Please let me know if I can provide more details. Thanks
https://freeswitch.org/jira/browse/FS-4260?jql=text%20~%20%22bnlib%22 is the relevant upstream fix. This issue is fixed in Freeswitch 1.8
This is more relevant https://freeswitch.org/jira/browse/FS-10471
Created attachment 517720 [details, diff] Build error with --enable-zrtp on debian 9 and similar newer gcc versions from https://freeswitch.org/jira/browse/FS-10471
Created attachment 517722 [details, diff] The attached FS-10471 fix is not helping The original fix is only changing the configure.ac whereas the package is shipping configure too. This patch fixes both configure.ac and configure
I integrated Joe M's patch in the 1.6.19-r1 ebuild of the freeswitch overlay. This allows FreeSwitch to be built using GCC 6. I was hoping for an upstream release to fix this, but this works, too. Thanks for devising a patch. The Freeswitch build is utterly broken with all the bundled libs, so I appreciate your work!