Bug#885610: asterisk: FTBFS on hppa - conflicting -fPIC and -fno-pie compile options
John David Anglin
dave.anglin at bell.net
Thu Dec 28 15:38:00 UTC 2017
Package: asterisk
Version: 1:13.18.5~dfsg-1
Severity: normal
Dear Maintainer,
Asterisk fails to build on hppa as a result of the following error:
hppa-linux-gnu-gcc -o res_snmp.so -pthread -Wl,--as-needed -shared -Wl,--version-script,res_snmp.exports,--warn-common res_snmp.o snmp/agent.o -L/usr/lib/hppa-linux-gnu -lnetsnmpmibs -lsensors -lpci -ldl -lnetsnmpagent -lwrap -Wl,-E -lnetsnmp -lm
/usr/bin/ld: res_snmp.o: relocation R_PARISC_DPREL21L can not be used when making a shared object; recompile with -fPIC
res_snmp.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
/<<PKGBUILDDIR>>/Makefile.rules:176: recipe for target 'res_snmp.so' failed
The problem is the order of the -fPIC and -fno-pie options in the compile
command:
hppa-linux-gnu-gcc -o res_snmp.o -c res_snmp.c -MD -MT res_snmp.o -MF .res_snmp.o.d -MP -pthread -I/<<PKGBUILDDIR>>/include -fgnu89-inline -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include/libxml2 -pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fPIC -DAST_MODULE=\"res_snmp\" -DNETSNMP_ENABLE_IPV6 -fno-strict-aliasing -g -O2 -fdebug-prefix-map=/build/net-snmp-AuEjxB/net-snmp-5.7.3+dfsg=. -Wformat -Werror=format-security -DNETSNMP_USE_INLINE -Ulinux -Dlinux=linux -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -O0 -fno-pie -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/hppa-linux-gnu/perl/5.26/CORE -Wdate-time -D_FORTIFY_SOURCE=2 -I. -I/usr/include
The -fno-pie option turns off PIC code generation. PIC code is needed for
shared libraries on hppa.
Full buildd log is here:
https://buildd.debian.org/status/fetch.php?pkg=asterisk&arch=hppa&ver=1%3A13.18.5%7Edfsg-1&stamp=1514420257&raw=0
Regards,
Dave Anglin
-- System Information:
Debian Release: buster/sid
APT prefers buildd-unstable
APT policy: (500, 'buildd-unstable'), (500, 'unstable')
Architecture: hppa (parisc64)
Kernel: Linux 4.14.8+ (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8), LANGUAGE=C (charmap=UTF-8) (ignored: LC_ALL set to en_US.utf8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages asterisk depends on:
ii adduser 3.116
pn asterisk-config | asterisk-config-custom <none>
pn asterisk-core-sounds-en <none>
pn asterisk-core-sounds-en-gsm | asterisk-prompt-en <none>
pn asterisk-modules <none>
ii init-system-helpers 1.51
ii libc6 2.25-5
ii libcap2 1:2.25-1.2
ii libedit2 3.1-20170329-1
ii libgcc4 1:7.2.0-18
ii libjansson4 2.10-1
ii libpopt0 1.16-10+b2
ii libsqlite3-0 3.21.0-1
ii libssl1.0.0 1.0.2d-1
ii libssl1.1 1.1.0g-2
ii libstdc++6 7.2.0-18
ii libsystemd0 236-1
ii libtinfo5 6.0+20171125-1
ii liburiparser1 0.8.4-1
ii libuuid1 2.30.2-0.1
ii libxml2 2.9.4+dfsg1-5.2
ii libxslt1.1 1.1.29-5
ii lsb-base 9.20170808
Versions of packages asterisk recommends:
pn asterisk-moh-opsound-gsm <none>
pn asterisk-voicemail | asterisk-voicemail-storage <none>
ii sox 14.4.2-3
Versions of packages asterisk suggests:
pn asterisk-dahdi <none>
pn asterisk-dev <none>
pn asterisk-doc <none>
pn asterisk-ooh323 <none>
pn asterisk-opus <none>
pn asterisk-vpb <none>
-- Configuration Files:
/etc/init.d/asterisk [Errno 2] No such file or directory: '/etc/init.d/asterisk'
More information about the Pkg-voip-maintainers
mailing list