[Home]

Summary:ASTERISK-29634: res_snmp: gcc 11 needs -fPIC to compile correctly
Reporter:George Joseph (gjoseph)Labels:
Date Opened:2021-09-08 09:33:22Date Closed:2021-09-10 10:37:35
Priority:MinorRegression?
Status:Closed/CompleteComponents:Resources/res_snmp
Versions:16.20.0 18.6.0 19.0.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Wirhout -fPIC:
{code}
  [LD] res_snmp.o snmp/agent.o -> res_snmp.so
/usr/bin/ld: /tmp/ccQpmjU4.ltrans0.ltrans.o: warning: relocation against `ast_lastreloadtime' in read-only section `.text'
/usr/bin/ld: /tmp/ccQpmjU4.ltrans0.ltrans.o: relocation R_X86_64_PC32 against undefined symbol `ast_verb_sys_level' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
{code}
Comments:By: Friendly Automation (friendly-automation) 2021-09-10 10:37:37.107-0500

Change 16448 merged by Friendly Automation:
res_snmp: Add -fPIC to _ASTCFLAGS

[https://gerrit.asterisk.org/c/asterisk/+/16448|https://gerrit.asterisk.org/c/asterisk/+/16448]

By: Friendly Automation (friendly-automation) 2021-09-10 10:38:50.929-0500

Change 16418 merged by Friendly Automation:
res_snmp: Add -fPIC to _ASTCFLAGS

[https://gerrit.asterisk.org/c/asterisk/+/16418|https://gerrit.asterisk.org/c/asterisk/+/16418]

By: Friendly Automation (friendly-automation) 2021-09-10 10:42:43.334-0500

Change 16450 merged by Friendly Automation:
res_snmp: Add -fPIC to _ASTCFLAGS

[https://gerrit.asterisk.org/c/asterisk/+/16450|https://gerrit.asterisk.org/c/asterisk/+/16450]

By: Friendly Automation (friendly-automation) 2021-09-10 10:42:54.590-0500

Change 16449 merged by Friendly Automation:
res_snmp: Add -fPIC to _ASTCFLAGS

[https://gerrit.asterisk.org/c/asterisk/+/16449|https://gerrit.asterisk.org/c/asterisk/+/16449]

By: Alexander Traud (traud) 2021-10-28 09:36:59.250-0500

Do you remember the platform on which this happened? I think this is related to ASTERISK-29709 and the latter might be the correct solution.