12.0-p3 amd64. Build fine with GCC on. End of build log with command "MAKE_JOBS_UNSAFE=yes portmaster net/asterisk16" (option GCC is off): gmake[3]: Entering directory '/opt/obj/usr/ports/net/asterisk16/work/asterisk-16.3.0/utils' cc -o astcanary.o -c astcanary.c -MD -MT astcanary.o -MF .astcanary.o.d -MP -pthread -I/opt/obj/usr/ports/net/asterisk16/work/asterisk-16.3.0/include -O2 -pipe -march=core2 -I/usr/local/include/lua53 -DLIBICONV_PLUG -fstack-protector -DLDAP_DEPRECATED -isystem /usr/local/include -fno-strict-aliasing -std=gnu89 -I/usr/local/include/libxml2 -I/usr/include -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fblocks -isystem /usr/local/include -DSTANDALONE -O3 -fno-partial-inlining -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -march=native -Wno-parentheses-equality -O2 -pipe -march=core2 -I/usr/local/include/lua53 -DLIBICONV_PLUG -fstack-protector -DLDAP_DEPRECATED -isystem /usr/local/include -fno-strict-aliasing -std=gnu89 -Wno-unused-value -Wno-parentheses-equality cc: error: unknown argument: '-fno-partial-inlining' gmake[3]: *** [/opt/obj/usr/ports/net/asterisk16/work/asterisk-16.3.0/Makefile.rules:159: astcanary.o] Error 1 gmake[3]: Leaving directory '/opt/obj/usr/ports/net/asterisk16/work/asterisk-16.3.0/utils' gmake[2]: *** [Makefile:386: utils] Error 2 gmake[2]: Leaving directory '/opt/obj/usr/ports/net/asterisk16/work/asterisk-16.3.0' *** Error code 1
Hi, The port is building fine on 12.0 in poudriere or the build cluster. I suspect there's something else, causing this issue. First of all I need to see the exact options you're building the port with, you can get those with make showconfig The full build log could be useful too, since I can't find the "-fno-partial-inlining" in the build log from poudriere, it could be useful to try to understand where it's coming from in your case. Could you share your /etc/make.conf file? Could you also share the output of "cc --version" on your system?
(In reply to Guido Falsi from comment #1) > The full build log could be useful too, since I can't find the > "-fno-partial-inlining" in the build log from poudriere, it could be useful > to try to understand where it's coming from in your case. I found the possible cause in an asterisk Makefile: # gcc version 8.2.1 and above must have partial-inlining disabled to avoid documented bug GCC_VER_GTE821:=$(shell expr `gcc --version | grep ^gcc | cut -d ' ' -f 3 | sed -e 's/\.\([0-9][0-9]\)/ \1/g' -e 's/\.\([0-9]\)/0\1/g' -e 's/^[0-9]\{3,4\}$$/&00/'` \>= 80201) ifeq ($(GCC_VER_GTE821),1) OPTIMIZE+=-fno-partial-inlining endif it's unconditionally running "gcc --version", so if you have a recent gcc installed it can trigger this. I'm preparing a fix for you to test.
Created attachment 203424 [details] asterisk13 patch
Created attachment 203425 [details] asterisk16 patch
Please test the attached patches. Should fix the issue.
Versions present in quarterly branch not affected.
(In reply to Guido Falsi from comment #5) Testing…
(In reply to VVD from comment #7) asterisk13 build fine with patch. Testing asterisk16… Ye, you are right about cc/gcc: $ cc --version FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: x86_64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin $ gcc --version gcc (FreeBSD Ports Collection) 8.3.0 Copyright (C) 2018 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.
(In reply to VVD from comment #8) asterisk16 build fine too - you can commit the patches. asterisk15 don't need the patch.
A commit references this bug: Author: madpilot Date: Sun Apr 7 16:18:55 UTC 2019 New revision: 498283 URL: https://svnweb.freebsd.org/changeset/ports/498283 Log: Fix build on live system when gcc 8 is also installed. PR: 237058 Submitted by: VVD <vvd@unislabs.com> Changes: head/net/asterisk13/files/patch-Makefile.rules
A commit references this bug: Author: madpilot Date: Sun Apr 7 16:19:14 UTC 2019 New revision: 498284 URL: https://svnweb.freebsd.org/changeset/ports/498284 Log: Fix build on live system when gcc 8 is also installed. PR: 237058 Submitted by: VVD <vvd@unislabs.com> Changes: head/net/asterisk16/files/patch-Makefile.rules
Committed. Thanks!