Bug 227108 - www/apache24: apache benchmark build error due to mis-linked openssl
Summary: www/apache24: apache benchmark build error due to mis-linked openssl
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-apache (Nobody)
URL:
Keywords:
Depends on:
Blocks: 226843
  Show dependency treegraph
 
Reported: 2018-03-30 11:38 UTC by Eugene Grosbein
Modified: 2018-04-03 17:21 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein freebsd_committer freebsd_triage 2018-03-30 11:38:44 UTC
--- ab ---
ab.o: In function `main':
ab.c:(.text+0x88a): undefined reference to `SSLv2_client_method'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [ab] Error code 1


Here is the scenario:

1. FreeBSD 11.1 user has security/openssl installed like openssl-1.0.x compiled with default OPTIONS that include SSLv2 knob enabled.
2. User has DEFAULT_VERSIONS+=ssl=openssl in the /etc/make.conf
3. User tries to build www/apache24 port verion 2.4.33 and build fails with messages quoted above.

ktrace(1) shows that linker does not even try to use libssl.so installed by port but links "ab" with base /usr/lib/libssl.so that has no SSLv2_client_method symbol.

Apache Benckmark "ab" conditionally compiles call to SSLv2_client_method() depending on OPENSSL_NO_SSL2 define that is not present in the openssl port's headers if built with default OPTIONS.

So, there is nasty bug when build uses openssl port's headers with base system's openssl library.
Comment 1 commit-hook freebsd_committer freebsd_triage 2018-03-30 15:04:59 UTC
A commit references this bug:

Author: brnrd
Date: Fri Mar 30 15:04:38 UTC 2018
New revision: 465978
URL: https://svnweb.freebsd.org/changeset/ports/465978

Log:
  www/apache24: Fix ssl linking issues

   - Remove -L/usr/lib from LDFLAGS [1]
   - Remove non-working show-modules target
   - Use new style patch filenames

  PR:		227108 [1]
  With hat:	apache
  Submitted by:	mat [1]
  Reported by:	eugen [1]
  MFH:		2018Q1

Changes:
  head/www/apache24/Makefile
Comment 2 Bernard Spil freebsd_committer freebsd_triage 2018-03-30 15:08:46 UTC
Thanks mat, eugen!