Bug 211707 - net/asterisk13: Undefined symbol "DTLS_method" with libressl-devel 2.4.2
Summary: net/asterisk13: Undefined symbol "DTLS_method" with libressl-devel 2.4.2
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Guido Falsi
URL: http://cvsweb.openbsd.org/cgi-bin/cvs...
Keywords: needs-qa, patch-ready
Depends on:
Blocks:
 
Reported: 2016-08-09 19:34 UTC by OlivierW
Modified: 2016-09-10 19:52 UTC (History)
3 users (show)

See Also:
madpilot: maintainer-feedback+
madpilot: merge-quarterly?


Attachments
svn diff for net/asterisk13 (1.13 KB, patch)
2016-08-09 20:09 UTC, Bernard Spil
madpilot: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description OlivierW 2016-08-09 19:34:20 UTC
There is a problem with asterisk 13.10.0 and libressl-devel 2.4.2: the module res_rtp_asterisk.so doesn't load, so calls don't work at all.

Trying to manually load the module with: "module load res_rtp_asterisk.so" gives this messages:

[Aug  9 18:23:10] WARNING[101226] loader.c: Error loading module 'res_rtp_asterisk.so': /usr/local/lib/asterisk/modules/res_rtp_asterisk.so: Undefined symbol "DTLS_method"
[Aug  9 18:23:10] WARNING[101226] loader.c: Module 'res_rtp_asterisk.so' could not be loaded.


Receiving a call without res_rtp_asterisk.so loaded gives:
[Aug  9 16:26:35] ERROR[100509][C-00000000] rtp_engine.c: No RTP engine was found. Do you have one loaded?
[Aug  9 16:26:35] NOTICE[100509][C-00000000] chan_sip.c: Failed to authenticate device <sip:xxxxxxxx@x.x.x.x>;tag=xxxxxx


I found and applied this patch from OpenBSD: http://cvsweb.openbsd.org/cgi-bin/cvsweb/ports/telephony/asterisk/patches/patch-res_res_rtp_asterisk_c and asterisk13 works again with libressl-devel.
Comment 1 Bernard Spil freebsd_committer 2016-08-09 20:09:44 UTC
Created attachment 173475 [details]
svn diff for net/asterisk13

Hi Guido,

Please find a working svn diff attached.

These changes are otherwise harmless. Only LibreSSL defines LIBRESSL_VERSION_NUMBER.

Hope you'll add it to your port!

Thanks,

Bernard.
Comment 2 Guido Falsi freebsd_committer 2016-08-10 06:22:49 UTC
Thanks for reporting the issue and attaching a full patch.

I'm going to test it, I have no objection to adding it to the port.

I'll also try to push this upstream later, since it really belongs there.
Comment 3 commit-hook freebsd_committer 2016-08-10 07:28:34 UTC
A commit references this bug:

Author: madpilot
Date: Wed Aug 10 07:28:09 UTC 2016
New revision: 419992
URL: https://svnweb.freebsd.org/changeset/ports/419992

Log:
  Add patch to fix build with libressl.

  PR:		211707
  Submitted by:	olivierw1+bugzilla-freebsd@hotmail.com
  Patch by:	brnrd@
  Obtained From:	http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/telephony/asterisk/patches/patch-res_res_rtp_asterisk_c?rev=1.1&content-type=text/plain
  MFH:		2016Q3

Changes:
  head/net/asterisk13/files/patch-res-res_rtp_asterisk.c
Comment 4 Guido Falsi freebsd_committer 2016-08-10 07:40:06 UTC
Committed.

I'm not going to merge this patch to 2016Q3 since asterisk version 13.9.2 is in that branch and is unaffected.
Comment 5 OlivierW 2016-09-09 19:01:08 UTC
Hello,

I just compiled asterisk13 13.11.1 with libressl-devel 2.4.2 and I'm getting again the exact same error.

I looked at the commited patch: https://svnweb.freebsd.org/ports/head/net/asterisk13/files/patch-res-res_rtp_asterisk.c?revision=419992&view=co and it looks strange compared to the ones from OpenBSD: http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/telephony/asterisk/patches/patch-res_res_rtp_asterisk_c?rev=1.1&content-type=text/plain (there's the first line "Index: net/asterisk13/files/patch-res_res__rtp__asterisk.c", there are lines beginning with more "+" then necessary).

So, I guess the commited patch is incorrect.
For now I've reverted back to asterisk13 13.10.0, I'll try again when it'll be fixed :-)
Looks like last time I forgot to recompile 13.10.0 with this patch and was using the version with my own patch from OpenBSD.
Comment 6 commit-hook freebsd_committer 2016-09-09 19:41:34 UTC
A commit references this bug:

Author: brnrd
Date: Fri Sep  9 19:40:51 UTC 2016
New revision: 421633
URL: https://svnweb.freebsd.org/changeset/ports/421633

Log:
  net/asterisk13: Fix broken patch file

    - Patch was the svn diff to the tree
    - Convert to a regular patch file

  PR:		211707

Changes:
  head/net/asterisk13/files/patch-res-res_rtp_asterisk.c
  head/net/asterisk13/files/patch-res_res__rtp__asterisk.c
Comment 7 OlivierW 2016-09-09 21:25:45 UTC
I still had the problem after the new patch. After debugging with brnrd@ he founds I had to edit the Makefile to move "ncurses" after "ssl" in USES.
So, now I have in my asterisk13's Makefile:
USES=       bison cpe gmake iconv libedit localbase ssl \
        shebangfix sqlite ncurses

Phone calls now works!
Comment 8 Bernard Spil freebsd_committer 2016-09-09 21:30:25 UTC
There's a problem with OpenSSL linking when ncurses appears BEFORE ssl in USES related to order of setting rpath.

Simple fix is to push ncurses to the end of the USES definition.
Comment 9 commit-hook freebsd_committer 2016-09-10 07:58:25 UTC
A commit references this bug:

Author: madpilot
Date: Sat Sep 10 07:57:58 UTC 2016
New revision: 421673
URL: https://svnweb.freebsd.org/changeset/ports/421673

Log:
  Push ncurses USES after ssl USES, it has been reported to solve
  problems when compiling with non base SSL library.

  PR:		211707
  Submitted by:	OlivierW <olivierw1+bugzilla-freebsd@hotmail.com>

Changes:
  head/net/asterisk13/Makefile
Comment 10 Guido Falsi freebsd_committer 2016-09-10 07:59:19 UTC
Thanks for reporting the issue.

I have committed the USES change.

Can this bug be marked as fixed again?
Comment 11 Guido Falsi freebsd_committer 2016-09-10 08:00:05 UTC
BTW I think this will need merging to 2016Q3 together with the update to 13.11.1.
Comment 12 OlivierW 2016-09-10 09:04:39 UTC
Thanks!
Comment 13 commit-hook freebsd_committer 2016-09-10 19:52:32 UTC
A commit references this bug:

Author: madpilot
Date: Sat Sep 10 19:52:12 UTC 2016
New revision: 421733
URL: https://svnweb.freebsd.org/changeset/ports/421733

Log:
  MFH: r418897 r419992 r420804 r421247 r421297 r421586 r421587 r421633 r421673 r421696

  - Update net/asterisk11 to 11.23.0
  - Update net/asterisk13 to 13.10.0

  Add patch to fix build with libressl.

  PR:		211707
  Submitted by:	olivierw1+bugzilla-freebsd@hotmail.com
  Patch by:	brnrd@
  Obtained From:	http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/telephony/asterisk/patches/patch-res_res_rtp_asterisk_c?rev=1.1&content-type=text/plain

  Fix build on head after r303920.

  - Update to 13.11.0
  - Make using base compiler the dafault on amd64 and i386

  - Prevent asterisk build system from unconditionally using
    -march=native
  - Add an OPTIMIZED_CFLAGS option, disabled by default, to allow
    enabling the native flag
  - While here, convert to option target helpers.

  Update net/asterisk11 to 11.23.1

  Security:	5cb18881-7604-11e6-b362-001999f8d30b

  Update net/asterisk13 to 13.11.1

  Security:	5cb18881-7604-11e6-b362-001999f8d30b
  		7fda7920-7603-11e6-b362-001999f8d30b

  net/asterisk13: Fix broken patch file

    - Patch was the svn diff to the tree
    - Convert to a regular patch file

  PR:		211707

  Push ncurses USES after ssl USES, it has been reported to solve
  problems when compiling with non base SSL library.

  PR:		211707
  Submitted by:	OlivierW <olivierw1+bugzilla-freebsd@hotmail.com>

  Update to 13.11.2

  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/net/asterisk11/Makefile
  branches/2016Q3/net/asterisk11/distinfo
  branches/2016Q3/net/asterisk11/files/patch-apps_app__queue.c
  branches/2016Q3/net/asterisk13/Makefile
  branches/2016Q3/net/asterisk13/distinfo
  branches/2016Q3/net/asterisk13/files/patch-main__Makefile
  branches/2016Q3/net/asterisk13/files/patch-main_crypt.c
  branches/2016Q3/net/asterisk13/files/patch-res_res__rtp__asterisk.c
  branches/2016Q3/net/asterisk13/pkg-plist
Comment 14 commit-hook freebsd_committer 2016-09-10 19:52:33 UTC
A commit references this bug:

Author: madpilot
Date: Sat Sep 10 19:52:12 UTC 2016
New revision: 421733
URL: https://svnweb.freebsd.org/changeset/ports/421733

Log:
  MFH: r418897 r419992 r420804 r421247 r421297 r421586 r421587 r421633 r421673 r421696

  - Update net/asterisk11 to 11.23.0
  - Update net/asterisk13 to 13.10.0

  Add patch to fix build with libressl.

  PR:		211707
  Submitted by:	olivierw1+bugzilla-freebsd@hotmail.com
  Patch by:	brnrd@
  Obtained From:	http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/telephony/asterisk/patches/patch-res_res_rtp_asterisk_c?rev=1.1&content-type=text/plain

  Fix build on head after r303920.

  - Update to 13.11.0
  - Make using base compiler the dafault on amd64 and i386

  - Prevent asterisk build system from unconditionally using
    -march=native
  - Add an OPTIMIZED_CFLAGS option, disabled by default, to allow
    enabling the native flag
  - While here, convert to option target helpers.

  Update net/asterisk11 to 11.23.1

  Security:	5cb18881-7604-11e6-b362-001999f8d30b

  Update net/asterisk13 to 13.11.1

  Security:	5cb18881-7604-11e6-b362-001999f8d30b
  		7fda7920-7603-11e6-b362-001999f8d30b

  net/asterisk13: Fix broken patch file

    - Patch was the svn diff to the tree
    - Convert to a regular patch file

  PR:		211707

  Push ncurses USES after ssl USES, it has been reported to solve
  problems when compiling with non base SSL library.

  PR:		211707
  Submitted by:	OlivierW <olivierw1+bugzilla-freebsd@hotmail.com>

  Update to 13.11.2

  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/net/asterisk11/Makefile
  branches/2016Q3/net/asterisk11/distinfo
  branches/2016Q3/net/asterisk11/files/patch-apps_app__queue.c
  branches/2016Q3/net/asterisk13/Makefile
  branches/2016Q3/net/asterisk13/distinfo
  branches/2016Q3/net/asterisk13/files/patch-main__Makefile
  branches/2016Q3/net/asterisk13/files/patch-main_crypt.c
  branches/2016Q3/net/asterisk13/files/patch-res_res__rtp__asterisk.c
  branches/2016Q3/net/asterisk13/pkg-plist
Comment 15 commit-hook freebsd_committer 2016-09-10 19:52:35 UTC
A commit references this bug:

Author: madpilot
Date: Sat Sep 10 19:52:12 UTC 2016
New revision: 421733
URL: https://svnweb.freebsd.org/changeset/ports/421733

Log:
  MFH: r418897 r419992 r420804 r421247 r421297 r421586 r421587 r421633 r421673 r421696

  - Update net/asterisk11 to 11.23.0
  - Update net/asterisk13 to 13.10.0

  Add patch to fix build with libressl.

  PR:		211707
  Submitted by:	olivierw1+bugzilla-freebsd@hotmail.com
  Patch by:	brnrd@
  Obtained From:	http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/telephony/asterisk/patches/patch-res_res_rtp_asterisk_c?rev=1.1&content-type=text/plain

  Fix build on head after r303920.

  - Update to 13.11.0
  - Make using base compiler the dafault on amd64 and i386

  - Prevent asterisk build system from unconditionally using
    -march=native
  - Add an OPTIMIZED_CFLAGS option, disabled by default, to allow
    enabling the native flag
  - While here, convert to option target helpers.

  Update net/asterisk11 to 11.23.1

  Security:	5cb18881-7604-11e6-b362-001999f8d30b

  Update net/asterisk13 to 13.11.1

  Security:	5cb18881-7604-11e6-b362-001999f8d30b
  		7fda7920-7603-11e6-b362-001999f8d30b

  net/asterisk13: Fix broken patch file

    - Patch was the svn diff to the tree
    - Convert to a regular patch file

  PR:		211707

  Push ncurses USES after ssl USES, it has been reported to solve
  problems when compiling with non base SSL library.

  PR:		211707
  Submitted by:	OlivierW <olivierw1+bugzilla-freebsd@hotmail.com>

  Update to 13.11.2

  Approved by:	ports-secteam (feld)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/net/asterisk11/Makefile
  branches/2016Q3/net/asterisk11/distinfo
  branches/2016Q3/net/asterisk11/files/patch-apps_app__queue.c
  branches/2016Q3/net/asterisk13/Makefile
  branches/2016Q3/net/asterisk13/distinfo
  branches/2016Q3/net/asterisk13/files/patch-main__Makefile
  branches/2016Q3/net/asterisk13/files/patch-main_crypt.c
  branches/2016Q3/net/asterisk13/files/patch-res_res__rtp__asterisk.c
  branches/2016Q3/net/asterisk13/pkg-plist