Bug 249132

Summary: net/dhcprelya fails to run with the Undefined symbol "debug" on FreeBSD 12.1
Product: Ports & Packages Reporter: olexander.v.melnyk
Component: Individual Port(s)Assignee: Dmitry Marakasov <amdmi3>
Status: Closed FIXED    
Severity: Affects Only Me CC: olexander.v.melnyk, sem
Priority: --- Keywords: buildisok
Version: LatestFlags: sem: maintainer-feedback+
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Fix run-time error for plugins none

Description olexander.v.melnyk 2020-09-05 19:20:55 UTC
The program fails to run with any plugins enabled:

dlerror(): /usr/local/lib/dhcprelya_option82_plugin.so: Undefined symbol "debug"
dhcprelya: Can't open plugin: /usr/local/lib/dhcprelya_option82_plugin.so

Without plugins all works fine.
FreeBSD version: 12.1-RELEASE-p8 GENERIC amd64.
The problem was reproduced on several systems with 12.1 version, but with FreeBSD 11.3 plugins work good.
Comment 1 Sergey Matveychuk 2020-09-08 10:16:03 UTC
Created attachment 217817 [details]
Fix run-time error for plugins

I don't have an idea why lld(1) inserts symbol 'debug' into SO unit. I did not find any way to prevent it. But this dirty hack fixed this run-time error.
Comment 2 olexander.v.melnyk 2020-09-08 14:16:24 UTC
With this patch all work, thanks.
Comment 3 Automation User 2020-09-23 00:09:29 UTC
Build info is available at https://gitlab.com/swills/freebsd-ports/pipelines/193255657
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-10-20 14:15:03 UTC
A commit references this bug:

Author: amdmi3
Date: Tue Oct 20 14:14:20 UTC 2020
New revision: 552824
URL: https://svnweb.freebsd.org/changeset/ports/552824

Log:
  - Fix runtime link problems with plugins

  PR:		249132
  Submitted by:	sem@semmy.ru (maintainer)
  Reported by:	olexander.v.melnyk@gmail.com
  MFH:		2020Q4

Changes:
  head/net/dhcprelya/Makefile
Comment 5 commit-hook freebsd_committer freebsd_triage 2020-10-20 19:43:47 UTC
A commit references this bug:

Author: amdmi3
Date: Tue Oct 20 19:43:24 UTC 2020
New revision: 552846
URL: https://svnweb.freebsd.org/changeset/ports/552846

Log:
  MFH: r552824

  - Fix runtime link problems with plugins

  PR:		249132
  Submitted by:	sem@semmy.ru (maintainer)
  Reported by:	olexander.v.melnyk@gmail.com
  Approved by:	ports-secteam (joneum)

Changes:
_U  branches/2020Q4/
  branches/2020Q4/net/dhcprelya/Makefile