Bug 219605 - net-mgmt/ccnet-client: 6.0.6 fails to build with LibreSSL
Summary: net-mgmt/ccnet-client: 6.0.6 fails to build with LibreSSL
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: Richard Gallamore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-28 01:42 UTC by Jens K. Loewe
Modified: 2017-07-06 02:23 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (Ultima1252)


Attachments
proposed fix? (366 bytes, patch)
2017-05-28 01:42 UTC, Jens K. Loewe
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jens K. Loewe 2017-05-28 01:42:39 UTC
Created attachment 182979 [details]
proposed fix?

I can't build net-mgmt/ccnet-client 6.0.6 on FreeBSD 11.0 with LibreSSL:

> ../../lib/.libs/libccnetd.a(rsa.o): In function `private_key_to_pub':
> rsa.c:(.text+0x28): undefined reference to `RSA_get0_key'
> rsa.c:(.text+0x4f): undefined reference to `RSA_set0_key'
> ../../lib/.libs/libccnetd.a(rsa.o): In function `public_key_to_gstring':
> rsa.c:(.text+0x9c): undefined reference to `RSA_get0_key'
> ../../lib/.libs/libccnetd.a(rsa.o): In function `public_key_append_to_gstring':
> rsa.c:(.text+0x1cf): undefined reference to `RSA_get0_key'
> ../../lib/.libs/libccnetd.a(rsa.o): In function `public_key_from_string':
> rsa.c:(.text+0x37e): undefined reference to `RSA_set0_key'

This might be because a switch in rsa.c adds those functions for "newer OpenSSL versions" without considering LibreSSL (which has a fixed OPENSSL_VERSION_NUMBER set).

A proposed fix is attached.
Comment 1 Ultima 2017-05-28 13:53:33 UTC
Comment on attachment 182979 [details]
proposed fix?

I will be unable to test for a couple of weeks, but this lgtm.
Comment 2 Ultima 2017-05-28 14:02:04 UTC
NI am unable to set status flag. + For proposed fix.
Comment 3 Jens K. Loewe 2017-06-30 23:54:00 UTC
^ Still broken as of 6.0.7
Comment 4 Richard Gallamore freebsd_committer freebsd_triage 2017-07-01 01:05:42 UTC
Forgot about this, thanks for the reminder.
Comment 5 Richard Gallamore freebsd_committer freebsd_triage 2017-07-03 02:26:22 UTC
(In reply to Jens K. Loewe from comment #3)
I don't have a problem adding this patch, however it seems that ccnet also won't build regardless because a depend, curl, further down the chain is failing to build.
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-07-06 02:22:04 UTC
A commit references this bug:

Author: ultima
Date: Thu Jul  6 02:21:23 UTC 2017
New revision: 445123
URL: https://svnweb.freebsd.org/changeset/ports/445123

Log:
  * Add patch to fix build for libressl
  * Removed --enable-ldap, not a valid configure arg

  PR:		219605
  Submitted by:	Jens K. Loewe <mozilla@tuxproject.de>
  Reviewed by:	lifanov (mentor)
  Approved by:	lifanov (mentor)
  Differential Revision:	https://reviews.freebsd.org/D11453

Changes:
  head/net-mgmt/ccnet-client/Makefile
  head/net-mgmt/ccnet-client/files/patch-lib_rsa.c
Comment 7 Richard Gallamore freebsd_committer freebsd_triage 2017-07-06 02:23:23 UTC
Committed, thanks Jens, and sorry for the delay.