My builds which were successful in 22.10.1 are now failing during the pjproject configure script. I assume this is related to commit 9778364 but I’m not knowledgeable enough to know if it’s something I can/should resolve in my build environment.
A log excerpt from third-party/pjproject/source/config.log is below, the full log is at asterisk 22.11 pjproject aconfigure log - Pastebin.com
aconfigure:3779: $? = 0
aconfigure:3830: result: yes
aconfigure:3834: checking for C compiler default output file name
aconfigure:3836: result: a.out
aconfigure:3842: checking for suffix of executables
aconfigure:3849: gcc -o conftest -DPJ_HAS_LINUX_EPOLL=1 -m64 -Wl,--as-needed,--library-path=/usr/lib64 -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -lssl -lcrypto conftest.c >&5
aconfigure:3853: $? = 0
aconfigure:3877: result:
aconfigure:3901: checking whether we are cross compiling
aconfigure:3909: gcc -o conftest -DPJ_HAS_LINUX_EPOLL=1 -m64 -Wl,--as-needed,--library-path=/usr/lib64 -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -lssl -lcrypto conftest.c >&5
/usr/bin/ld: /tmp/ccZR4uFH.o: relocation R_X86_64_32 against `.rodata' can not be used when making a PIE object; recompile with -fPIE
collect2: error: ld returned 1 exit status
aconfigure:3913: $? = 1
aconfigure:3920: ./conftest
./aconfigure: line 3922: ./conftest: No such file or directory
aconfigure:3924: $? = 127
aconfigure:3931: error: in '/root/rpmbuild/BUILD/asterisk-22.11.0/third-party/pjproject/source':
aconfigure:3933: error: cannot run C compiled programs.
If you meant to cross compile, use '--host'.
See 'config.log' for more details
We are building from a private fork of the EPEL RPM, so most of those flags (like -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1) are getting set automatically. The contents of /usr/lib/rpm/redhat/redhat-hardened-ld look like they might be related to the error in the log:
*self_spec:
+ %{!static:%{!shared:%{!r:-pie}}}
Contents of /usr/lib/rpm/redhat/redhat-annobin-cc1 are:
*cc1_options:
+ %{!-fno-use-annobin:%{!iplugindir*:%:find-plugindir()} -fplugin=annobin}